From ec4d29c4494f32acf0ff7c5632a1d951d957f084 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Wed, 30 Aug 2023 20:53:03 -0700 Subject: [PATCH 01/13] Improve performance of treesit_cursor_helper_1 * src/treesit.c: (treesit_cursor_helper_1): Use ts_tree_cursor_goto_first_child_for_byte to speed up traversing among siblings. The "while (ts_node_end_byte (cursor_node) < end_pos)" can be removed with the check added in the loop below. --- src/treesit.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/treesit.c b/src/treesit.c index e359f903f28..19aacc2da7f 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -2876,7 +2876,8 @@ treesit_assume_true (bool val) limit. */ static bool treesit_cursor_helper_1 (TSTreeCursor *cursor, TSNode *target, - uint32_t end_pos, ptrdiff_t limit) + uint32_t start_pos, uint32_t end_pos, + ptrdiff_t limit) { if (limit <= 0) return false; @@ -2885,23 +2886,17 @@ treesit_cursor_helper_1 (TSTreeCursor *cursor, TSNode *target, if (ts_node_eq (cursor_node, *target)) return true; - if (!ts_tree_cursor_goto_first_child (cursor)) + if (ts_tree_cursor_goto_first_child_for_byte (cursor, start_pos) == -1) return false; - /* Skip nodes that definitely don't contain TARGET. */ - while (ts_node_end_byte (cursor_node) < end_pos) - { - if (!ts_tree_cursor_goto_next_sibling (cursor)) - break; - cursor_node = ts_tree_cursor_current_node (cursor); - } - /* Go through each sibling that could contain TARGET. Because of missing nodes (their width is 0), there could be multiple siblings that could contain TARGET. */ while (ts_node_start_byte (cursor_node) <= end_pos) { - if (treesit_cursor_helper_1 (cursor, target, end_pos, limit - 1)) + if (ts_node_end_byte (cursor_node) >= end_pos + && treesit_cursor_helper_1 (cursor, target, start_pos, end_pos, + limit - 1)) return true; if (!ts_tree_cursor_goto_next_sibling (cursor)) @@ -2933,11 +2928,12 @@ treesit_cursor_helper_1 (TSTreeCursor *cursor, TSNode *target, static bool treesit_cursor_helper (TSTreeCursor *cursor, TSNode node, Lisp_Object parser) { + uint32_t start_pos = ts_node_start_byte (node); uint32_t end_pos = ts_node_end_byte (node); TSNode root = ts_tree_root_node (XTS_PARSER (parser)->tree); *cursor = ts_tree_cursor_new (root); - bool success = treesit_cursor_helper_1 (cursor, &node, end_pos, - treesit_recursion_limit); + bool success = treesit_cursor_helper_1 (cursor, &node, start_pos, + end_pos, treesit_recursion_limit); if (!success) ts_tree_cursor_delete (cursor); return success; From 18b292140ee781d8331d4fcf1046394c164d844f Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Thu, 31 Aug 2023 16:00:54 -0700 Subject: [PATCH 02/13] ; * src/treesit.c: Add ts function boilerplate --- src/treesit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/treesit.c b/src/treesit.c index 19aacc2da7f..cb2113b3faf 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -80,6 +80,7 @@ along with GNU Emacs. If not, see . */ #undef ts_tree_cursor_current_node #undef ts_tree_cursor_delete #undef ts_tree_cursor_goto_first_child +#undef ts_tree_cursor_goto_first_child_for_byte #undef ts_tree_cursor_goto_next_sibling #undef ts_tree_cursor_goto_parent #undef ts_tree_cursor_new @@ -147,6 +148,7 @@ DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_copy, (const TSTreeCursor *)); DEF_DLL_FN (TSNode, ts_tree_cursor_current_node, (const TSTreeCursor *)); DEF_DLL_FN (void, ts_tree_cursor_delete, (const TSTreeCursor *)); DEF_DLL_FN (bool, ts_tree_cursor_goto_first_child, (TSTreeCursor *)); +DEF_DLL_FN (int64_t, ts_tree_cursor_goto_first_child_for_byte, (TSTreeCursor *, uint32_t)); DEF_DLL_FN (bool, ts_tree_cursor_goto_next_sibling, (TSTreeCursor *)); DEF_DLL_FN (bool, ts_tree_cursor_goto_parent, (TSTreeCursor *)); DEF_DLL_FN (TSTreeCursor, ts_tree_cursor_new, (TSNode)); @@ -210,6 +212,7 @@ init_treesit_functions (void) LOAD_DLL_FN (library, ts_tree_cursor_current_node); LOAD_DLL_FN (library, ts_tree_cursor_delete); LOAD_DLL_FN (library, ts_tree_cursor_goto_first_child); + LOAD_DLL_FN (library, ts_tree_cursor_goto_first_child_for_byte); LOAD_DLL_FN (library, ts_tree_cursor_goto_next_sibling); LOAD_DLL_FN (library, ts_tree_cursor_goto_parent); LOAD_DLL_FN (library, ts_tree_cursor_new); @@ -267,6 +270,7 @@ init_treesit_functions (void) #define ts_tree_cursor_current_node fn_ts_tree_cursor_current_node #define ts_tree_cursor_delete fn_ts_tree_cursor_delete #define ts_tree_cursor_goto_first_child fn_ts_tree_cursor_goto_first_child +#define ts_tree_cursor_goto_first_child_for_byte fn_ts_tree_cursor_goto_first_child_for_byte #define ts_tree_cursor_goto_next_sibling fn_ts_tree_cursor_goto_next_sibling #define ts_tree_cursor_goto_parent fn_ts_tree_cursor_goto_parent #define ts_tree_cursor_new fn_ts_tree_cursor_new From 3f7598806eb923c907dd2d30e8ef1dea12e672ac Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Fri, 1 Sep 2023 04:41:15 +0300 Subject: [PATCH 03/13] Add syntax-propertize-function to js-ts-mode * lisp/progmodes/js.el (js-ts--s-p-query): New variable (bug#65470). (js-ts--syntax-propertize): New function. (js-ts-mode): Use it. --- lisp/progmodes/js.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 9d2990e7bc9..9b6da4ec2fc 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3829,6 +3829,7 @@ Currently there are `js-mode' and `js-ts-mode'." (append "{}():;,<>/" electric-indent-chars)) ;FIXME: js2-mode adds "[]*". (setq-local electric-layout-rules '((?\; . after) (?\{ . after) (?\} . before))) + (setq-local syntax-propertize-function #'js-ts--syntax-propertize) ;; Tree-sitter setup. (treesit-parser-create 'javascript) @@ -3864,6 +3865,29 @@ Currently there are `js-mode' and `js-ts-mode'." (add-to-list 'auto-mode-alist '("\\(\\.js[mx]\\|\\.har\\)\\'" . js-ts-mode)))) +(defvar js-ts--s-p-query + (when (treesit-available-p) + (treesit-query-compile 'javascript + '(((regex pattern: (regex_pattern) @regexp)) + ((variable_declarator value: (jsx_element) @jsx)) + ((assignment_expression right: (jsx_element) @jsx)) + ((return_statement (jsx_element) @jsx)))))) + +(defun js-ts--syntax-propertize (beg end) + (let ((captures (treesit-query-capture 'javascript js-ts--s-p-query beg end))) + (pcase-dolist (`(,name . ,node) captures) + (let* ((ns (treesit-node-start node)) + (ne (treesit-node-end node)) + (syntax (pcase-exhaustive name + ('regexp + (cl-decf ns) + (cl-incf ne) + (string-to-syntax "\"/")) + ('jsx + (string-to-syntax "|"))))) + (put-text-property ns (1+ ns) 'syntax-table syntax) + (put-text-property (1- ne) ne 'syntax-table syntax))))) + ;;;###autoload (define-derived-mode js-json-mode js-mode "JSON" (setq-local js-enabled-frameworks nil) From a219ee8c314506d4105d9767fe7332d3fd8525a5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 1 Sep 2023 16:08:36 +0300 Subject: [PATCH 04/13] Fix minor bugs in vc-git and vc-hg on Windows uncovered by vc-tests * lisp/vc/vc-hg.el (vc-hg-state-slow): Non-existing files emit a different message on MS-Windows; support that. * lisp/vc/vc-git.el (vc-git-checkin): Make sure 'default-directory' is not nil when calling 'make-nearby-temp-file' on MS-Windows. * test/lisp/vc/vc-tests.el (vc-test--version-diff): Run 'default-directory' through 'file-truename', otherwise the 'vc-test-cvs06-version-diff' test might fail on MS-Windows. --- lisp/vc/vc-git.el | 3 ++- lisp/vc/vc-hg.el | 5 ++++- test/lisp/vc/vc-tests.el | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 218696c05f4..fe6215f47b8 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1014,7 +1014,8 @@ It is based on `log-edit-mode', and has Git-specific extensions." ;; might not support the non-ASCII characters in the log ;; message. Handle also remote files. (if (eq system-type 'windows-nt) - (let ((default-directory (file-name-directory file1))) + (let ((default-directory (or (file-name-directory file1) + default-directory))) (make-nearby-temp-file "git-msg"))))) (when vc-git-patch-string (unless (zerop (vc-git-command nil t nil "diff" "--cached" "--quiet")) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 5bab9aa529e..a89e6520055 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -249,7 +249,10 @@ If `ask', you will be prompted for a branch type." (error nil))))))) (when (and (eq 0 status) (> (length out) 0) - (null (string-match ".*: No such file or directory$" out))) + ;; Posix + (null (or (string-match ".*: No such file or directory$" out) + ;; MS-Windows + (string-match ".*: The system cannot find the file specified$" out)))) (let ((state (aref out 0))) (cond ((eq state ?=) 'up-to-date) diff --git a/test/lisp/vc/vc-tests.el b/test/lisp/vc/vc-tests.el index 11c20d2783c..0a26e25e32a 100644 --- a/test/lisp/vc/vc-tests.el +++ b/test/lisp/vc/vc-tests.el @@ -596,8 +596,9 @@ This checks also `vc-backend' and `vc-responsible-backend'." (let ((vc-handled-backends `(,backend)) (default-directory (file-name-as-directory - (expand-file-name - (make-temp-name "vc-test") temporary-file-directory))) + (file-truename + (expand-file-name + (make-temp-name "vc-test") temporary-file-directory)))) (process-environment process-environment) vc-test--cleanup-hook) (when (eq backend 'Bzr) From 5cbe96d17f67e58091de1653f409d87bcc2b3e99 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 1 Sep 2023 16:33:40 +0300 Subject: [PATCH 05/13] ; Improve documentation of 'char-table-range' * doc/lispref/sequences.texi (Char-Tables): * src/chartab.c (Fchar_table_range): Clarify what 'char-table-range' returns for an argument that is a cons cell. --- doc/lispref/sequences.texi | 3 ++- src/chartab.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index dd5b723b479..c9c6bb31350 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -1645,7 +1645,8 @@ Refers to the element for character @var{char} @item @code{(@var{from} . @var{to})} A cons cell refers to all the characters in the inclusive range -@samp{[@var{from}..@var{to}]}. +@samp{[@var{from}..@var{to}]}. In this case, the function returns the +value for the character specified by @var{from}. @end table @end defun diff --git a/src/chartab.c b/src/chartab.c index 6f0bc28f31b..58bb1658504 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -580,7 +580,8 @@ DEFUN ("char-table-range", Fchar_table_range, Schar_table_range, 2, 2, 0, doc: /* Return the value in CHAR-TABLE for a range of characters RANGE. RANGE should be nil (for the default value), -a cons of character codes (for characters in the range), or a character code. */) +a cons of character codes (for characters in the range), or a character code. +If RANGE is a cons (FROM . TO), the function returns the value for FROM. */) (Lisp_Object char_table, Lisp_Object range) { Lisp_Object val; From 369f2eea100e010d3811a7daee26bbdf05ccde71 Mon Sep 17 00:00:00 2001 From: Ross Timson Date: Thu, 31 Aug 2023 20:28:22 +0100 Subject: [PATCH 06/13] Add "terraform-ls" LSP server to Eglot * lisp/progmodes/eglot.el (eglot-server-programs): Add "terraform-ls", the official Terraform LSP server. (Bug#65671) Copyright-paperwork-exempt: yes --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 890f1e91b86..4c5b9c30d91 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -254,7 +254,8 @@ chosen (interactively or automatically)." . ,(eglot-alternatives '(("marksman" "server") ("vscode-markdown-language-server" "--stdio")))) - (graphviz-dot-mode . ("dot-language-server" "--stdio"))) + (graphviz-dot-mode . ("dot-language-server" "--stdio")) + (terraform-mode . ("terraform-ls" "serve"))) "How the command `eglot' guesses the server to start. An association list of (MAJOR-MODE . CONTACT) pairs. MAJOR-MODE identifies the buffers that are to be managed by a specific From 890a4c209abe0a2e03d317051357308757b26543 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Wed, 30 Aug 2023 17:38:57 +0200 Subject: [PATCH 07/13] Fix `image-auto-resize-on-window-resize' custom :type * lisp/image-mode.el (image-auto-resize-on-window-resize): Change custom :type from integer to number to be able to set below 1 second. (Bug#65626) --- lisp/image-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 336d89dd52d..962e48bd9c6 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -89,7 +89,7 @@ This will always keep the image fit to the window. When non-nil, the value should be a number of seconds to wait before resizing according to the value specified in `image-auto-resize'." :type '(choice (const :tag "No auto-resize on window size change" nil) - (integer :tag "Wait for number of seconds before resize" 1)) + (number :tag "Wait for number of seconds before resize" 1)) :version "27.1" :group 'image) From 60dcea7658a08761f059c3ce7265e873ae6076db Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 1 Sep 2023 22:17:48 +0200 Subject: [PATCH 08/13] Fix two defcustom :types * lisp/frame.el (blink-cursor-blinks): * lisp/url/url-vars.el (url-max-redirections): Revert defcustom :types back to integer. (Bug#65655) --- lisp/frame.el | 2 +- lisp/url/url-vars.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/frame.el b/lisp/frame.el index bf984da0d62..884c2427c0d 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2851,7 +2851,7 @@ Values smaller than 0.2 sec are treated as 0.2 sec." "How many times to blink before using a solid cursor on NS, X, and MS-Windows. Use 0 or negative value to blink forever." :version "24.4" - :type 'natnum + :type 'integer :group 'cursor) (defvar blink-cursor-blinks-done 1 diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 7e2290217d0..ef4b8b2841b 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -331,7 +331,7 @@ undefined." (defcustom url-max-redirections 30 "The maximum number of redirection requests to honor in a HTTP connection. A negative number means to honor an unlimited number of redirection requests." - :type 'natnum + :type 'integer :group 'url) (defcustom url-confirmation-func 'y-or-n-p From 57760f585e2e7f935df18989009fde0a2ca7d01e Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 2 Sep 2023 02:21:54 +0200 Subject: [PATCH 09/13] * lisp/help.el (substitute-quotes): Improve docstring. --- lisp/help.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/help.el b/lisp/help.el index 7902a5c5b14..b384c476eb3 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1449,10 +1449,11 @@ Otherwise, return a new string." (buffer-string))))) (defun substitute-quotes (string) - "Substitute quote characters for display. + "Substitute quote characters in STRING for display. Each grave accent \\=` is replaced by left quote, and each -apostrophe \\=' is replaced by right quote. Left and right quote -characters are specified by `text-quoting-style'." +apostrophe \\=' is replaced by right quote. Which left and right +quote characters to use is determined by the variable +`text-quoting-style'." (cond ((eq (text-quoting-style) 'curve) (string-replace "`" "‘" (string-replace "'" "’" string))) From c32fd92d67e7ec08caf748bfa01073e30d9ac806 Mon Sep 17 00:00:00 2001 From: Jens Schmidt Date: Wed, 16 Aug 2023 23:31:30 +0200 Subject: [PATCH 10/13] Add documentation to plstore.el * lisp/plstore.el: Add link to epa manual. Describe more restrictions. Fix a typo in the examples. Fix terminology. Mark FIXMEs as such. * lisp/plstore.el (plstore-save): Describe edge case when no recipient matches and mark as FIXME. (Bug#63627) --- lisp/plstore.el | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/lisp/plstore.el b/lisp/plstore.el index d18d461d7d1..7dc991aeec7 100644 --- a/lisp/plstore.el +++ b/lisp/plstore.el @@ -24,14 +24,31 @@ ;; Plist based data store providing search and partial encryption. ;; -;; By default, this package uses symmetric encryption, which means +;; By default, this library uses symmetric encryption, which means ;; that you have to enter the password protecting your store more ;; often than you probably expect to. To use public key encryption -;; with this package, create a GnuPG key and customize user option +;; with this library, create a GnuPG key and customize user option ;; `plstore-encrypt-to' to use it. You can then configure the GnuPG ;; agent to adjust caching and expiration of the passphrase for your ;; store. ;; +;; You can read more on these topics in the EasyPG Assistant user's +;; manual (Info node `(epa)'), of which much information also applies +;; to this library. Most notably: +;; +;; - Info node `(epa)GnuPG version compatibility' +;; - Info node `(epa)GnuPG Pinentry' +;; - Info node `(epa)Caching Passphrases' +;; +;; Use only keyword symbols (starting with a colon) as property names +;; in any plist stored with this library. While this library does not +;; actively enforce the use of keyword symbols, it silently assumes +;; that the first character of all property names can be discarded +;; without sacrificing uniqueness of names (FIXME). Likewise, this +;; library does not enforce that the plists provided as input are +;; actually valid and can behave in undefined ways if they are not +;; (FIXME). +;; ;; Creating: ;; ;; ;; Open a new store associated with ~/.emacs.d/auth.plist. @@ -52,8 +69,8 @@ ;; (plstore-close store) ;; ;; Avoid marking one property both as public *and* secret, as the -;; behavior of this package with respect to such duplicate properties -;; is not (yet) defined. +;; behavior of this library with respect to such duplicate properties +;; is not defined (FIXME). ;; ;; Searching: ;; @@ -71,7 +88,7 @@ ;; ;; While the entry "baz" associated with "baz.example.org" has also ;; ;; a secret property `:password', it is encrypted together with ;; ;; `:user' of "bar", so no need to decrypt the secret. -;; (plstore-find store '(:host ("bar.example.org"))) +;; (plstore-find store '(:host ("baz.example.org"))) ;; ;; (plstore-close store) ;; @@ -87,8 +104,8 @@ ;; `:secret-' prefix) is marked as secret. Thus, when you save the ;; buffer, the `:secret-user' property is encrypted as `:user'. Do ;; not use a property consisting solely of the prefix, as the behavior -;; of this package with respect to such properties is not (yet) -;; defined. +;; of this library with respect to such properties is not defined +;; (FIXME). ;; ;; You can toggle the view between encrypted form and the decrypted ;; form with C-c C-c. @@ -101,7 +118,7 @@ ;; Internals: ;; ;; This is information on the internal data structure and functions of -;; this package. None of it should be necessary to actually use it. +;; this library. None of it should be necessary to actually use it. ;; For easier reading, we usually do not distinguish in this internal ;; documentation between a Lisp object and its printed representation. ;; @@ -589,7 +606,11 @@ If no one is selected, symmetric encryption will be performed. " (insert ";;; secret entries\n" (pp-to-string cipher))))) (defun plstore-save (plstore) - "Save PLSTORE to its associated file." + "Save PLSTORE to its associated file. +Save with symmetric encryption or public key encryption depending +on `plstore-encrypt-to'. If `plstore-encrypt-to' is non-nil but +none of the recipients from `plstore-encrypt-to' matches any +GnuPG key, silently save with symmetric encryption." ; (FIXME) (with-current-buffer (plstore--get-buffer plstore) (erase-buffer) (plstore--insert-buffer plstore) From e660ee88e3d3e8d1ec09eabc7c58f65f6a58fd69 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 Sep 2023 10:38:16 +0300 Subject: [PATCH 11/13] ; Remove incorrect example from ELisp Reference manual * doc/lispref/commands.texi (Event Examples): Remove incorrect example of using SIGUSR1 signal as an event. (Bug#65577) --- doc/lispref/commands.texi | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 110b2479d11..d99b0e20211 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2523,16 +2523,6 @@ the @code{track-mouse} macro, that produces an event like this: (mouse-movement (# nil (563 . 205) 532301936)) @end smallexample -To handle a SIGUSR1 signal, define an interactive function, and -bind it to the @code{signal usr1} event sequence: - -@smallexample -(defun usr1-handler () - (interactive) - (message "Got USR1 signal")) -(keymap-global-set " " 'usr1-handler) -@end smallexample - @node Classifying Events @subsection Classifying Events @cindex event type From 2137fdfd55006598da70807361ac7b4b8e44ad22 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 Sep 2023 10:44:50 +0300 Subject: [PATCH 12/13] * lisp/emacs-lisp/gv.el (buffer-local-value): Unobsolete (bug#65555). --- lisp/emacs-lisp/gv.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 6adba6c342f..ecb46152ce1 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -411,7 +411,6 @@ The return value is the last VAL in the list. (gv-define-setter buffer-local-value (val var buf) (macroexp-let2 nil v val `(with-current-buffer ,buf (set (make-local-variable ,var) ,v)))) -(make-obsolete-generalized-variable 'buffer-local-value nil "29.1") (gv-define-expander alist-get (lambda (do key alist &optional default remove testfn) From dbbcf4a6599ff336d0ceb574cca02bb6f696655a Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 2 Sep 2023 09:48:18 +0200 Subject: [PATCH 13/13] Fix fontification of " in edit-kbd-macro * lisp/edmacro.el (edit-kbd-macro): Fix fontification when editing keyboard macros containing the " character. --- lisp/edmacro.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 8734f7cbebe..0b62bf262bc 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -179,7 +179,7 @@ With a prefix argument, format the macro in a more concise way." (setq-local edmacro-finish-hook finish-hook) (setq-local edmacro-store-hook store-hook) (setq-local font-lock-defaults - '(edmacro-mode-font-lock-keywords nil nil nil nil)) + '(edmacro-mode-font-lock-keywords nil nil ((?\" . "w")))) (setq font-lock-multiline nil) (erase-buffer) (insert (substitute-command-keys