emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a2f88746b8a 1/3: Merge from origin/emacs-29


From: Eli Zaretskii
Subject: master a2f88746b8a 1/3: Merge from origin/emacs-29
Date: Sat, 28 Oct 2023 05:07:59 -0400 (EDT)

branch: master
commit a2f88746b8a65a22119805174dd6f0d2aedf01c7
Merge: 12d10872f47 5f60913208f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-29
    
    5f60913208f Fix State button for customize-icon (Bug#66635)
    27c71979ff1 ; Another Texinfo fix
    889a550ca08 ; Fix Texinfo warnings
    893c344b4e4 Fix the use of adaptive-fill-regexp in treesit indent preset
    1098c114b74 Fix treesit-install-language-grammar (bug#66673)
    491ee428c08 Fix treesit-explore-mode (bug#66431)
    ee043a2703d tsx-ts-mode--font-lock-compatibility-bb1f97b: Re-fix the ...
---
 doc/lispintro/emacs-lisp-intro.texi  |   1 +
 doc/lispref/errors.texi              |   3 +-
 doc/misc/ede.texi                    | 210 +++++++++++++++++++++++------------
 doc/misc/efaq.texi                   |   9 +-
 doc/misc/octave-mode.texi            |   4 +-
 doc/misc/wisent.texi                 |   3 +-
 lisp/cus-edit.el                     |  71 ++++++++++--
 lisp/emacs-lisp/icons.el             |   6 +-
 lisp/progmodes/typescript-ts-mode.el |   2 +-
 lisp/treesit.el                      |  12 +-
 10 files changed, 222 insertions(+), 99 deletions(-)

diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index fce7583fe91..c5b33ac5eaa 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -15793,6 +15793,7 @@ of the @code{and} expression.
 
 @c colon in printed section title causes problem in Info cross reference
 This way, we avoid an error.
+
 @iftex
 @noindent
 (For information about @code{and}, see
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index db46a6aaf59..4eafe608302 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -246,7 +246,8 @@ signaled when @code{inhibit-interaction} is non-@code{nil} 
and a user
 interaction function (like @code{read-from-minibuffer}) is called.
 @end table
 
-@ignore    The following seem to be unused now.
+@c The following seem to be unused now.
+@ignore
   The following kinds of error, which are classified as special cases of
 @code{arith-error}, can occur on certain systems for invalid use of
 mathematical functions.  @xref{Math Functions}.
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index d49d2296aa7..b4f08b7c4b9 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -1515,7 +1515,8 @@ Make sure placeholder @var{THIS} is replaced with the 
real thing, and pass throu
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-project-placeholder}.
+@item ede-project-placeholder
+@xref{ede-project-placeholder}.
 @table @code
 @item ede-project
 @table @asis
@@ -1801,9 +1802,11 @@ Commit change to local variables in @var{PROJ}.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-project-placeholder}.
+@item ede-project-placeholder
+@xref{ede-project-placeholder}.
 @table @code
-@item @xref{ede-project}.
+@item ede-project
+@xref{ede-project}.
 @table @code
 @item ede-cpp-root-project
 No children
@@ -1923,9 +1926,11 @@ This knows details about or source tree.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-project-placeholder}.
+@item ede-project-placeholder
+@xref{ede-project-placeholder}.
 @table @code
-@item @xref{ede-project}.
+@item ede-project
+@xref{ede-project}.
 @table @code
 @item ede-simple-project
 No children
@@ -1953,9 +1958,11 @@ Commit any change to @var{PROJ} to its file.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-project-placeholder}.
+@item ede-project-placeholder
+@xref{ede-project-placeholder}.
 @table @code
-@item @xref{ede-project}.
+@item ede-project
+@xref{ede-project}.
 @table @code
 @item ede-simple-base-project
 No children
@@ -1983,9 +1990,11 @@ This one project could control a tree of subdirectories.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-project-placeholder}.
+@item ede-project-placeholder
+@xref{ede-project-placeholder}.
 @table @code
-@item @xref{ede-project}.
+@item ede-project
+@xref{ede-project}.
 @table @code
 @item ede-proj-project
 No children
@@ -2173,9 +2182,11 @@ Commit change to local variables in @var{PROJ}.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-project-placeholder}.
+@item ede-project-placeholder
+@xref{ede-project-placeholder}.
 @table @code
