mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Merge from origin/emacs-30
e6b4c0bceblisp/emacs-lisp/cl-macs.el (cl-labels): Fix docstring (bu...7a976d1aafFix minor issues in documentation of `use-package'99ff59bd66PHP should be in the PATH, either locally or remotely. (b...26873d5028Avoid warning when loading 'go-ts-mode'a702f29a00; Fix package-version valuesa1fbc51dc7; * lisp/which-key.el (which-key-idle-delay): Fix package... # Conflicts: # lisp/progmodes/php-ts-mode.el # lisp/which-key.el
This commit is contained in:
commit
faa3fbe010
6 changed files with 47 additions and 31 deletions
|
|
@ -2276,9 +2276,10 @@ Like `cl-flet' but the definitions can refer to previous ones.
|
||||||
(defmacro cl-labels (bindings &rest body)
|
(defmacro cl-labels (bindings &rest body)
|
||||||
"Make local (recursive) function definitions.
|
"Make local (recursive) function definitions.
|
||||||
|
|
||||||
BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...)
|
Each definition can take the form (FUNC EXP) where FUNC is the function
|
||||||
where FUNC is the function name, ARGLIST its arguments, and BODY the
|
name, and EXP is an expression that returns the function value to which
|
||||||
forms of the function body.
|
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
|
FUNC is defined in any BODY, as well as FORM, so you can write recursive
|
||||||
and mutually recursive function definitions. See Info node
|
and mutually recursive function definitions. See Info node
|
||||||
|
|
|
||||||
|
|
@ -601,7 +601,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))
|
(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)))
|
(add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
|
||||||
|
|
||||||
;;;; go.work support.
|
;;;; go.work support.
|
||||||
|
|
|
||||||
|
|
@ -131,12 +131,16 @@ Works like `css--fontify-region'."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:safe 'booleanp)
|
:safe 'booleanp)
|
||||||
|
|
||||||
(defcustom php-ts-mode-php-executable (or (executable-find "php") "/usr/bin/php")
|
(defcustom php-ts-mode-php-default-executable (or (executable-find "php") "/usr/bin/php")
|
||||||
"The location of PHP executable."
|
"The default PHP executable."
|
||||||
:tag "PHP Executable"
|
:tag "PHP Executable"
|
||||||
:version "30.1"
|
:version "30.1"
|
||||||
:type 'file)
|
: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
|
(defcustom php-ts-mode-php-config nil
|
||||||
"The location of php.ini file.
|
"The location of php.ini file.
|
||||||
If nil the default one is used to run the embedded webserver or
|
If nil the default one is used to run the embedded webserver or
|
||||||
|
|
@ -267,7 +271,7 @@ Calls REPORT-FN directly."
|
||||||
:noquery t
|
:noquery t
|
||||||
:connection-type 'pipe
|
:connection-type 'pipe
|
||||||
:buffer (generate-new-buffer " *php-ts-mode-flymake*")
|
:buffer (generate-new-buffer " *php-ts-mode-flymake*")
|
||||||
:command `(,php-ts-mode-php-executable
|
:command `(,(php-ts-mode--executable)
|
||||||
"-l" "-d" "display_errors=0")
|
"-l" "-d" "display_errors=0")
|
||||||
:sentinel
|
:sentinel
|
||||||
(lambda (proc _event)
|
(lambda (proc _event)
|
||||||
|
|
@ -303,6 +307,16 @@ Calls REPORT-FN directly."
|
||||||
|
|
||||||
;;; Utils
|
;;; 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 ()
|
(defun php-ts-mode--get-indent-style ()
|
||||||
"Helper function to set indentation style.
|
"Helper function to set indentation style.
|
||||||
MODE can be `psr2', `pear', `drupal', `wordpress', `symfony', `zend'."
|
MODE can be `psr2', `pear', `drupal', `wordpress', `symfony', `zend'."
|
||||||
|
|
@ -1641,7 +1655,7 @@ CONFIG."
|
||||||
(message "Run PHP built-in web server with args %s into buffer %s"
|
(message "Run PHP built-in web server with args %s into buffer %s"
|
||||||
(string-join args " ")
|
(string-join args " ")
|
||||||
buf-name)
|
buf-name)
|
||||||
(apply #'make-comint name php-ts-mode-php-executable nil args))
|
(apply #'make-comint name (php-ts-mode--executable) nil args))
|
||||||
(funcall
|
(funcall
|
||||||
(if (called-interactively-p 'interactive) #'display-buffer #'get-buffer)
|
(if (called-interactively-p 'interactive) #'display-buffer #'get-buffer)
|
||||||
buf-name)))
|
buf-name)))
|
||||||
|
|
@ -1733,14 +1747,15 @@ Prompt for CMD if `php-ts-mode-php-executable' is nil.
|
||||||
Optional CONFIG, if supplied, is the php.ini file to use."
|
Optional CONFIG, if supplied, is the php.ini file to use."
|
||||||
(interactive (when current-prefix-arg
|
(interactive (when current-prefix-arg
|
||||||
(list
|
(list
|
||||||
(read-string "Run PHP: " php-ts-mode-php-executable)
|
(read-string "Run PHP: " (php-ts-mode--executable))
|
||||||
(expand-file-name
|
(expand-file-name
|
||||||
(read-file-name "With config: " php-ts-mode-php-config)))))
|
(read-file-name "With config: " php-ts-mode-php-config)))))
|
||||||
(let ((buffer (get-buffer-create php-ts-mode-inferior-php-buffer))
|
(let* ((php-prog (php-ts-mode--executable))
|
||||||
|
(buffer (get-buffer-create php-ts-mode-inferior-php-buffer))
|
||||||
(cmd (or
|
(cmd (or
|
||||||
cmd
|
cmd
|
||||||
php-ts-mode-php-executable
|
php-prog
|
||||||
(read-string "Run PHP: " php-ts-mode-php-executable)))
|
(read-string "Run PHP: " php-prog)))
|
||||||
(config (or
|
(config (or
|
||||||
config
|
config
|
||||||
(and php-ts-mode-php-config
|
(and php-ts-mode-php-config
|
||||||
|
|
|
||||||
|
|
@ -4178,7 +4178,7 @@ string)) to be used for converting the document."
|
||||||
(const :tag "No options" nil)
|
(const :tag "No options" nil)
|
||||||
(string :tag "Options"))))
|
(string :tag "Options"))))
|
||||||
:group 'rst-compile
|
:group 'rst-compile
|
||||||
:package-version "1.2.0")
|
:package-version '(rst . "1.2.0"))
|
||||||
|
|
||||||
;; FIXME: Must be defcustom.
|
;; FIXME: Must be defcustom.
|
||||||
(defvar rst-compile-primary-toolset 'html
|
(defvar rst-compile-primary-toolset 'html
|
||||||
|
|
|
||||||
|
|
@ -1849,11 +1849,11 @@ Usage:
|
||||||
:magic-fallback Form to be added to `magic-fallback-mode-alist'.
|
:magic-fallback Form to be added to `magic-fallback-mode-alist'.
|
||||||
:interpreter Form to be added to `interpreter-mode-alist'.
|
:interpreter Form to be added to `interpreter-mode-alist'.
|
||||||
|
|
||||||
:commands Define autoloads for commands that will be defined by the
|
:commands Define autoloads for commands defined by the package.
|
||||||
package. This is useful if the package is being lazily
|
This is useful if the package is being lazily loaded,
|
||||||
loaded, and you wish to conditionally call functions in your
|
and you wish to conditionally call functions in your
|
||||||
`:init' block that are defined in the package.
|
`: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.
|
:hook Specify hook(s) to attach this package to.
|
||||||
|
|
||||||
:bind Bind keys, and define autoloads for the bound commands.
|
:bind Bind keys, and define autoloads for the bound commands.
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ This variable should be set before activating `which-key-mode'.
|
||||||
A value of zero might lead to issues, so a non-zero value is
|
A value of zero might lead to issues, so a non-zero value is
|
||||||
recommended
|
recommended
|
||||||
(see https://github.com/justbur/emacs-which-key/issues/134)."
|
(see https://github.com/justbur/emacs-which-key/issues/134)."
|
||||||
:type 'number
|
: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
|
(defcustom which-key-idle-secondary-delay nil
|
||||||
"Seconds to wait for which-key to pop up after initial display.
|
"Seconds to wait for which-key to pop up after initial display.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue