commit 37bde3d36cb885146e91f2148ec69e2b3714e3f4 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Thu Oct 27 09:21:04 2022 +0300 ; Simplify wording in Eglot manual * doc/misc/eglot.texi (Customizing Eglot): Simplify wording. Reported by Pedro Andres Aranda Gutierrez . diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index cf9607e3b7..5a20028702 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -989,9 +989,10 @@ before actually connecting to the server. Here's an example of defining the workspace-configuration settings for a project that uses two different language servers, one for Python, -whose server is @command{pylsp}, the other one for Go, with -@command{gopls} as its server (presumably, the project is written in a -combination of these two languages): +the other one for Go (presumably, the project is written in a +combination of these two languages). The server for Python in this +case is @command{pylsp}, the server for Go is @command{gopls}. The +value of @code{eglot-workspace-configuration} in this case should be: @lisp ((python-mode commit db2ed9f333879e5ac283fb48c8b06ed4022f0af9 Author: Stefan Kangas Date: Wed Oct 26 22:41:09 2022 +0200 ; Fix several symbol name typos diff --git a/lisp/abbrev.el b/lisp/abbrev.el index a4f0196a78..2ca8e25dac 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -1221,7 +1221,7 @@ SORTFUN is passed to `sort' to change the default ordering." (defface abbrev-table-name '((t :inherit font-lock-function-name-face)) - "Face used for displaying the abbrev table name in `edit-abbrev-mode'." + "Face used for displaying the abbrev table name in `edit-abbrevs-mode'." :version "29.1") (defvar edit-abbrevs-mode-font-lock-keywords diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index b9b1194ccc..dc465a79f2 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -172,7 +172,7 @@ You cannot create projects for the baseclass." (defclass ede-locate-locate (ede-locate-base) () "EDE Locator using the locate command. -Configure the Emacs `locate-program' variable to also +Configure the Emacs `locate-command' variable to also configure the use of EDE locate.") (cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-locate)) diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el index 55eeef453e..b13dc99456 100644 --- a/lisp/cedet/semantic/wisent.el +++ b/lisp/cedet/semantic/wisent.el @@ -38,7 +38,7 @@ (defvar wisent-lex-lookahead nil "Extra lookahead token. -When non-nil it is directly returned by `wisent-lex-function'.") +When non-nil it is directly returned by `wisent-lexer-function'.") (defmacro wisent-lex-eoi () "Return an End-Of-Input lexical token. diff --git a/lisp/ecomplete.el b/lisp/ecomplete.el index dfee073481..b532ef95e7 100644 --- a/lisp/ecomplete.el +++ b/lisp/ecomplete.el @@ -190,7 +190,7 @@ FORCE is non-nil, use TEXT exactly as is." If CHOOSE, allow the user to choose interactively between the matches. -Auto-select when `ecomplete-message-display-abbrev-auto-select' is +Auto-select when `ecomplete-auto-select' is non-nil and there is only a single completion option available." (let* ((matches (ecomplete-get-matches type word)) (match-list (and matches (split-string matches "\n"))) diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index 4ffe6f573c..d461698c88 100644 --- a/lisp/emacs-lisp/backtrace.el +++ b/lisp/emacs-lisp/backtrace.el @@ -753,7 +753,7 @@ property for use by navigation." (defun backtrace--line-length-or-nil () "Return `backtrace-line-length' if valid, nil else." - ;; mirror the logic in `cl-print-to-string-with-limits' + ;; mirror the logic in `cl-print-to-string-with-limit' (and (natnump backtrace-line-length) (not (zerop backtrace-line-length)) backtrace-line-length)) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 5ef2d7fe82..a7e1df3622 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -178,7 +178,7 @@ Earlier variables shadow later ones with the same name.") ;; be displayed when the function's source file will be ;; compiled anyway, but more importantly we would otherwise ;; emit spurious warnings here because we don't have the full - ;; context, such as `declare-functions' placed earlier in the + ;; context, such as `declare-function's placed earlier in the ;; source file's code or `with-suppressed-warnings' that ;; surrounded the `defsubst'. (byte-compile-warnings nil)) diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 8cff06a383..1338ae6e13 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el @@ -96,7 +96,7 @@ Integer values are handled in the `range' slot.") `comp-common-supertype'.") (subtype-p-mem (make-hash-table :test #'equal) :type hash-table :documentation "Serve memoization for -`comp-subtype-p-mem'.") +`comp-cstr-ctxt-subtype-p-mem'.") (union-1-mem-no-range (make-hash-table :test #'equal) :type hash-table :documentation "Serve memoization for `comp-cstr-union-1'.") diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index d619142d64..f3077cbbdb 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -835,8 +835,7 @@ byte-compilation of the new package to fail." If DEPS is non-nil, also activate its dependencies (unless they are already activated). If RELOAD is non-nil, also `load' any files inside the package which -correspond to previously loaded files (those returned by -`package--list-loaded-files')." +correspond to previously loaded files." (let* ((name (package-desc-name pkg-desc)) (pkg-dir (package-desc-dir pkg-desc))) (unless pkg-dir diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el index c590b45fd2..8759282a2a 100644 --- a/lisp/erc/erc-capab.el +++ b/lisp/erc/erc-capab.el @@ -62,7 +62,7 @@ ;; You can customize the prefix and the face used to display it, ;; `erc-capab-identify-unidentified'. If the value of ;; `erc-capab-identify-prefix' is nil or you disable this module (see -;; `erc-capab-identify-disable'), no prefix will be inserted, but the +;; `erc-capab-identify-activated'), no prefix will be inserted, but the ;; flag sent by the server will still be stripped. ;;; Code: diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index 2c8f8fb72b..d8fb879819 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el @@ -1256,7 +1256,7 @@ Signal an error when the network cannot be determined." ;; but aren't being proxied through to a real network. The ;; service may send a 422 but no NETWORK param (or *any* 005s). (let ((m (concat "Failed to determine network. Please set entry for " - erc-server-announced-name " in `erc-network-alist'."))) + erc-server-announced-name " in `erc-networks-alist'."))) (erc-display-error-notice parsed m) (erc-error "Failed to determine network"))) ; beep (setq erc-network name)) diff --git a/lisp/follow.el b/lisp/follow.el index adf1c1b762..c26949985e 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -1301,7 +1301,7 @@ non-first windows in Follow mode." "The buffer current at the last call to `follow-adjust-window' or nil. `follow-mode' is not necessarily enabled in this buffer.") -;; This function is added to `pre-display-function' and is thus called +;; This function is added to `pre-redisplay-function' and is thus called ;; before each redisplay operation. It supersedes (2018-09) the ;; former use of the post command hook, and now does the right thing ;; when a program calls `redisplay' or `sit-for'. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 8d9e50059f..4963fd083f 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1810,7 +1810,7 @@ where unread is an integer count of calculated unread messages (or nil), and info is a regular gnus info entry. The info element is shared with the same element of -`gnus-newrc-alist', so as to conserve space." +`gnus-newsrc-alist', so as to conserve space." (let ((alist gnus-newsrc-alist) (ohashtb gnus-newsrc-hashtb) info method gname rest methods) diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 7bb116d0c5..409befc242 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -152,7 +152,7 @@ certificate." (defcustom smime-CA-file (car (gnutls-trustfiles)) "File containing certificates for CAs you trust. The file should contain certificates in PEM format. By default, -this is initialized from the `gnutls-trusfiles' variable." +this is initialized from the `gnutls-trustfiles' variable." :version "29.1" :type '(choice (const :tag "none" nil) file)) diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 19afdaa278..0a63e0a1dd 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -139,7 +139,7 @@ See `icomplete-delay-completions-threshold'." (defvar icomplete-in-buffer nil "If non-nil, also use Icomplete when completing in non-mini buffers. -This affects commands like `complete-in-region', but not commands +This affects commands like `completion-in-region', but not commands that use their own completions setup.") (defcustom icomplete-minibuffer-setup-hook nil diff --git a/lisp/image/image-dired-external.el b/lisp/image/image-dired-external.el index 026a84560d..b1f8a6c228 100644 --- a/lisp/image/image-dired-external.el +++ b/lisp/image/image-dired-external.el @@ -216,7 +216,7 @@ Each item has the form (ORIGINAL-FILE TARGET-FILE).") "Maximum number of concurrent jobs permitted for generating images. Increase at own risk. If you want to experiment with this, consider setting `image-dired-debug' to a non-nil value to see -the time spent on generating thumbnails. Run `image-clear-cache' +the time spent on generating thumbnails. Run `clear-image-cache' and remove the cached thumbnail files between each trial run.") (defun image-dired-pngnq-thumb (spec) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index eadaf00c4b..b7eeab1735 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1049,7 +1049,7 @@ Each element has the form (TYPE HANDLE), where TYPE is a string and HANDLE is either the symbol `immediate' or `deferred'. Messages in an immediate batch are handled just like regular messages, while deferred messages are stored in -`rcirc-batch-messages'.") +`rcirc-batched-messages'.") (defvar-local rcirc-batch-attributes nil "Alist mapping batch IDs to parameters.") diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index 381e1fcd4f..b2caa62e51 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -385,7 +385,7 @@ Return the buffer associated with the connection." (defun sieve-manage-open (server &optional port stream auth buffer) "Open a network connection to a managesieve SERVER (string). Optional argument PORT is port number (integer) on remote server. -Optional argument STREAM is any of `sieve-manage-streams' (a symbol). +Optional argument STREAM is any of `sieve-manage-stream' (a symbol). Optional argument AUTH indicates authenticator to use, see `sieve-manage-authenticators' for available authenticators. If nil, chooses the best stream the server is capable of. diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 35f19cf03b..e43950f13a 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -5306,7 +5306,7 @@ of what a project is and how to check if it stuck, customize the variable "Hook run when the fancy diary buffer is cleaned up.") (defun org-agenda-cleanup-fancy-diary () - "Remove unwanted stuff in buffer created by `fancy-diary-display'. + "Remove unwanted stuff in buffer created by `diary-fancy-display'. This gets rid of the date, the underline under the date, and the dummy entry installed by Org mode to ensure non-empty diary for each date. It also removes lines that contain only whitespace." diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el index 76a1a71fab..1452f36c11 100644 --- a/lisp/org/ox-ascii.el +++ b/lisp/org/ox-ascii.el @@ -456,7 +456,7 @@ Optional argument JUSTIFY can specify any type of justification among `left', `center', `right' or `full'. A nil value is equivalent to `left'. For a justification that doesn't also fill string, see `org-ascii--justify-lines' and -`org-ascii--justify-block'. +`org-ascii--justify-element'. Return nil if S isn't a string." (when (stringp s) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 1b983e94d7..c587061837 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -618,7 +618,7 @@ Honour `eglot-strict-mode'." (cl-defmacro eglot--dcase (obj &rest clauses) "Like `pcase', but for the LSP object OBJ. CLAUSES is a list (DESTRUCTURE FORMS...) where DESTRUCTURE is -treated as in `eglot-dbind'." +treated as in `eglot--dbind'." (declare (indent 1) (debug (sexp &rest (sexp &rest form)))) (let ((obj-once (make-symbol "obj-once"))) `(let ((,obj-once ,obj)) @@ -2464,7 +2464,7 @@ may be called multiple times (respecting the protocol of (defun eglot-xref-backend () "Eglot xref backend." 'eglot) (defvar eglot--temp-location-buffers (make-hash-table :test #'equal) - "Helper variable for `eglot--handling-xrefs'.") + "Helper variable for `eglot--collecting-xrefs'.") (defvar eglot-xref-lessp-function #'ignore "Compare two `xref-item' objects for sorting.") diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 5bbbfa822f..294cf47087 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1360,8 +1360,9 @@ default) no filter is applied." flymake-mode-line-warning-counter flymake-mode-line-note-counter "]") "Mode-line construct for formatting Flymake diagnostic counters. -This is a suitable place for placing the `flymake-error-counter', -`flymake-warning-counter' and `flymake-note-counter' constructs. +This is a suitable place for placing the `flymake-mode-line-error-counter', +`flymake-mode-line-warning-counter' and `flymake-mode-line-note-counter' +constructs. Separating each of these with space is not necessary." :type '(repeat (choice string symbol))) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 0de3d213a4..dff677e785 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -4359,7 +4359,7 @@ member." "Mapping of local variable names to a string with their value.") (defun gdb-locals-values-handler-custom () - "Store the values of local variables in `gdb-locals-value-map'." + "Store the values of local variables in `gdb-locals-values-table'." (let ((locals-list (bindat-get-field (gdb-mi--partial-output) 'variables))) (dolist (local locals-list) (let ((name (bindat-get-field local 'name)) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index d6b8edaa36..310a9be4f6 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -9630,7 +9630,7 @@ Returns REGEXP and list of ( (signal_name connection_name)... )." (defun verilog-read-auto-template (module) "Look for an auto_template for the instantiation of the given MODULE. -If found returns `verilog-read-auto-template-inside' structure." +If found returns `verilog-read-auto-template-middle' structure." (save-excursion ;; Find beginning (let ((pt (point))) @@ -10024,7 +10024,7 @@ Used for __FLAGS__ in `verilog-expand-command'." (defvar verilog-dir-cache-preserving nil "If true, the directory cache is enabled, and file system changes are ignored. -See `verilog-dir-exists-p' and `verilog-dir-files'.") +See `verilog-dir-file-exists-p' and `verilog-dir-files'.") ;; If adding new cached variable, add also to verilog-preserve-dir-cache (defvar verilog-dir-cache-list nil diff --git a/lisp/subr.el b/lisp/subr.el index e49c22158f..7dfe0ac66c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1296,7 +1296,7 @@ KEY is a string or vector representing a sequence of keystrokes." (defun local-key-binding (keys &optional accept-default) "Return the binding for command KEYS in current local keymap only. -This is a legacy function; see `keymap-local-binding' for the +This is a legacy function; see `keymap-local-lookup' for the recommended function to use instead. KEYS is a string or vector, a sequence of keystrokes. @@ -1310,7 +1310,7 @@ about this." (defun global-key-binding (keys &optional accept-default) "Return the binding for command KEYS in current global keymap only. -This is a legacy function; see `keymap-global-binding' for the +This is a legacy function; see `keymap-global-lookup' for the recommended function to use instead. KEYS is a string or vector, a sequence of keystrokes. diff --git a/lisp/transient.el b/lisp/transient.el index a415858970..f7920e414f 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3501,7 +3501,7 @@ Optional support for popup buttons is also implemented here." (cl-defmethod transient-format-description ((obj transient-child)) "The `description' slot may be a function, in which case that is -called inside the correct buffer (see `transient-insert-group') +called inside the correct buffer (see `transient--insert-group') and its value is returned to the caller." (and-let* ((desc (oref obj description))) (if (functionp desc) diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 1edbd1777c..734b4a0d22 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -823,7 +823,7 @@ Return a list of results." (should (= (comp-tests-tco-f 1 0 10) 55)))) (defun comp-tests-fw-prop-checker-1 (_) - "Check that inside `comp-tests-fw-prop-f' `concat' and `length' are folded." + "Check that inside `comp-tests-fw-prop-1-f' `concat' and `length' are folded." (should (cl-notany #'identity diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 1099fd0467..a9a45d5463 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -263,7 +263,7 @@ must evaluate to a regular expression string." (ert-deftest module--test-assertions--load-non-live-object-with-global-copy () "Check that -module-assertions verify that non-live objects aren't accessed. -This differs from `module--test-assertions-load-non-live-object' +This differs from `module--test-assertions--load-non-live-object' in that it stows away a global reference. The module assertions should nevertheless detect the invalid load." :tags (if (getenv "EMACS_EMBA_CI") '(:unstable)) commit c716d0cf5692ab853c0eb5dc809c765207762cdb Author: Stefan Kangas Date: Wed Oct 26 22:39:56 2022 +0200 ; Use auto-generated docstring in gnus-custom-mode * lisp/gnus/gnus-cus.el (gnus-custom-mode): Change docstring to prefer text auto-generated by 'define-derived-mode' instead. diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 32c475239e..5a0cf77a32 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -41,10 +41,7 @@ The following commands are available:\\ \\[widget-forward] Move to next button or editable field. \\[widget-backward] Move to previous button or editable field. \\[widget-button-click] Activate button under the mouse pointer. -\\[widget-button-press] Activate button under point. - -Entry to this mode calls the value of `gnus-custom-mode-hook' -if that value is non-nil." +\\[widget-button-press] Activate button under point." (use-local-map widget-keymap) ;; Emacs stuff: (when (and (facep 'custom-button-face) commit 4b9e2f8080c2094008e63387fb69060fa5b819ce Author: Stefan Kangas Date: Wed Oct 26 22:33:40 2022 +0200 ; * lisp/textmodes/table.el: Delete reference to ancient version. diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 964f94228b..f81cedc39b 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -266,11 +266,6 @@ ;; all a table is still a part of text in the buffer. Only the ;; special behaviors exist inside each cell through text properties. ;; -;; `table-generate-html' which appeared in earlier releases is -;; deprecated in favor of `table-generate-source'. Now HTML is -;; treated as one of the languages used for describing the table's -;; logical structure. -;; ;; ;; ------- ;; Keymap: commit d73b86a90a34c5a59e365b30083911c3955e6a1a Author: Stefan Kangas Date: Wed Oct 26 22:25:40 2022 +0200 Fix typo in textsec-restriction-level * lisp/international/textsec.el (textsec-restriction-level): * test/lisp/international/textsec-tests.el (test-restriction-level): Fix typo in symbol name `moderately-restrictive'. diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el index 82eba1b5d5..f8ff89c314 100644 --- a/lisp/international/textsec.el +++ b/lisp/international/textsec.el @@ -156,7 +156,7 @@ Levels are (in decreasing order of restrictiveness) `ascii-only', tibetan))) ;; The string is covered by Latin and any one other Recommended ;; script, except Cyrillic, Greek. - 'moderately-retrictive) + 'moderately-restrictive) ;; Fixme `minimally-restrictive' -- needs well-formedness criteria ;; and Identifier Profile. (t diff --git a/test/lisp/international/textsec-tests.el b/test/lisp/international/textsec-tests.el index 6b0773dc40..1f7fb97a6b 100644 --- a/test/lisp/international/textsec-tests.el +++ b/test/lisp/international/textsec-tests.el @@ -77,7 +77,7 @@ (should (eq (textsec-restriction-level "切foo") 'highly-restrictive)) (should (eq (textsec-restriction-level "հfoo") - 'moderately-retrictive)) + 'moderately-restrictive)) (should (eq (textsec-restriction-level "Сirсlе") 'unrestricted))) commit 68548af68ae5aecaf9eb48915584a9b05c33bfb7 Author: Stefan Kangas Date: Wed Oct 26 21:09:14 2022 +0200 Declare variable Info-minibuf-history * lisp/info.el (Info-minibuf-history): Declare variable. (Bug#58786) diff --git a/lisp/info.el b/lisp/info.el index d74cbaaac0..02dde50dd6 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1883,6 +1883,9 @@ See `completing-read' for a description of arguments and usage." (t (complete-with-action code Info-read-node-completion-table string predicate)))) +(defvar Info-minibuf-history nil + "History for `Info-read-node-name'.") + ;; Arrange to highlight the proper letters in the completion list buffer. (defun Info-read-node-name (prompt &optional default) "Read an Info node name with completion, prompting with PROMPT. commit 56706c6946c4f8800fac0f2a5c3516273b01d8eb Author: Filipp Gunbin Date: Wed Oct 26 21:11:28 2022 +0300 Compare addresses case-insensitively in message-update-smtp-method-header * lisp/gnus/message.el (message-update-smtp-method-header): Compare addresses case-insensitively. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index a714e31876..24cba97718 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4385,7 +4385,7 @@ it is left unchanged." (setq method (or (cdr server) res)) (throw 'exit nil)))) ((and (stringp (car server)) - (string= (car server) from)) + (string-equal-ignore-case (car server) from)) (setq method (cdr server)) (throw 'exit nil))))) (when method commit b7e59b9e194ac287fe627ccb26159d2f6f04939b Author: Alan Mackenzie Date: Wed Oct 26 16:02:49 2022 +0000 c-find-decl-spots: Replace an arbitrary search limit by a parameter The old arbitrary limit led to errors thrown whilst fontifying large areas of syntactic whitespace containing "#undef", as in src/comp.c. * lisp/progmodes/cc-engine.el (c-find-decl-spots): Replace the limit argument to two calls of c-forward-syntactic-ws by the parameter `cfd-limit'. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index e71560fa25..ed06807a87 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6693,8 +6693,7 @@ comment at the start of cc-engine.el for more info." ;; syntactic ws. (when (and cfd-match-pos (< cfd-match-pos syntactic-pos)) (goto-char syntactic-pos) - (c-forward-syntactic-ws - (min (+ (point) 2000) (point-max))) + (c-forward-syntactic-ws cfd-limit) (and cfd-continue-pos (< cfd-continue-pos (point)) (setq cfd-token-pos (point)))) @@ -6735,8 +6734,7 @@ comment at the start of cc-engine.el for more info." ;; can't be nested, and that's already been done in ;; `c-find-decl-prefix-search'. (when (> cfd-continue-pos cfd-token-pos) - (c-forward-syntactic-ws - (min (+ (point) 2000) (point-max))) + (c-forward-syntactic-ws cfd-limit) (setq cfd-token-pos (point))) ;; Continue if the following token fails the commit 5d46c0e329b90619b5e36beb376e9c73baf6c44e Author: Mauro Aranda Date: Wed Oct 26 07:29:51 2022 -0300 Make completion-category-overrides choices dynamic See https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01969.html * lisp/minibuffer.el (completion--update-styles-options): New internal function. (completion--styles-type): Use it. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index fd878e077a..4898dfdb98 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -972,21 +972,17 @@ ALL-COMPLETIONS is the function that lists the completions (it should follow the calling convention of `completion-all-completions'), and DOC describes the way this style of completion works.") +(defun completion--update-styles-options (widget) + "Function to keep updated the options in `completion-category-overrides'." + (let ((lst (mapcar (lambda (x) + (list 'const (car x))) + completion-styles-alist))) + (widget-put widget :args (mapcar #'widget-convert lst)) + widget)) + (defconst completion--styles-type `(repeat :tag "insert a new menu to add more styles" - (choice ,@(mapcar (lambda (x) (list 'const (car x))) - completion-styles-alist) - (symbol :tag "Other" - :validate - ,(lambda (widget) - (let ((value (widget-value widget))) - (if (assq value completion-styles-alist) - nil ; Valid. - (widget-put - widget :error - (format "Invalid completion style: %S" - value)) - widget))))))) + (choice :convert-widget completion--update-styles-options))) (defconst completion--cycling-threshold-type '(choice (const :tag "No cycling" nil) commit d6e08ff459df4cda9eda0c5c842313d02851ba3d Author: Eli Zaretskii Date: Wed Oct 26 17:21:45 2022 +0300 Fix rare problems with current-column when text is invisible * src/indent.c (scan_for_column, compute_motion): Don't miss compositions when the position to check for composition happens to be inside invisible text. (Bug#58791) diff --git a/src/indent.c b/src/indent.c index aa905f387b..4bf597a339 100644 --- a/src/indent.c +++ b/src/indent.c @@ -637,6 +637,11 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, scan_byte = CHAR_TO_BYTE (scan); if (scan >= end) goto endloop; + /* We may have over-stepped cmp_it.stop_pos while skipping + the invisible text. If so, update cmp_it.stop_pos. */ + if (scan > cmp_it.stop_pos && cmp_it.id < 0) + composition_reseat_it (&cmp_it, scan, scan_byte, end, + w, -1, NULL, Qnil); } /* Test reaching the goal column. We do this after skipping @@ -1358,6 +1363,9 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, pos = newpos; pos_byte = CHAR_TO_BYTE (pos); } + if (newpos > cmp_it.stop_pos && cmp_it.id < 0) + composition_reseat_it (&cmp_it, pos, pos_byte, to, + win, -1, NULL, Qnil); rarely_quit (++quit_count); } commit 4a1e77ced6b3d00e9ffde5855dbc3df8f9ecd619 Author: Po Lu Date: Wed Oct 26 21:46:41 2022 +0800 Prevent gui_consider_frame_title from restoring dead top frames * src/xdisp.c (unwind_format_mode_line): Check that old_top_frame is live before selecting it. It could have been deleted, which leads to signals when the post-command-hook installed by xterm-set-window-title runs upon the last frame of a terminal being deleted. (gui_consider_frame_title): Rearrange code to be more understandable. diff --git a/src/xdisp.c b/src/xdisp.c index 1f7ac269e4..557cb60631 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13334,7 +13334,10 @@ unwind_format_mode_line (Lisp_Object vector) if (!EQ (frame, WINDOW_FRAME (XWINDOW (old_window)))) Fselect_window (target_frame_window, Qt); - if (!NILP (old_top_frame) && !EQ (old_top_frame, frame)) + if (!NILP (old_top_frame) && !EQ (old_top_frame, frame) + /* This could've been destroyed during the formatting, + possibly because the terminal was deleted. */ + && FRAME_LIVE_P (XFRAME (old_top_frame))) Fselect_frame (old_top_frame, Qt); } @@ -13437,6 +13440,7 @@ void gui_consider_frame_title (Lisp_Object frame) { struct frame *f = XFRAME (frame); + Lisp_Object format_data; if ((FRAME_WINDOW_P (f) || FRAME_MINIBUF_ONLY_P (f) @@ -13481,15 +13485,19 @@ gui_consider_frame_title (Lisp_Object frame) specbind (Qinhibit_redisplay, Qt); /* Switch to the buffer of selected window of the frame. Set up - mode_line_target so that display_mode_element will output into - mode_line_noprop_buf; then display the title. */ - record_unwind_protect (unwind_format_mode_line, - format_mode_line_unwind_data - (f, current_buffer, selected_window, false)); + mode_line_target so that display_mode_element will output + into mode_line_noprop_buf; then display the title. Save the + original frame and selected window, and possibly the topmost + frame of the tty (for tty frames) into a vector; it will be + restored later. */ + + format_data = format_mode_line_unwind_data (f, current_buffer, + selected_window, + false); + record_unwind_protect (unwind_format_mode_line, format_data); Fselect_window (f->selected_window, Qt); - set_buffer_internal_1 - (XBUFFER (XWINDOW (f->selected_window)->contents)); + set_buffer_internal_1 (XBUFFER (XWINDOW (f->selected_window)->contents)); fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format; mode_line_target = MODE_LINE_TITLE; @@ -13502,8 +13510,9 @@ gui_consider_frame_title (Lisp_Object frame) /* Make sure that any raw bytes in the title are properly represented by their multibyte sequences. */ ptrdiff_t nchars = 0; - len = str_as_multibyte ((unsigned char *)title, - mode_line_noprop_buf_end - title, len, &nchars); + len = str_as_multibyte ((unsigned char *) title, + mode_line_noprop_buf_end - title, + len, &nchars); unbind_to (count, Qnil); /* Set the title only if it's changed. This avoids consing in commit 38bcad545125a2cda218835b0210f24ab8db1e9e Author: Basil L. Contovounesios Date: Wed Oct 26 16:35:59 2022 +0300 Pacify recent unused/ignored lexvar warnings Lexvars with special names like 'ignored' or 'unused' are no longer treated specially. * lisp/ansi-color.el (ansi-color-process-output): * lisp/cus-edit.el (customize-apropos-options): * lisp/cus-theme.el (customize-create-theme): * lisp/dired-aux.el (dired-hide-all): * lisp/emacs-lisp/crm.el (crm--choose-completion-string): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-revert): * lisp/ido.el (ido-choose-completion-string): * lisp/international/mule-diag.el (describe-font-internal): * lisp/mail/sendmail.el (sendmail-user-agent-compose): * lisp/progmodes/fortran.el (fortran-uncomment-region): * lisp/progmodes/prolog.el (prolog-inferior-guess-flavor): * lisp/progmodes/ruby-mode.el (ruby-indent-line, ruby-indent-exp): * lisp/url/url.el (url-mm-callback): * lisp/xwidget.el (xwidget-webkit-history-reload): Prepend an underscore to unused function parameter names. * lisp/emacs-lisp/cconv.el (cconv--dummy-var): Remove unused constant. * lisp/files.el (hack-local-variables-filter): Remove unused lexvar. diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 6f1c270c23..5e7015db54 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -418,7 +418,7 @@ and it should apply face FACE to the text between BEG and END.") (setq ansi-color-for-comint-mode 'filter)) ;;;###autoload -(defun ansi-color-process-output (ignored) +(defun ansi-color-process-output (_ignored) "Maybe translate SGR control sequences of comint output into text properties. Depending on variable `ansi-color-for-comint-mode' the comint output is diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index ee32c9c945..e043d9bc17 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1546,7 +1546,7 @@ If TYPE is `groups', include only groups." "*Customize Apropos*"))) ;;;###autoload -(defun customize-apropos-options (regexp &optional ignored) +(defun customize-apropos-options (regexp &optional _ignored) "Customize all loaded customizable options matching REGEXP." (interactive (list (apropos-read-pattern "options"))) (customize-apropos regexp 'options)) diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 90680ff68f..b891f24154 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -142,7 +142,7 @@ remove them from your saved Custom file.\n\n") (widget-create 'push-button :tag " Revert " :help-echo "Revert this buffer to its original state." - :action (lambda (&rest ignored) (revert-buffer))) + :action (lambda (&rest _ignored) (revert-buffer))) (widget-insert "\n\nTheme name : ") (setq custom-theme-name diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 9add96c260..327a4f038b 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3478,7 +3478,7 @@ Use \\[dired-hide-all] to (un)hide all directories." (dired-next-subdir 1 t)))) ;;;###autoload -(defun dired-hide-all (&optional ignored) +(defun dired-hide-all (&optional _ignored) "Hide all subdirectories, leaving only their header lines. If there is already something hidden, make everything visible again. Use \\[dired-hide-subdir] to (un)hide a particular subdirectory." diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 3f27faab11..289e2b0eee 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -130,8 +130,6 @@ Returns a form where all lambdas don't have any free variables." (prog1 (cconv-convert form nil nil) ; Env initially empty. (cl-assert (null cconv-freevars-alist))))) -(defconst cconv--dummy-var (make-symbol "ignored")) - (defun cconv--set-diff (s1 s2) "Return elements of set S1 that are not in set S2." (let ((res '())) diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 6d4b29b552..8e61797315 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -201,7 +201,7 @@ This function is modeled after `minibuffer-complete-and-exit'." (if doexit (exit-minibuffer)))) (defun crm--choose-completion-string (choice buffer base-position - &rest ignored) + &rest _ignored) "Completion string chooser for `completing-read-multiple'. This is called from `choose-completion-string-functions'. It replaces the string that is currently being completed, without diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index c01f3fd4fe..206c10a773 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -374,7 +374,7 @@ Optional arg POS is a buffer position where to look for a fake header; defaults to `point-min'." (overlays-at (or pos (point-min)))) -(defun tabulated-list-revert (&rest ignored) +(defun tabulated-list-revert (&rest _ignored) "The `revert-buffer-function' for `tabulated-list-mode'. It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'." (interactive) diff --git a/lisp/files.el b/lisp/files.el index 3fa0f2f3b8..a282532258 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3863,7 +3863,7 @@ If these settings come from directory-local variables, then DIR-NAME is the name of the associated directory. Otherwise it is nil." ;; Find those variables that we may want to save to ;; `safe-local-variable-values'. - (let (all-vars risky-vars unsafe-vars ignored) + (let (all-vars risky-vars unsafe-vars) (dolist (elt variables) (let ((var (car elt)) (val (cdr elt))) diff --git a/lisp/ido.el b/lisp/ido.el index 1d0082da97..77e4dd447d 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3915,7 +3915,7 @@ If `ido-change-word-sub' cannot be found in WORD, return nil." "Return dotted pair (RES . 1)." (cons res 1)) -(defun ido-choose-completion-string (choice &rest ignored) +(defun ido-choose-completion-string (choice &rest _ignored) (when (ido-active) ;; Insert the completion into the buffer where completion was requested. (and ido-completion-buffer diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index cdf2e527e2..6e49c9cb21 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -812,7 +812,7 @@ but still contains full information about each coding system." (declare-function font-info "font.c" (name &optional frame)) -(defun describe-font-internal (font-info &optional ignored) +(defun describe-font-internal (font-info &optional _ignored) "Print information about a font in FONT-INFO. The IGNORED argument is ignored." (print-list "name (opened by):" (aref font-info 0)) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 387792eb31..3f75faa077 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -550,10 +550,10 @@ This also saves the value of `send-mail-function' via Customize." #'mail-send-and-exit) ;;;###autoload -(defun sendmail-user-agent-compose (&optional to subject other-headers - continue switch-function yank-action - send-actions return-action - &rest ignored) +(defun sendmail-user-agent-compose ( &optional to subject other-headers + continue switch-function yank-action + send-actions return-action + &rest _ignored ) (if switch-function (funcall switch-function "*mail*")) (let ((cc (cdr (assoc-string "cc" other-headers t))) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 6791e2fc9f..9a68c0e6fd 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -957,7 +957,7 @@ With non-nil ARG, uncomments the region." (set-marker save-point nil))) ;; uncomment-region calls this with 3 args. -(defun fortran-uncomment-region (start end &optional ignored) +(defun fortran-uncomment-region (start end &optional _ignored) "Uncomment every line in the region." (fortran-comment-region start end t)) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index f8edc2b1f7..6e2c2513b0 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1311,7 +1311,7 @@ With prefix argument ARG, restart the Prolog process if running before." (prolog-mode-variables) )) -(defun prolog-inferior-guess-flavor (&optional ignored) +(defun prolog-inferior-guess-flavor (&optional _ignored) (setq-local prolog-system (when (or (numberp prolog-system) (markerp prolog-system)) (save-excursion diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 955daa393c..17467b5554 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -849,7 +849,7 @@ The style of the comment is controlled by `ruby-encoding-magic-comment-style'." (back-to-indentation) (current-column))) -(defun ruby-indent-line (&optional ignored) +(defun ruby-indent-line (&optional _ignored) "Correct the indentation of the current Ruby line." (interactive) (ruby-indent-to (ruby-calculate-indent))) @@ -1576,7 +1576,7 @@ With ARG, do it many times. Negative ARG means move forward." ((error))) i)))) -(defun ruby-indent-exp (&optional ignored) +(defun ruby-indent-exp (&optional _ignored) "Indent each line in the balanced expression following the point." (interactive "*P") (let ((here (point-marker)) start top column (nest t)) diff --git a/lisp/url/url.el b/lisp/url/url.el index b4ece5faeb..92057742ca 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -293,7 +293,7 @@ how long to wait for a response before giving up." (declare-function mm-display-part "mm-decode" (handle &optional no-default force)) -(defun url-mm-callback (&rest ignored) +(defun url-mm-callback (&rest _ignored) (let ((handle (mm-dissect-buffer t))) (url-mark-buffer-as-dead (current-buffer)) (with-current-buffer diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 41a1190c64..109748baec 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -1198,7 +1198,7 @@ Press \\\\[xwidget-webkit-isearch-exit] to exit (xwidget-webkit-goto-history xwidget-webkit-history--session id)) (xwidget-webkit-history-reload)) -(defun xwidget-webkit-history-reload (&rest ignored) +(defun xwidget-webkit-history-reload (&rest _ignored) "Reload the current history buffer." (interactive) (setq tabulated-list-entries nil) commit 32dd769ca441a1bd9bf72494472d0a20e195f9af Author: Po Lu Date: Wed Oct 26 20:37:53 2022 +0800 Clean up some event handling code * src/xterm.c (handle_one_xevent): Use dpyinfo where FRAME_DISPLAY_INFO could be substituted for it. diff --git a/src/xterm.c b/src/xterm.c index b061383a2e..9f6112745e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -18917,8 +18917,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_real_positions (f, &f->left_pos, &f->top_pos); /* Perhaps reparented due to a WM restart. Reset this. */ - FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; - FRAME_DISPLAY_INFO (f)->net_supported_window = 0; + dpyinfo->wm_type = X_WMTYPE_UNKNOWN; + dpyinfo->net_supported_window = 0; #ifndef USE_GTK /* The window manager could have restarted and the new @@ -19387,7 +19387,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, *finish = X_EVENT_DROP; #endif - xkey.state |= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f), + xkey.state |= x_emacs_to_x_modifiers (dpyinfo, extra_keyboard_modifiers); modifiers = xkey.state; @@ -19504,7 +19504,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, /* Common for all keysym input events. */ XSETFRAME (inev.ie.frame_or_window, f); inev.ie.modifiers - = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers); + = x_x_to_emacs_modifiers (dpyinfo, modifiers); inev.ie.timestamp = xkey.time; /* First deal with keysyms which have defined @@ -23832,8 +23832,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, xi_compute_root_window_offset_pinch (any, pev); inev.ie.kind = PINCH_EVENT; - inev.ie.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (any), - pev->mods.effective); + inev.ie.modifiers + = x_x_to_emacs_modifiers (dpyinfo, pev->mods.effective); + XSETINT (inev.ie.x, lrint (pev->event_x)); XSETINT (inev.ie.y, lrint (pev->event_y)); XSETFRAME (inev.ie.frame_or_window, any); commit 0fbafe6511619466f9fd8325c80ea71d202f4722 Author: Michael Albinus Date: Wed Oct 26 13:59:37 2022 +0200 ; Tramp copyedit diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el index 0879d6f185..328625b776 100644 --- a/lisp/net/tramp-container.el +++ b/lisp/net/tramp-container.el @@ -133,7 +133,7 @@ see its function help for a description of the format." names))) (defun tramp-kubernetes--current-context-data (vec) - "Return Kubernetes current context data as JSONPATH string." + "Return Kubernetes current context data as JSON string." (with-temp-buffer (when (zerop (tramp-call-process diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 3904348232..cfecd32aba 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4473,7 +4473,7 @@ process to set up. VEC specifies the connection." ;; yes, this is a strong indication that we must expire all ;; connection properties. We start again with ;; `tramp-maybe-open-connection', it will be caught there. The same - ;; check will be applied with the function kept in`tramp-config-check'. + ;; check will be applied with the function kept in `tramp-config-check'. (tramp-message vec 5 "Checking system information") (let* ((old-uname (tramp-get-connection-property vec "uname")) (uname commit 2468b819e2947ebd35ff974c00e984589bd00cc8 Author: Michael Albinus Date: Wed Oct 26 13:58:42 2022 +0200 Modernize `auto-revert-notify-exclude-dir-regexp' * lisp/autorevert.el (auto-revert-notify-exclude-dir-regexp): Use `rx' and `mounted-file-systems'. diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 576659675b..e3d66c04bc 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -297,9 +297,10 @@ You should set this variable through Custom." (defcustom auto-revert-notify-exclude-dir-regexp (concat ;; No mounted file systems. - "^" (regexp-opt '("/afs/" "/media/" "/mnt" "/net/" "/tmp_mnt/")) + mounted-file-systems ;; No remote files. - (unless auto-revert-remote-files "\\|^/[^/|:][^/|]+:")) + (unless auto-revert-remote-files + (rx (| "" (: bol "/" (not (any "/:|")) (1+ (not (any "/|"))) ":"))))) "Regular expression of directories to be excluded from file notifications." :group 'auto-revert :type 'regexp commit e54c3959827eeee3ea60ccaa4918d22b9dce9cc5 Author: Mattias Engdegård Date: Wed Oct 26 10:51:51 2022 +0200 Dynamic validation of styles in completion-category-overrides The type of the defcustom completion-category-overrides must be able to accommodate dynamic changes to completion-styles-alist, because some packages (eglot) make their own additions. This change fixes a failure in test-custom-opts. See discussion at: https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01969.html * lisp/minibuffer.el (completion--styles-type): Add an "Other" case that accepts any symbol which is then validated dynamically against completion-styles-alist. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a9f72d600d..fd878e077a 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -975,7 +975,19 @@ and DOC describes the way this style of completion works.") (defconst completion--styles-type `(repeat :tag "insert a new menu to add more styles" (choice ,@(mapcar (lambda (x) (list 'const (car x))) - completion-styles-alist)))) + completion-styles-alist) + (symbol :tag "Other" + :validate + ,(lambda (widget) + (let ((value (widget-value widget))) + (if (assq value completion-styles-alist) + nil ; Valid. + (widget-put + widget :error + (format "Invalid completion style: %S" + value)) + widget))))))) + (defconst completion--cycling-threshold-type '(choice (const :tag "No cycling" nil) (const :tag "Always cycle" t) commit 0367208e6e9cb7621eb5faa3c44b94948207c5c7 Author: Philip Kaludercic Date: Wed Oct 26 09:33:48 2022 +0200 Allow nil as a valid value for 'ecomplete-filter-regexp' * lisp/ecomplete.el (ecomplete-filter-regexp): Replace user option type. Reported by Mattias Engdegård. diff --git a/lisp/ecomplete.el b/lisp/ecomplete.el index 54d60c84d4..dfee073481 100644 --- a/lisp/ecomplete.el +++ b/lisp/ecomplete.el @@ -88,7 +88,8 @@ string that was matched." (defcustom ecomplete-filter-regexp nil "Regular expression of addresses that should not be stored by ecomplete." - :type 'regexp + :type '(choice (const :tag "None" nil) + (regexp :tag "Regexp")) :version "29.1") ;;; Internal variables.