-@item @xref{ede-project}.
+@item ede-project
+@xref{ede-project}.
 @table @code
 @item project-am-makefile
 No children
@@ -2215,9 +2226,11 @@ buffer being in order to provide a smart default target 
type.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-project-placeholder}.
+@item ede-project-placeholder
+@xref{ede-project-placeholder}.
 @table @code
-@item @xref{ede-project}.
+@item ede-project
+@xref{ede-project}.
 @table @code
 @item ede-step-project
 No children
@@ -2577,7 +2590,8 @@ Retrieves the slot @code{menu} from an object of class 
@code{ede-target}
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
 @item ede-proj-target
 @table @asis
@@ -2766,9 +2780,11 @@ sources variable.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
 @item ede-proj-target-makefile
 @table @asis
@@ -2864,11 +2880,14 @@ Use @var{CONFIGURATION} as the current configuration to 
query.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
 @item semantic-ede-proj-target-grammar
 No children
@@ -2918,11 +2937,14 @@ Argument @var{THIS} is the target that should insert 
stuff.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
 @item ede-proj-target-makefile-objectcode
 @table @asis
@@ -2980,13 +3002,17 @@ Argument @var{THIS} is the target to get sources from.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
-@item @xref{ede-proj-target-makefile-objectcode}.
+@item ede-proj-target-makefile-objectcode
+@xref{ede-proj-target-makefile-objectcode}.
 @table @code
 @item ede-proj-target-makefile-archive
 No children
@@ -3023,13 +3049,17 @@ Makefile.am generator, so use it to add this important 
bin program.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
-@item @xref{ede-proj-target-makefile-objectcode}.
+@item ede-proj-target-makefile-objectcode
+@xref{ede-proj-target-makefile-objectcode}.
 @table @code
 @item ede-proj-target-makefile-program
 @table @asis
@@ -3102,15 +3132,20 @@ Insert bin_PROGRAMS variables needed by target 
@var{THIS}.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
-@item @xref{ede-proj-target-makefile-objectcode}.
+@item ede-proj-target-makefile-objectcode
+@xref{ede-proj-target-makefile-objectcode}.
 @table @code
-@item @xref{ede-proj-target-makefile-program}.
+@item ede-proj-target-makefile-program
+@xref{ede-proj-target-makefile-program}.
 @table @code
 @item ede-proj-target-makefile-shared-object
 No children
@@ -3162,11 +3197,14 @@ Makefile.am generator, so use it to add this important 
bin program.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
 @item ede-proj-target-elisp
 @table @asis
@@ -3238,13 +3276,17 @@ is found, such as a @code{-version} variable, or the 
standard header.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
-@item @xref{ede-proj-target-elisp}.
+@item ede-proj-target-elisp
+@xref{ede-proj-target-elisp}.
 @table @code
 @item ede-proj-target-elisp-autoloads
 No children
@@ -3353,11 +3395,14 @@ sources variable.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
 @item ede-proj-target-makefile-miscelaneous
 No children
@@ -3409,11 +3454,14 @@ Return a list of files which @var{THIS} target depends 
on.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
-@item @xref{ede-proj-target-makefile}.
+@item ede-proj-target-makefile
+@xref{ede-proj-target-makefile}.
 @table @code
 @item ede-proj-target-makefile-info
 No children
@@ -3495,9 +3543,11 @@ when working in Automake mode.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{ede-proj-target}.
+@item ede-proj-target
+@xref{ede-proj-target}.
 @table @code
 @item ede-proj-target-scheme
 No children
@@ -3539,7 +3589,8 @@ Tweak the configure file (current buffer) to accommodate 
@var{THIS}.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
 @item project-am-target
 @table @asis
@@ -3577,9 +3628,11 @@ Edit the target associated with this file.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{project-am-target}.
+@item project-am-target
+@xref{project-am-target}.
 @table @code
 @item project-am-objectcode
 @table @asis
@@ -3622,11 +3675,14 @@ There are no default header files.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{project-am-target}.
+@item project-am-target
+@xref{project-am-target}.
 @table @code
-@item @xref{project-am-objectcode}.
+@item project-am-objectcode
+@xref{project-am-objectcode}.
 @table @code
 @item project-am-program
 No children
