From a1fbc51dc715bf9eaa89b165f902eef9dd819077 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 27 Mar 2025 13:49:10 +0200 Subject: [PATCH 1/6] ; * lisp/which-key.el (which-key-idle-delay): Fix package-version. --- lisp/which-key.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/which-key.el b/lisp/which-key.el index 6ae8dcbb1f0..25349ca91be 100644 --- a/lisp/which-key.el +++ b/lisp/which-key.el @@ -62,7 +62,7 @@ A value of zero might lead to issues, so a non-zero value is recommended (see https://github.com/justbur/emacs-which-key/issues/134)." :type 'float - :package-version "1.0" :version "30.1") + :package-version '(which-key "1.0") :version "30.1") (defcustom which-key-idle-secondary-delay nil "Seconds to wait for which-key to pop up after initial display. From a702f29a00b0362b6060bbf4c83edcdc61b5fe32 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 27 Mar 2025 13:52:22 +0200 Subject: [PATCH 2/6] ; Fix package-version values * lisp/textmodes/rst.el (rst-compile-toolsets): * lisp/which-key.el (which-key-idle-delay): Fix package-version. --- lisp/textmodes/rst.el | 2 +- lisp/which-key.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index c06b50e10bf..be8b013863f 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -4181,7 +4181,7 @@ string)) to be used for converting the document." (const :tag "No options" nil) (string :tag "Options")))) :group 'rst-compile - :package-version "1.2.0") + :package-version '(rst . "1.2.0")) ;; FIXME: Must be defcustom. (defvar rst-compile-primary-toolset 'html diff --git a/lisp/which-key.el b/lisp/which-key.el index 25349ca91be..0ccae701689 100644 --- a/lisp/which-key.el +++ b/lisp/which-key.el @@ -62,7 +62,7 @@ A value of zero might lead to issues, so a non-zero value is recommended (see https://github.com/justbur/emacs-which-key/issues/134)." :type 'float - :package-version '(which-key "1.0") :version "30.1") + :package-version '(which-key . "1.0") :version "30.1") (defcustom which-key-idle-secondary-delay nil "Seconds to wait for which-key to pop up after initial display. From 26873d5028ed8aa0e2fc56c7d6ed3b43ff976d3c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Mar 2025 13:36:02 +0300 Subject: [PATCH 3/6] Avoid warning when loading 'go-ts-mode' * lisp/progmodes/go-ts-mode.el (treesit-ready-p): Silence the warning if the gomod language library is not installed. (Bug#77213) --- lisp/progmodes/go-ts-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index eb5b93008eb..c233a7222fc 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -476,7 +476,7 @@ what the parent of the node would be if it were a node." (derived-mode-add-parents 'go-mod-ts-mode '(go-mod-mode)) -(if (treesit-ready-p 'gomod) +(if (treesit-ready-p 'gomod t) (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode))) (provide 'go-ts-mode) From 99ff59bd66cc07df40b14cb0a8acf22d440581e5 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Fri, 14 Mar 2025 21:11:22 +0100 Subject: [PATCH 4/6] PHP should be in the PATH, either locally or remotely. (bug#76242). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/progmodes/php-ts-mode.el (php-ts-mode-php-default-executable): Renamed from 'php-ts-mode-php-executable'. (php-ts-mode--executable): New function that returns the absolute filename of the PHP executable, local or remote, based on 'default-directory'. (php-ts-mode--anchor-prev-sibling): Replaced 'when-let' with “when-let*.” (php-ts-mode--indent-defun): Replaced 'when-let' with 'when-let*'. (php-ts-mode-run-php-webserver): Use the new function (php-ts-mode-php-default-executable). (run-php): Use the new function (php-ts-mode-php-default-executable). --- lisp/progmodes/php-ts-mode.el | 47 +++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/lisp/progmodes/php-ts-mode.el b/lisp/progmodes/php-ts-mode.el index 56c15dad36f..b626a19a0de 100644 --- a/lisp/progmodes/php-ts-mode.el +++ b/lisp/progmodes/php-ts-mode.el @@ -134,12 +134,16 @@ Works like `css--fontify-region'." :type 'boolean :safe 'booleanp) -(defcustom php-ts-mode-php-executable (or (executable-find "php") "/usr/bin/php") - "The location of PHP executable." +(defcustom php-ts-mode-php-default-executable (or (executable-find "php") "/usr/bin/php") + "The default PHP executable." :tag "PHP Executable" :version "30.1" :type 'file) +(defvar-local php-ts-mode-alternative-php-program-name nil + "An alternative to the usual `php' program name. +In non-nil, `php-ts-mode--executable' try to find this executable.") + (defcustom php-ts-mode-php-config nil "The location of php.ini file. If nil the default one is used to run the embedded webserver or @@ -270,7 +274,7 @@ Calls REPORT-FN directly." :noquery t :connection-type 'pipe :buffer (generate-new-buffer " *php-ts-mode-flymake*") - :command `(,php-ts-mode-php-executable + :command `(,(php-ts-mode--executable) "-l" "-d" "display_errors=0") :sentinel (lambda (proc _event) @@ -306,6 +310,16 @@ Calls REPORT-FN directly." ;;; Utils +(defun php-ts-mode--executable () + "Return the absolute filename of the php executable. +If the `default-directory' is remote, search on a remote host, otherwise +it searches locally. If `php-ts-mode-alternative-php-program-name' is +non-zero, it searches for this program instead of the usual `php'. +If the search fails, it returns `php-ts-mode-php-default-executable'." + (or (executable-find + (or php-ts-mode-alternative-php-program-name "php") t) + php-ts-mode-php-default-executable)) + (defun php-ts-mode--get-indent-style () "Helper function to set indentation style. MODE can be `psr2', `pear', `drupal', `wordpress', `symfony', `zend'." @@ -595,7 +609,7 @@ doesn't have a child. PARENT is NODE's parent, BOL is the beginning of non-whitespace characters of the current line." - (when-let ((prev-sibling + (when-let* ((prev-sibling (or (treesit-node-prev-sibling node t) (treesit-node-prev-sibling (treesit-node-first-child-for-pos parent bol) t) @@ -1236,7 +1250,7 @@ Return nil if the NODE has no field “name” or if NODE is not a defun node." "Indent the current top-level declaration syntactically. `treesit-defun-type-regexp' defines what constructs to indent." (interactive "*") - (when-let ((orig-point (point-marker)) + (when-let* ((orig-point (point-marker)) (node (treesit-defun-at-point))) (indent-region (treesit-node-start node) (treesit-node-end node)) @@ -1613,7 +1627,7 @@ for PORT, HOSTNAME, DOCUMENT-ROOT and ROUTER-SCRIPT." (message "Run PHP built-in web server with args %s into buffer %s" (string-join args " ") buf-name) - (apply #'make-comint name php-ts-mode-php-executable nil args)) + (apply #'make-comint name (php-ts-mode--executable) nil args)) (funcall (if (called-interactively-p 'interactive) #'display-buffer #'get-buffer) buf-name))) @@ -1677,18 +1691,19 @@ Prompt for CMD if `php-ts-mode-php-executable' is nil. Optional CONFIG, if supplied, is the php.ini file to use." (interactive (when current-prefix-arg (list - (read-string "Run PHP: " php-ts-mode-php-executable) + (read-string "Run PHP: " (php-ts-mode--executable)) (expand-file-name (read-file-name "With config: " php-ts-mode-php-config))))) - (let ((buffer (get-buffer-create php-ts-mode-inferior-php-buffer)) - (cmd (or - cmd - php-ts-mode-php-executable - (read-string "Run PHP: " php-ts-mode-php-executable))) - (config (or - config - (and php-ts-mode-php-config - (expand-file-name php-ts-mode-php-config))))) + (let* ((php-prog (php-ts-mode--executable)) + (buffer (get-buffer-create php-ts-mode-inferior-php-buffer)) + (cmd (or + cmd + php-prog + (read-string "Run PHP: " php-prog))) + (config (or + config + (and php-ts-mode-php-config + (expand-file-name php-ts-mode-php-config))))) (unless (comint-check-proc buffer) (with-current-buffer buffer (inferior-php-ts-mode-startup cmd config) From 7a976d1aaf7f555146ea890cc086edefe3f8ef58 Mon Sep 17 00:00:00 2001 From: Dominik Schrempf Date: Thu, 27 Mar 2025 15:54:52 +0100 Subject: [PATCH 5/6] Fix minor issues in documentation of `use-package' (Bug#77311) Copyright-paperwork-exempt: yes --- lisp/use-package/use-package-core.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 2f0d14255b2..c04053c22ac 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -1810,11 +1810,11 @@ Usage: :magic-fallback Form to be added to `magic-fallback-mode-alist'. :interpreter Form to be added to `interpreter-mode-alist'. -:commands Define autoloads for commands that will be defined by the - package. This is useful if the package is being lazily - loaded, and you wish to conditionally call functions in your +:commands Define autoloads for commands defined by the package. + This is useful if the package is being lazily loaded, + and you wish to conditionally call functions in your `:init' block that are defined in the package. -:autoload Similar to :commands, but it for no-interactive one. +:autoload Similar to `:commands', but used for non-interactive functions. :hook Specify hook(s) to attach this package to. :bind Bind keys, and define autoloads for the bound commands. From e6b4c0bcebf4376f60e7801be5f998b42c1e6b06 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 30 Mar 2025 00:44:50 -0400 Subject: [PATCH 6/6] lisp/emacs-lisp/cl-macs.el (cl-labels): Fix docstring (bug#77348) --- lisp/emacs-lisp/cl-macs.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 99c105c7559..8caf2f1eac0 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2251,9 +2251,10 @@ Like `cl-flet' but the definitions can refer to previous ones. (defmacro cl-labels (bindings &rest body) "Make local (recursive) function definitions. -BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...) -where FUNC is the function name, ARGLIST its arguments, and BODY the -forms of the function body. +Each definition can take the form (FUNC EXP) where FUNC is the function +name, and EXP is an expression that returns the function value to which +it should be bound, or it can take the more common form (FUNC ARGLIST +BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)). FUNC is defined in any BODY, as well as FORM, so you can write recursive and mutually recursive function definitions. See Info node