Merge from origin/emacs-30
e8830015b0
Require ert-x for use by 'ert-font-lock-deftest-file'a1841b4d8e
; * admin/authors.el (authors-aliases): Don't ignore "one...69d8f9d1b7
Fix php-ts-mode font-lock for latest PHP grammar (bug#73516)68f53e4348
eieio.texi: Fix bug#7350553c887fdf6
; cperl-mode.el: Fix an invalid face specificationf5cd5585f4
; Recommend GNU Find for 'find-dired'65e589698e
; * lisp/filesets.el (filesets-homepage): Fix URL.1f243a9780
Delete duplicated line in Viper refcardd63bff4d88
Fix Tramp shortdoc integration759b18a33c
* lisp/imenu.el (imenu-flatten): More limitations in docs...794bb2a2e3
remember-data-file: Don't unconditionally call set-visite...7766ba8419
Align columns in which-key with wide characters properlybd25a98b4e
bibtex-mode: fix patch bibtex validation for non-file buf...4729065ee7
Document 'buttonize-region' in manualf189457e5a
; * lisp/yank-media.el (yank-media-handler): Fix docstrin...2b53e11a08
Use black-on-white by default for doc-view-svg-face.32d0c8f6af
etags-regen-file-extensions: Enable for more extensions8f265b49e3
; Fix last changec8ed48b990
; Improve documentation of 'append'c1f2501f55
Update and improve UI of sql-read-product (bug#73412)4f5fc519f0
Insert correct commit data into VC package descriptions98177d4b3d
Document reporting security issues in user manualb986e2018a
* BUGS: Minor copy edit.
This commit is contained in:
commit
c90eb98dab
25 changed files with 174 additions and 208 deletions
6
BUGS
6
BUGS
|
@ -21,9 +21,9 @@ If necessary, you can read the manual without an info program:
|
|||
|
||||
cat info/emacs* | more "+/^File: emacs.*, Node: Bugs,"
|
||||
|
||||
If you think you may have found a critical security issue that needs
|
||||
to be communicated privately, please contact the GNU Emacs maintainers
|
||||
directly. See admin/MAINTAINERS for their contact details.
|
||||
If you think you may have found a security issue that needs to be
|
||||
communicated privately, please contact the GNU Emacs maintainers
|
||||
directly. See the file admin/MAINTAINERS for their contact details.
|
||||
|
||||
|
||||
Please first check the file etc/PROBLEMS (e.g. with C-h C-p in Emacs) to
|
||||
|
|
|
@ -213,7 +213,7 @@ files.")
|
|||
("Noorul Islam" "Noorul Islam K M")
|
||||
;;; ("Tetsurou Okazaki" "OKAZAKI Tetsurou") ; FIXME?
|
||||
(nil "odanoburu@")
|
||||
(nil "one\\.last\\.kiss@outlook\\.com")
|
||||
("Xie Qi" "one\\.last\\.kiss@outlook\\.com" "shynur")
|
||||
("Cao ZhenXiang" "mail@ookami\\.one")
|
||||
("Óscar Fuentes" "Oscar Fuentes")
|
||||
(nil "pillule")
|
||||
|
|
|
@ -550,6 +550,13 @@ investigating and fixing the bug, where you will receive copies of
|
|||
email messages discussing the bug, in which we might ask you to
|
||||
provide more information, test possible fixes, etc.
|
||||
|
||||
@cindex security, reporting issues
|
||||
@item
|
||||
If you think you may have found a security issue that needs to be
|
||||
communicated privately, please contact the GNU Emacs maintainers
|
||||
directly. See the file @file{admin/MAINTAINERS} in the Emacs
|
||||
distribution for their contact details.
|
||||
|
||||
@item
|
||||
Finally, if you want to propose specific changes to Emacs, whether to
|
||||
fix a bug, add a new feature, or improve our documentation, please see
|
||||
|
|
|
@ -7959,6 +7959,15 @@ will be called when the user clicks on the button. The optional
|
|||
is called. If @code{nil}, the button is used as the parameter instead.
|
||||
@end defun
|
||||
|
||||
@defun buttonize-region start end callback &optional data help-echo
|
||||
Sometimes it's more convenient to convert existing text in a buffer to a
|
||||
button instead of inserting new text. This function makes the region
|
||||
between @var{start} and @var{end} into a button. Arguments
|
||||
@var{callback} and @var{data} have the same meanings as for
|
||||
@code{buttonize}. Optional argument @var{help-echo} is used as the
|
||||
@code{help-echo} property of the button.
|
||||
@end defun
|
||||
|
||||
@node Manipulating Buttons
|
||||
@subsection Manipulating Buttons
|
||||
@cindex manipulating buttons
|
||||
|
|
|
@ -668,6 +668,21 @@ This once was the usual way to copy a list, before the function
|
|||
@end group
|
||||
@end example
|
||||
|
||||
@cindex list of characters of a string
|
||||
@cindex convert string to list of its characters
|
||||
@findex string-to-list
|
||||
Here's how to convert a string into a list of its characters:
|
||||
|
||||
@example
|
||||
@group
|
||||
(append "abcd" nil)
|
||||
@result{} (97 98 99 100)
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
The function @code{string-to-list} is a handy shortcut for the above.
|
||||
|
||||
With the help of @code{apply} (@pxref{Calling Functions}), we can append
|
||||
all the lists in a list of lists:
|
||||
|
||||
|
@ -690,10 +705,12 @@ all the lists in a list of lists:
|
|||
Here are some examples where the final argument is not a list:
|
||||
|
||||
@example
|
||||
@group
|
||||
(append '(x y) 'z)
|
||||
@result{} (x y . z)
|
||||
(append '(x y) [z])
|
||||
@result{} (x y . [z])
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
@ -702,6 +719,17 @@ not a list, the sequence's elements do not become elements of the
|
|||
resulting list. Instead, the sequence becomes the final @sc{cdr}, like
|
||||
any other non-list final argument.
|
||||
|
||||
As an exception, if all the arguments but the last are @code{nil} and
|
||||
the last argument is not a list, the return value is that last argument
|
||||
unchanged (i.e., in this case the return value is not a list):
|
||||
|
||||
@example
|
||||
@group
|
||||
(append nil nil "abcd")
|
||||
@result{} "abcd"
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@defun copy-tree tree &optional vectors-and-records
|
||||
This function returns a copy of the tree @var{tree}. If @var{tree} is a
|
||||
cons cell, this makes a new cons cell with the same @sc{car} and
|
||||
|
|
|
@ -4846,7 +4846,7 @@ involved.
|
|||
3: BEST
|
||||
4: @};
|
||||
@end example
|
||||
|
||||
|
||||
Here, line 2 is assigned a syntactic context with two elements:
|
||||
@code{enum-intro} anchored on the beginning of indentation of line 1,
|
||||
and @code{enum-entry} anchored on the first element @code{GOOD} on
|
||||
|
|
|
@ -232,12 +232,6 @@ and you cannot define your own. The @code{:metaclass} tag in
|
|||
should return instances of the metaclass, behave differently in
|
||||
@eieio{} in that they return symbols or plain structures instead.
|
||||
|
||||
@item EQL specialization
|
||||
EIEIO does not support it.
|
||||
|
||||
@item @code{:around} method tag
|
||||
This CLOS method tag is non-functional.
|
||||
|
||||
@item :default-initargs in @code{defclass}
|
||||
Each slot can have an @code{:initform} tag, so this is not really necessary.
|
||||
|
||||
|
@ -381,7 +375,7 @@ name, then the superclass showing up in the list first defines the
|
|||
slot attributes.
|
||||
|
||||
Inheritance in @eieio{} is more than just combining different slots.
|
||||
It is also important in method invocation. @ref{Methods}.
|
||||
It is also important in method invocation. @ref{Writing Methods}.
|
||||
|
||||
If a method is called on an instance of @code{my-subclass}, and that
|
||||
method only has an implementation on @code{my-baseclass}, or perhaps
|
||||
|
@ -810,158 +804,19 @@ variable name of the same name as the slot.
|
|||
@node Writing Methods
|
||||
@chapter Writing Methods
|
||||
|
||||
Writing a method in @eieio{} is similar to writing a function. The
|
||||
differences are that there are some extra options and there can be
|
||||
Writing a method in @eieio{} is similar to writing a function.
|
||||
The differences are that there are some extra options and there can be
|
||||
multiple definitions under the same function symbol.
|
||||
|
||||
Where a method defines an implementation for a particular data type, a
|
||||
@dfn{generic method} accepts any argument, but contains no code. It
|
||||
is used to provide the dispatching to the defined methods. A generic
|
||||
method has no body, and is merely a symbol upon which methods are
|
||||
attached. It also provides the base documentation for what methods
|
||||
with that name do.
|
||||
You do it using Emacs Lisp's built-in support for CLOS-style generic
|
||||
functions via the @code{cl-defgeneric} and @code{cl-defmethod} macros
|
||||
(@pxref{Generic Functions,,,elisp,GNU Emacs Lisp Reference Manual}).
|
||||
|
||||
@menu
|
||||
* Generics::
|
||||
* Methods::
|
||||
* Static Methods::
|
||||
@end menu
|
||||
|
||||
@node Generics
|
||||
@section Generics
|
||||
|
||||
Each @eieio{} method has one corresponding generic. This generic
|
||||
provides a function binding and the base documentation for the method
|
||||
symbol (@pxref{Symbol Components,,,elisp,GNU Emacs Lisp Reference
|
||||
Manual}).
|
||||
|
||||
@defmac cl-defgeneric method arglist [doc-string]
|
||||
This macro turns the (unquoted) symbol @var{method} into a function.
|
||||
@var{arglist} is the default list of arguments to use (not implemented
|
||||
yet). @var{doc-string} is the documentation used for this symbol.
|
||||
|
||||
A generic function acts as a placeholder for methods. There is no
|
||||
need to call @code{cl-defgeneric} yourself, as @code{cl-defmethod} will call
|
||||
it if necessary. Currently the argument list is unused.
|
||||
|
||||
@code{cl-defgeneric} signals an error if you attempt to turn an existing
|
||||
Emacs Lisp function into a generic function.
|
||||
|
||||
You can also create a generic method with @code{cl-defmethod}
|
||||
(@pxref{Methods}). When a method is created and there is no generic
|
||||
method in place with that name, then a new generic will be created,
|
||||
and the new method will use it.
|
||||
@end defmac
|
||||
|
||||
@node Methods
|
||||
@section Methods
|
||||
|
||||
A method is a function that is executed if the arguments passed
|
||||
to it matches the method's specializers. Different @eieio{} classes may
|
||||
share the same method names.
|
||||
|
||||
Methods are created with the @code{cl-defmethod} macro, which is similar
|
||||
to @code{defun}.
|
||||
|
||||
@defmac cl-defmethod method [:before | :around | :after ] arglist [doc-string] forms
|
||||
|
||||
@var{method} is the name of the function to create.
|
||||
|
||||
@code{:before}, @code{:around}, and @code{:after} specify execution order
|
||||
(i.e., when this form is called). If none of these symbols are present, the
|
||||
method is said to be a @emph{primary}.
|
||||
|
||||
@var{arglist} is the list of arguments to this method. The mandatory arguments
|
||||
in this list may have a type specializer (see the example below) which means
|
||||
that the method will only apply when those arguments match the given type
|
||||
specializer. An argument with no type specializer means that the method
|
||||
applies regardless of its value.
|
||||
|
||||
@var{doc-string} is the documentation attached to the implementation.
|
||||
All method doc-strings are incorporated into the generic method's
|
||||
function documentation.
|
||||
|
||||
@var{forms} is the body of the function.
|
||||
|
||||
@end defmac
|
||||
|
||||
@noindent
|
||||
In the following example, we create a method @code{mymethod} for the
|
||||
@code{classname} class:
|
||||
|
||||
@example
|
||||
(cl-defmethod mymethod ((obj classname) secondarg)
|
||||
"Doc string" )
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
This method only executes if the @var{obj} argument passed to it is an
|
||||
@eieio{} object of class @code{classname}.
|
||||
|
||||
A method with no type specializer is a @dfn{default method}. If a given
|
||||
class has no implementation, then the default method is called when
|
||||
that method is used on a given object of that class.
|
||||
|
||||
Only one method per combination of specializers and qualifiers (@code{:before},
|
||||
@code{:around}, or @code{:after}) is kept. If two @code{cl-defmethod}s appear
|
||||
with the same specializers and the same qualifiers, then the second
|
||||
implementation replaces the first.
|
||||
|
||||
When a method is called on an object, but there is no method specified
|
||||
for that object, but there is a method specified for object's parent
|
||||
class, the parent class's method is called. If there is a method
|
||||
defined for both, only the child's method is called. A child method
|
||||
may call a parent's method using @code{cl-call-next-method}, described
|
||||
below.
|
||||
|
||||
If multiple methods and default methods are defined for the same
|
||||
method and class, they are executed in this order:
|
||||
|
||||
@enumerate
|
||||
@item :around methods
|
||||
The most specific @code{:around} method is called first, which may invoke the
|
||||
less specific ones via @code{cl-call-next-method}. If it doesn't invoke
|
||||
@code{cl-call-next-method}, then no other methods will be executed. When there
|
||||
are no more @code{:around} methods to call, falls through to run the other
|
||||
(non-@code{:around}) methods.
|
||||
@item :before methods
|
||||
Called in sequence from most specific to least specific.
|
||||
@item primary methods
|
||||
The most specific method is called, which may invoke the less specific
|
||||
ones via @code{cl-call-next-method}.
|
||||
@item :after methods
|
||||
Called in sequence from least specific to most specific.
|
||||
@end enumerate
|
||||
|
||||
If no methods exist, Emacs signals a @code{cl-no-applicable-method} error.
|
||||
@xref{Signals}. If methods exist but none of them are primary, Emacs
|
||||
signals a @code{cl-no-primary-method} error. @xref{Signals}.
|
||||
|
||||
@defun cl-call-next-method &rest replacement-args
|
||||
@anchor{cl-call-next-method}
|
||||
|
||||
This function calls the superclass method from a subclass method.
|
||||
This is the ``next method'' specified in the current method list.
|
||||
|
||||
If @var{replacement-args} is non-@code{nil}, then use them instead of the
|
||||
arguments originally provided to the method.
|
||||
|
||||
Can only be used from within the lexical body of a primary or around method.
|
||||
@end defun
|
||||
|
||||
@defun cl-next-method-p
|
||||
@anchor{cl-next-method-p}
|
||||
Non-@code{nil} if there is a next method.
|
||||
|
||||
Can only be used from within the lexical body of a primary or around method.
|
||||
@end defun
|
||||
|
||||
@node Static Methods
|
||||
@section Static Methods
|
||||
|
||||
Static methods do not depend on an object instance, but instead
|
||||
operate on a class. You can create a static method by using
|
||||
the @code{subclass} specializer with @code{cl-defmethod}:
|
||||
EIEIO provides one extension to @code{cl-defmethod} to allow mathods to
|
||||
dispatch on a class argument: so-called ``static'' methods do not depend
|
||||
on an object instance, but instead operate on a class. You can create
|
||||
a static method by using the @code{subclass} specializer with
|
||||
@code{cl-defmethod}:
|
||||
|
||||
@example
|
||||
(cl-defmethod make-instance ((class (subclass mychild)) &rest args)
|
||||
|
|
10
etc/NEWS.30
10
etc/NEWS.30
|
@ -1544,10 +1544,12 @@ default is non-nil if your system supports display of SVG images.
|
|||
---
|
||||
*** New face 'doc-view-svg-face'.
|
||||
This replaces 'doc-view-svg-foreground' and 'doc-view-svg-background'.
|
||||
If you don't like the colors produced by the default definition of
|
||||
this new face when DocView displays documents, customize this face to
|
||||
restore the colors you were used to, or to get colors more to your
|
||||
liking.
|
||||
By default, this face has black foreground on white background and
|
||||
inherits from the default face. When unsetting the foreground and
|
||||
background values, the display in DocView is styled according to the
|
||||
current theme. However, this, or any non-standard values, can result in
|
||||
poor contrast for documents which aren't simply black text on white
|
||||
background.
|
||||
|
||||
---
|
||||
*** DocView buffers now display a new tool bar.
|
||||
|
|
|
@ -301,7 +301,6 @@ \section{Insert Mode}
|
|||
\key{delete line word}{C-u}
|
||||
\key{indent shiftwidth forward}{C-t}
|
||||
\key{indent shiftwidth backward}{C-d}
|
||||
\key{delete line word}{C-u}
|
||||
\key{quote following character}{C-v}
|
||||
\key{emulate Meta key in emacs state}{C-$\backslash$}
|
||||
\key{escape to Vi state for one command}{C-z}
|
||||
|
|
|
@ -238,10 +238,15 @@ showing only titles and no page number."
|
|||
:type 'boolean
|
||||
:version "29.1")
|
||||
|
||||
(defface doc-view-svg-face '((t :inherit default))
|
||||
(defface doc-view-svg-face '((t :inherit default
|
||||
:background "white"
|
||||
:foreground "black"))
|
||||
"Face used for SVG images.
|
||||
Only background and foreground colors are used.
|
||||
See `doc-view-mupdf-use-svg'."
|
||||
See `doc-view-mupdf-use-svg'.
|
||||
|
||||
Only background and foreground colors are used as the SVG image's
|
||||
descriptors, see (info \"(elisp) SVG Images\"). Non-standard values may
|
||||
cause low-contrast issues with certain documents."
|
||||
:version "30.1")
|
||||
|
||||
(make-obsolete 'doc-view-svg-background 'doc-view-svg-face "30.1")
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
;;; Code:
|
||||
|
||||
(require 'ert)
|
||||
(require 'ert-x)
|
||||
(require 'newcomment)
|
||||
(require 'pcase)
|
||||
|
||||
|
|
|
@ -265,13 +265,13 @@ asynchronously."
|
|||
|
||||
(add-hook 'package-read-archive-hook #'package-vc--read-archive-data 20)
|
||||
|
||||
(defun package-vc-commit (pkg)
|
||||
"Return the last commit of a development package PKG."
|
||||
(cl-assert (package-vc-p pkg))
|
||||
(defun package-vc-commit (pkg-desc)
|
||||
"Return the last commit of a development package PKG-DESC."
|
||||
(cl-assert (package-vc-p pkg-desc))
|
||||
;; FIXME: vc should be extended to allow querying the commit of a
|
||||
;; directory (as is possible when dealing with git repositories).
|
||||
;; This should be a fallback option.
|
||||
(cl-loop with dir = (package-desc-dir pkg)
|
||||
(cl-loop with dir = (package-desc-dir pkg-desc)
|
||||
for file in (directory-files dir t "\\.el\\'" t)
|
||||
when (vc-working-revision file) return it
|
||||
finally return "unknown"))
|
||||
|
@ -359,7 +359,11 @@ asynchronously."
|
|||
requires))))
|
||||
(list :kind 'vc)
|
||||
(package--alist-to-plist-args
|
||||
(package-desc-extras pkg-desc))))
|
||||
(let ((extras (copy-alist (package-desc-extras pkg-desc))))
|
||||
(setf (alist-get :commit extras)
|
||||
(package-vc-commit pkg-desc))
|
||||
extras)
|
||||
)))
|
||||
"\n")
|
||||
nil pkg-file nil 'silent))))
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
(defvar filesets-version "1.8.4")
|
||||
(defvar filesets-homepage
|
||||
"http://members.a1.net/t.link/CompEmacsFilesets.html")
|
||||
"https://web.archive.org/web/20210225032922/https://members.a1.net/t.link/CompEmacsFilesets.html")
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
@ -174,6 +174,11 @@ The command run (after changing into DIR) is essentially
|
|||
except that the car of the variable `find-ls-option' specifies what to
|
||||
use in place of \"-ls\" as the final argument.
|
||||
|
||||
If your `find' program is not a GNU Find, the columns in the produced
|
||||
Dired display might fail to align. We recommend to install GNU Find in
|
||||
those cases (you may need to customize the value of `find-program' if
|
||||
you do so), which attempts to align the columns.
|
||||
|
||||
Collect output in the \"*Find*\" buffer. To kill the job before
|
||||
it finishes, type \\[kill-find].
|
||||
|
||||
|
|
|
@ -158,10 +158,18 @@ If the value is `annotation', annotate each completion candidate
|
|||
with a suffix that is the section name to which it belongs.
|
||||
If the value is `group', split completion candidates into groups
|
||||
according to the sections.
|
||||
Any other value is treated as `prefix'.
|
||||
|
||||
Since the values `annotation' and `group' rely on text properties,
|
||||
you can use them only by selecting candidates from the completions
|
||||
buffer, not by typing in the minibuffer.
|
||||
Any other value is treated as `prefix'.
|
||||
buffer, not by typing in the minibuffer. This also means that
|
||||
if you use `minibuffer-next-completion' (`M-<down>') to select
|
||||
a completion while point stays in the minibuffer, you need
|
||||
to customize `minibuffer-completion-auto-choose' to nil that
|
||||
doesn't insert completion candidates to the minibuffer.
|
||||
Also note that for using the value `group' you need to customize
|
||||
`completions-group' to the value t, and `completions-format'
|
||||
to the value `vertical'.
|
||||
|
||||
The value of `imenu-level-separator', a string, is used to separate
|
||||
names from different flattened levels, such as section names, from the
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
(defvar shortdoc--groups)
|
||||
(defvar tramp-current-connection)
|
||||
(defvar tramp-postfix-host-format)
|
||||
(defvar tramp-syntax)
|
||||
(defvar tramp-use-connection-share)
|
||||
|
||||
;;; Fontification of `read-file-name':
|
||||
|
@ -304,7 +305,8 @@ It's value must be a Tramp user option, indexed in the Tramp manual via
|
|||
(tramp--with-startup
|
||||
(with-eval-after-load 'shortdoc
|
||||
;; Some packages deactivate Tramp. They don't deserve a shortdoc entry then.
|
||||
(when (file-remote-p "/ssh:user@host:/tmp/foo")
|
||||
(when (and (file-remote-p "/ssh:user@host:/tmp/foo")
|
||||
(eq tramp-syntax 'default))
|
||||
(dolist (elem `((file-remote-p
|
||||
:eval (file-remote-p "/ssh:user@host:/tmp/foo")
|
||||
:eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method)
|
||||
|
|
|
@ -6307,7 +6307,7 @@ default function."
|
|||
(t (funcall (default-value 'font-lock-syntactic-face-function) state))))
|
||||
|
||||
(defface cperl-method-call
|
||||
'((t (:inherit 'default )))
|
||||
'((t (:inherit default )))
|
||||
"Font Lock mode face for method calls.
|
||||
Usually, method calls are not fontified.
|
||||
We use this face to prevent calls to methods which look like
|
||||
|
|
|
@ -118,9 +118,13 @@ We currently support only Emacs's etags program with this option."
|
|||
;; when it cannot determine the type of the file.
|
||||
;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
|
||||
(defcustom etags-regen-file-extensions
|
||||
'("rb" "js" "py" "pl" "pm" "el" "c" "cpp" "cc" "h" "hh" "hpp"
|
||||
"java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl"
|
||||
"F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada")
|
||||
'("ads" "adb" "ada" "asm" "ins" "s" "sa" "S" "src"
|
||||
"c" "h" "c++" "cc" "cpp" "cxx" "h++" "hh" "hpp" "hxx" "m" "pdb"
|
||||
"cs" "hs" "erl" "hrl" "fth" "tok" "f" "f90" "for" "go"
|
||||
"java" "cl" "clisp" "el" "lisp" "lsp" "lua" "lm" "p" "pas"
|
||||
"pl" "pm" "php" "php3" "php4" "pc" "prolog" "py" "rb" "ru" "rbw"
|
||||
"rs" "oak" "rkt" "sch" "scheme" "scm" "sm" "ss"
|
||||
"y" "y++" "ym" "yxx" "yy")
|
||||
"Code file extensions for `etags-regen-mode'.
|
||||
|
||||
File extensions to generate the tags for."
|
||||
|
@ -242,11 +246,12 @@ File extensions to generate the tags for."
|
|||
(ir-start (1- (length root)))
|
||||
(ignores-regexps
|
||||
(mapcar #'etags-regen--ignore-regexp
|
||||
etags-regen-ignores)))
|
||||
etags-regen-ignores))
|
||||
(case-fold-search t))
|
||||
(cl-delete-if
|
||||
(lambda (f) (or (not (string-match-p match-re f))
|
||||
(string-match-p "/\\.#" f) ;Backup files.
|
||||
(cl-some (lambda (ignore) (string-match ignore f ir-start))
|
||||
(cl-some (lambda (ignore) (string-match-p ignore f ir-start))
|
||||
ignores-regexps)))
|
||||
files)))
|
||||
|
||||
|
|
|
@ -83,12 +83,12 @@
|
|||
|
||||
;;; Install treesitter language parsers
|
||||
(defvar php-ts-mode--language-source-alist
|
||||
'((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.22.8" "php/src"))
|
||||
'((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.23.0" "php/src"))
|
||||
(phpdoc . ("https://github.com/claytonrcarter/tree-sitter-phpdoc"))
|
||||
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.20.3"))
|
||||
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.21.2"))
|
||||
(jsdoc . ("https://github.com/tree-sitter/tree-sitter-jsdoc" "v0.21.0"))
|
||||
(css . ("https://github.com/tree-sitter/tree-sitter-css" "v0.21.0")))
|
||||
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.23.0"))
|
||||
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.23.0"))
|
||||
(jsdoc . ("https://github.com/tree-sitter/tree-sitter-jsdoc" "v0.23.0"))
|
||||
(css . ("https://github.com/tree-sitter/tree-sitter-css" "v0.23.0")))
|
||||
"Treesitter language parsers required by `php-ts-mode'.
|
||||
You can customize this variable if you want to stick to a specific
|
||||
commit and/or use different parsers.")
|
||||
|
@ -773,6 +773,21 @@ characters of the current line."
|
|||
"__FUNCTION__" "__LINE__" "__METHOD__" "__NAMESPACE__" "__TRAIT__")
|
||||
"PHP predefined constant.")
|
||||
|
||||
(defun php-ts-mode--test-namespace-name-as-prefix-p ()
|
||||
"Return t if the namespace_name_as_prefix keyword is a namded node, nil otherwise."
|
||||
(ignore-errors
|
||||
(progn (treesit-query-compile 'php "(namespace_name_as_prefix)" t) t)))
|
||||
|
||||
(defun php-ts-mode--test-namespace-aliasing-clause-p ()
|
||||
"Return t if the namespace_name_as_prefix keyword is a namded node, nil otherwise."
|
||||
(ignore-errors
|
||||
(progn (treesit-query-compile 'php "(namespace_name_as_prefix)" t) t)))
|
||||
|
||||
(defun php-ts-mode--test-namespace-use-group-clause-p ()
|
||||
"Return t if the namespace_use_group_clause keyword is a namded node, nil otherwise."
|
||||
(ignore-errors
|
||||
(progn (treesit-query-compile 'php "(namespace_use_group_clause)" t) t)))
|
||||
|
||||
(defun php-ts-mode--font-lock-settings ()
|
||||
"Tree-sitter font-lock settings."
|
||||
(treesit-font-lock-rules
|
||||
|
@ -866,7 +881,7 @@ characters of the current line."
|
|||
:language 'php
|
||||
:feature 'definition
|
||||
:override t
|
||||
'((php_tag) @font-lock-preprocessor-face
|
||||
`((php_tag) @font-lock-preprocessor-face
|
||||
("?>") @font-lock-preprocessor-face
|
||||
;; Highlights identifiers in declarations.
|
||||
(class_declaration
|
||||
|
@ -889,10 +904,16 @@ characters of the current line."
|
|||
("=>") @font-lock-keyword-face
|
||||
(object_creation_expression
|
||||
(name) @font-lock-type-face)
|
||||
(namespace_name_as_prefix "\\" @font-lock-delimiter-face)
|
||||
(namespace_name_as_prefix (namespace_name (name)) @font-lock-type-face)
|
||||
(namespace_use_clause (name) @font-lock-property-use-face)
|
||||
(namespace_aliasing_clause (name) @font-lock-type-face)
|
||||
,@(when (php-ts-mode--test-namespace-name-as-prefix-p)
|
||||
'((namespace_name_as_prefix "\\" @font-lock-delimiter-face)
|
||||
(namespace_name_as_prefix
|
||||
(namespace_name (name)) @font-lock-type-face)))
|
||||
,@(if (php-ts-mode--test-namespace-aliasing-clause-p)
|
||||
'((namespace_aliasing_clause (name) @font-lock-type-face))
|
||||
'((namespace_use_clause alias: (name) @font-lock-type-face)))
|
||||
,@(when (not (php-ts-mode--test-namespace-use-group-clause-p))
|
||||
'((namespace_use_group
|
||||
(namespace_use_clause (name) @font-lock-type-face))))
|
||||
(namespace_name "\\" @font-lock-delimiter-face)
|
||||
(namespace_name (name) @font-lock-type-face)
|
||||
(use_declaration (name) @font-lock-property-use-face))
|
||||
|
@ -931,8 +952,10 @@ characters of the current line."
|
|||
:language 'php
|
||||
:feature 'base-clause
|
||||
:override t
|
||||
'((base_clause (name) @font-lock-type-face)
|
||||
`((base_clause (name) @font-lock-type-face)
|
||||
(use_as_clause (name) @font-lock-property-use-face)
|
||||
,@(when (not (php-ts-mode--test-namespace-name-as-prefix-p))
|
||||
'((qualified_name prefix: "\\" @font-lock-delimiter-face)))
|
||||
(qualified_name (name) @font-lock-constant-face))
|
||||
|
||||
:language 'php
|
||||
|
|
|
@ -2666,11 +2666,11 @@ highlighting rules in SQL mode.")
|
|||
"Read a valid SQL product."
|
||||
(let ((init (or (and initial (symbol-name initial)) "ansi")))
|
||||
(intern (completing-read
|
||||
prompt
|
||||
(format-prompt prompt init)
|
||||
(mapcar (lambda (info) (symbol-name (car info)))
|
||||
sql-product-alist)
|
||||
nil 'require-match
|
||||
init 'sql-product-history init))))
|
||||
nil 'sql-product-history init))))
|
||||
|
||||
(defun sql-add-product (product display &rest plist)
|
||||
"Add support for a database product in `sql-mode'.
|
||||
|
@ -2912,7 +2912,7 @@ adds a fontification pattern to fontify identifiers ending in
|
|||
(defun sql-set-product (product)
|
||||
"Set `sql-product' to PRODUCT and enable appropriate highlighting."
|
||||
(interactive
|
||||
(list (sql-read-product "SQL product: ")))
|
||||
(list (sql-read-product "SQL product")))
|
||||
(if (stringp product) (setq product (intern product)))
|
||||
(when (not (assoc product sql-product-alist))
|
||||
(user-error "SQL product %s is not supported; treated as ANSI" product)
|
||||
|
@ -4546,7 +4546,7 @@ the call to \\[sql-product-interactive] with
|
|||
(setq product
|
||||
(cond
|
||||
((= (prefix-numeric-value product) 4) ; C-u, prompt for product
|
||||
(sql-read-product "SQL product: " sql-product))
|
||||
(sql-read-product "SQL product" sql-product))
|
||||
((assoc product sql-product-alist) ; Product specified
|
||||
product)
|
||||
(t sql-product))) ; Default to sql-product
|
||||
|
|
|
@ -4638,16 +4638,17 @@ Return t if test was successful, nil otherwise."
|
|||
(bibtex-progress-message 'done)))))
|
||||
|
||||
(if error-list
|
||||
(let* ((file-p (buffer-file-name))
|
||||
(file (if file-p (file-name-nondirectory file-p) (buffer-name)))
|
||||
(let* ((is-file (buffer-file-name))
|
||||
(file (if is-file (file-name-nondirectory is-file) (buffer-name)))
|
||||
(dir default-directory)
|
||||
(err-buf "*BibTeX validation errors*"))
|
||||
(setq error-list (sort error-list #'car-less-than-car))
|
||||
(with-current-buffer (get-buffer-create err-buf)
|
||||
(setq default-directory dir)
|
||||
(unless (eq major-mode 'compilation-mode) (compilation-mode))
|
||||
(setq-local compilation-parse-errors-filename-function
|
||||
(if file-p #'identity #'get-buffer))
|
||||
(unless is-file
|
||||
(setq-local compilation-parse-errors-filename-function
|
||||
#'get-buffer))
|
||||
(let ((inhibit-read-only t))
|
||||
(delete-region (point-min) (point-max))
|
||||
(insert (substitute-command-keys
|
||||
|
|
|
@ -378,8 +378,15 @@ exists) might be changed."
|
|||
(set-default symbol value)
|
||||
(when (buffer-live-p buf)
|
||||
(with-current-buffer buf
|
||||
(set-visited-file-name
|
||||
(expand-file-name remember-data-file))))))
|
||||
;; Don't unconditionally call `set-visited-file-name'
|
||||
;; because that will probably change the major mode and
|
||||
;; rename the buffer.
|
||||
;; These must be avoided in the case where
|
||||
;; `remember-notes-buffer-name' is "*scratch*", a
|
||||
;; supported configuration.
|
||||
(let ((value (expand-file-name value)))
|
||||
(unless (string= buffer-file-name value)
|
||||
(set-visited-file-name value)))))))
|
||||
:initialize #'custom-initialize-default)
|
||||
|
||||
(defcustom remember-leader-text "** "
|
||||
|
|
|
@ -2037,7 +2037,7 @@ that width."
|
|||
(mapcar (pcase-lambda (`(,key ,sep ,desc ,_doc))
|
||||
(concat
|
||||
(format col-format key sep desc)
|
||||
(make-string (- col-desc-width (length desc)) ?\s)))
|
||||
(make-string (- col-desc-width (string-width desc)) ?\s)))
|
||||
col-keys))))
|
||||
|
||||
(defun which-key--partition-list (n list)
|
||||
|
|
|
@ -93,7 +93,7 @@ TYPES should be a MIME media type symbol, a regexp, or a list
|
|||
that can contain both symbols and regexps.
|
||||
|
||||
HANDLER is a function that will be called with two arguments: The
|
||||
MIME type (a symbol on the form `image/png') and the selection
|
||||
MIME type (a symbol of the form `image/png') and the selection
|
||||
data (a string)."
|
||||
(make-local-variable 'yank-media--registered-handlers)
|
||||
(dolist (type (ensure-list types))
|
||||
|
|
|
@ -719,7 +719,12 @@ The result is a list whose elements are the elements of all the arguments.
|
|||
Each argument may be a list, vector or string.
|
||||
|
||||
All arguments except the last argument are copied. The last argument
|
||||
is just used as the tail of the new list.
|
||||
is just used as the tail of the new list. If the last argument is not
|
||||
a list, this results in a dotted list.
|
||||
|
||||
As an exception, if all the arguments except the last are nil, and the
|
||||
last argument is not a list, the return value is that last argument
|
||||
unaltered, not a list.
|
||||
|
||||
usage: (append &rest SEQUENCES) */)
|
||||
(ptrdiff_t nargs, Lisp_Object *args)
|
||||
|
|
Loading…
Add table
Reference in a new issue