@@ -3660,9 +3716,11 @@ Additional LD args.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{project-am-target}.
+@item project-am-target
+@xref{project-am-target}.
 @table @code
 @item @w{project-am-header.}
 @table @code
@@ -3693,9 +3751,11 @@ Return the default macro to 'edit' for this object.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{project-am-target}.
+@item project-am-target
+@xref{project-am-target}.
 @table @code
 @item @w{project-am-header.}
 @table @code
@@ -3726,9 +3786,11 @@ Return the default macro to 'edit' for this object.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{project-am-target}.
+@item project-am-target
+@xref{project-am-target}.
 @table @code
 @item project-am-lisp
 No children
@@ -3756,9 +3818,11 @@ Return the default macro to 'edit' for this object.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{project-am-target}.
+@item project-am-target
+@xref{project-am-target}.
 @table @code
 @item project-am-texinfo
 No children
@@ -3808,9 +3872,11 @@ files in the project.
 @table @code
 @item eieio-speedbar-directory-button
 @table @code
-@item @xref{ede-target}.
+@item ede-target
+@xref{ede-target}.
 @table @code
-@item @xref{project-am-target}.
+@item project-am-target
+@xref{project-am-target}.
 @table @code
 @item project-am-man
 No children
@@ -4071,7 +4137,8 @@ Tweak the configure file (current buffer) to accommodate 
@var{THIS}.
 @table @code
 @item eieio-instance-inheritor
 @table @code
-@item @xref{ede-compilation-program}.
+@item ede-compilation-program
+@xref{ede-compilation-program}.
 @table @code
 @item ede-compiler
 @table @asis
@@ -4179,9 +4246,11 @@ Return a string based on @var{THIS} representing a make 
object variable.
 @table @code
 @item eieio-instance-inheritor
 @table @code
-@item @xref{ede-compilation-program}.
+@item ede-compilation-program
+@xref{ede-compilation-program}.
 @table @code
-@item @xref{ede-compiler}.
+@item ede-compiler
+@xref{ede-compiler}.
 @table @code
 @item ede-object-compiler
 No children
@@ -4222,7 +4291,8 @@ Insert variables needed by the compiler @var{THIS}.
 @table @code
 @item eieio-instance-inheritor
 @table @code
-@item @xref{ede-compilation-program}.
+@item ede-compilation-program
+@xref{ede-compilation-program}.
 @table @code
 @item ede-linker
 No children
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index d8097a8d21e..631d7016acf 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -2832,9 +2832,12 @@ This may be inconvenient in some setups, so Emacs has 
mechanisms for
 changing the locations of all these files.
 
 @table @code
-@item auto-save-file-name-transforms (@pxref{Auto-Saving,,,elisp, GNU Emacs 
Lisp Reference Manual}).
-@item lock-file-name-transforms (@pxref{File Locks,,,elisp, GNU Emacs Lisp 
Reference Manual}).
-@item backup-directory-alist (@pxref{Making Backups,,,elisp, GNU Emacs Lisp 
Reference Manual}).
+@item auto-save-file-name-transforms
+(@pxref{Auto-Saving,,,elisp, GNU Emacs Lisp Reference Manual}).
+@item lock-file-name-transforms
+(@pxref{File Locks,,,elisp, GNU Emacs Lisp Reference Manual}).
+@item backup-directory-alist
+(@pxref{Making Backups,,,elisp, GNU Emacs Lisp Reference Manual}).
 @end table
 
 For instance, to write all these things to
diff --git a/doc/misc/octave-mode.texi b/doc/misc/octave-mode.texi
index 0a599f64516..bdeaf31cdc0 100644
--- a/doc/misc/octave-mode.texi
+++ b/doc/misc/octave-mode.texi
@@ -146,9 +146,7 @@ An error is signaled if no block to close is found.
 @findex octave-insert-defun
 Insert a function skeleton, prompting for the function's name, arguments
 and return values which have to be entered without parentheses
-(@code{octave-insert-defun}).
-@noindent
-in one of your Emacs startup files.
+(@code{octave-insert-defun}) in one of your Emacs startup files.
 @end table
 
 The following variables can be used to customize Octave mode.
diff --git a/doc/misc/wisent.texi b/doc/misc/wisent.texi
index 2d9fedadcc5..e1fee10d954 100644
--- a/doc/misc/wisent.texi
+++ b/doc/misc/wisent.texi
@@ -383,7 +383,8 @@ On the other hand, @var{precedence} explicitly assign the 
precedence
 level of the given terminal to a rule.
 
 @cindex semantic actions
-@item @anchor{action}action
+@anchor{action}
+@item action
 An action is an optional Emacs Lisp function call, like this:
 
 @code{(identity $1)}
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 706e08d5657..953b8b8b80f 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -5366,11 +5366,6 @@ The following properties have special meanings for this 
widget:
 :hidden-states should be a list of widget states for which the
   widget's initial contents are to be hidden.
 
-:custom-form should be a symbol describing how to display and
-  edit the variable---either `edit' (using edit widgets),
-  `lisp' (as a Lisp sexp), or `mismatch' (should not happen);
-  if nil, use the return value of `custom-variable-default-form'.
-
 :shown-value, if non-nil, should be a list whose `car' is the
   variable value to display in place of the current value.
 
@@ -5383,11 +5378,34 @@ The following properties have special meanings for this 
widget:
   :custom-category 'option
   :custom-state nil
   :custom-form nil
-  :value-create 'custom-icon-value-create
+  :value-create #'custom-icon-value-create
   :hidden-states '(standard)
-  :custom-set 'custom-icon-set
-  :custom-reset-current 'custom-redraw
-  :custom-reset-saved 'custom-variable-reset-saved)
+  :action #'custom-icon-action
+  :custom-set #'custom-icon-set
+  :custom-reset-current #'custom-redraw)
+  ;; Not implemented yet.
+  ;; :custom-reset-saved 'custom-icon-reset-saved)
+
+(defvar custom-icon-extended-menu
+  (let ((map (make-sparse-keymap)))
+    (define-key-after map [custom-icon-set]
+      '(menu-item "Set for Current Session" custom-icon-set
+                  :enable (eq (widget-get custom-actioned-widget :custom-state)
+                              'modified)))
+    (when (or custom-file init-file-user)
+      (define-key-after map [custom-icon-save]
+        '(menu-item "Save for Future Sessions" custom-icon-save
+                    :enable (memq
+                             (widget-get custom-actioned-widget :custom-state)
+                             '(modified set changed)))))
+    (define-key-after map [custom-redraw]
+      '(menu-item "Undo Edits" custom-redraw
+                  :enable (memq
+                           (widget-get custom-actioned-widget :custom-state)
+                           '(modified changed))))
+    map)
+  "A menu for `custom-icon' widgets.
+Used in `custom-icon-action' to show a menu to the user.")
 
 (defun custom-icon-value-create (widget)
   "Here is where you edit the icon's specification."
@@ -5517,6 +5535,24 @@ The following properties have special meanings for this 
widget:
          (custom-add-parent-links widget))
        (custom-add-see-also widget)))))
 
+(defun custom-icon-action (widget &optional event)
+  "Show the menu for `custom-icon' WIDGET.
+Optional EVENT is the location for the menu."
+  (if (eq (widget-get widget :custom-state) 'hidden)
+      (custom-toggle-hide widget)
+    (unless (eq (widget-get widget :custom-state) 'modified)
+      (custom-icon-state-set widget))
+    (custom-redraw-magic widget)
+    (let* ((completion-ignore-case t)
+           (custom-actioned-widget widget)
+           (answer (widget-choose (concat "Operation on "
+                                          (custom-unlispify-tag-name
+                                           (widget-get widget :value)))
+                                  custom-icon-extended-menu
+                                  event)))
+      (when answer
+        (funcall answer widget)))))
+
 (defun custom-toggle-hide-icon (visibility-widget &rest _ignore)
   "Toggle the visibility of a `custom-icon' parent widget.
 By default, this signals an error if the parent has unsaved
@@ -5553,10 +5589,21 @@ changes."
       (user-error "Cannot update hidden icon"))
 
     (setq val (custom--icons-widget-value child))
-    (unless (equal val (icon-complete-spec symbol))
-      (custom-variable-backup-value widget))
+    ;; FIXME: What was the intention here?
+    ;; (unless (equal val (icon-complete-spec symbol))
+    ;;   (custom-variable-backup-value widget))
     (custom-push-theme 'theme-icon symbol 'user 'set val)
-    (custom-redraw-magic widget)))
+    (custom-redraw widget)))
+
+(defun custom-icon-save (widget)
+  "Save value of icon edited by widget WIDGET."
+  (custom-set-icons (cons (widget-value widget)
+                          (list
+                           (custom--icons-widget-value
+                            (car (widget-get widget :children))))))
+  (custom-save-all)
+  (custom-icon-state-set widget)
+  (custom-redraw-magic widget))
 
 ;;;###autoload
 (defun customize-icon (icon)
diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el
index cb08c1a6b81..9a6d26243c7 100644
--- a/lisp/emacs-lisp/icons.el
+++ b/lisp/emacs-lisp/icons.el
@@ -181,9 +181,9 @@ present if the icon is represented by an image."
         (let ((parent-keywords (icon-spec-keywords elem))
               (current-keywords (icon-spec-keywords current)))
           (while parent-keywords
-            (unless (plist-get (car parent-keywords) current-keywords)
-              (nconc current (take 2 parent-keywords))
-              (setq parent-keywords (cddr parent-keywords))))))))
+            (unless (plist-get current-keywords (car parent-keywords))
+              (nconc current (take 2 parent-keywords)))
+            (setq parent-keywords (cddr parent-keywords)))))))
   merged)
 
 (cl-defmethod icons--create ((_type (eql 'image)) icon keywords)
diff --git a/lisp/progmodes/typescript-ts-mode.el 
b/lisp/progmodes/typescript-ts-mode.el
index 01a021c64fc..b976145dbf3 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -166,7 +166,7 @@ Argument LANGUAGE is either `typescript' or `tsx'."
   ;; but then raises an error if the wrong node type is used. So it is
   ;; important to check with the new node type (member_expression)
   (condition-case nil
-      (progn (treesit-query-capture language '(jsx_opening_element 
(member_expression) @capture))
+      (progn (treesit-query-capture language '((jsx_opening_element 
(member_expression) @capture)))
             '((jsx_opening_element
                [(member_expression (identifier)) (identifier)]
                @typescript-ts-jsx-tag-face)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 80bdf164b07..3555396390d 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -1425,8 +1425,10 @@ See `treesit-simple-indent-presets'.")
 
                     (goto-char bol)
                     (setq this-line-has-prefix
-                          (and (looking-at adaptive-fill-regexp)
-                               (match-string 1)))
+                          (and (looking-at-p adaptive-fill-regexp)
+                               (not (string-match-p
+                                     (rx bos (* whitespace) eos)
+                                     (match-string 0)))))
 
                     (forward-line -1)
                     (and (>= (point) comment-start-bol)
@@ -1434,7 +1436,7 @@ See `treesit-simple-indent-presets'.")
                          (looking-at adaptive-fill-regexp)
                          ;; If previous line is an empty line, don't
                          ;; indent.
-                         (not (looking-at (rx (* whitespace) eol)))
+                         (not (looking-at-p (rx (* whitespace) eol)))
                          ;; Return the anchor.  If the indenting line
                          ;; has a prefix and the previous line also
                          ;; has a prefix, indent to the beginning of
@@ -3210,13 +3212,13 @@ window."
               (treesit--explorer-tree-mode)))
           (display-buffer treesit--explorer-buffer
                           (cons nil '((inhibit-same-window . t))))
+          (setq-local treesit--explorer-last-node nil)
           (treesit--explorer-refresh)
           ;; Set up variables and hooks.
           (add-hook 'post-command-hook
                     #'treesit--explorer-post-command 0 t)
           (add-hook 'kill-buffer-hook
                     #'treesit--explorer-kill-explorer-buffer 0 t)
-          (setq-local treesit--explorer-last-node nil)
           ;; Tell `desktop-save' to not save explorer buffers.
           (when (boundp 'desktop-modes-not-to-save)
             (unless (memq 'treesit--explorer-tree-mode
@@ -3354,7 +3356,7 @@ nil, the grammar is installed to the standard location, 
the
                           " ")))
               ;; If success, Save the recipe for the current session.
               (setf (alist-get lang treesit-language-source-alist)
-                    recipe))))
+                    (cdr recipe)))))
       (error
        (display-warning
         'treesit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]