emacs-31 e435a8e8692 2/2: Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/emacs into emacs-31

Eli Zaretskii <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit e435a8e8692eef843d548f3c556dd3f25f3b8a70
Merge: 9448f8e3dd3 57e9e94be9b
Author: Eli Zaretskii <[email protected]>
Commit: Eli Zaretskii <[email protected]>

    Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/emacs into emacs-31
---
 doc/emacs/programs.texi    |  6 ++---
 etc/NEWS                   | 56 +++++++++++++++++++++++-----------------------
 lisp/progmodes/hideshow.el |  8 +++----
 lisp/vc/vc-dir.el          | 26 +++++++++++----------
 src/nsterm.m               |  9 ++++----
 5 files changed, 53 insertions(+), 52 deletions(-)

diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 7cf7b2ff96f..b9c5d5beca5 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1761,9 +1761,9 @@ If non-@code{nil}, @code{hs-hide-all}, @code{hs-cycle} and
 @item hs-hide-block-behavior
 This variable controls how @code{hs-hide-block}, @code{hs-cycle},
 @code{hs-hide-level}, and @code{hs-toggle-hiding} should hide a block.
-The possible values can be 'after-bol', hide the innermost block to
-which the current line belongs; or 'after-cursor', hide the block after
-cursor position.
+The possible values can be @code{after-bol} to hide the innermost block
+to which the current line belongs, or @code{after-point} to hide the
+block after point.
 
 @item hs-display-lines-hidden
 If non-@code{nil}, display the number of hidden lines next to the
diff --git a/etc/NEWS b/etc/NEWS
index df39dd9245c..5f5f59d2a9f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -209,11 +209,6 @@ can be overridden for different completion categories by customizing
 "*Completions*" for all minibuffers, or nil to suppress this for all
 minibuffers.
 
----
-*** Support for completion category inheritance.
-You can now define completion categories that inherit properties from
-existing categories, using the new function 'define-completion-category'.
-
 +++
 *** Support for updating "*Completions*" as you type.
 If the "*Completions*" buffer is displayed and the completion table sets
@@ -225,6 +220,11 @@ be overridden for different completion categories by customizing
 be updated as you type, or nil to suppress this always.  Note that for
 large or inefficient completion tables, this can slow down typing.
 
+---
+*** Support for completion category inheritance.
+You can now define completion categories that inherit properties from
+existing categories, using the new function 'define-completion-category'.
+
 +++
 *** New optional value of 'minibuffer-visible-completions'.
 If the value of this option is 'up-down', only the '<UP>' and '<DOWN>'
@@ -1356,13 +1356,6 @@ settings.  In a multi-language major mode it is sometimes necessary to
 replace features from one of the major modes with others that are
 better suited to the new multilingual context.
 
----
-*** New function 'treesit-simple-indent-modify-rules'.
-Given two tree-sitter indent rules, it replaces, adds, or prepends rules
-in the old rules with new ones, then returns the modified rules.  In a
-multi-language major mode it is sometimes necessary to modify rules from
-one of the major modes to better suit the new multilingual context.
-
 +++
 *** New variable 'treesit-aggregated-simple-imenu-settings'.
 This variable allows major modes to setup Imenu for multiple languages.
@@ -1377,6 +1370,13 @@ for multiple languages.
 This new function makes it easier to customize indent rules for
 tree-sitter modes.
 
+---
+*** New function 'treesit-simple-indent-modify-rules'.
+Given two tree-sitter indent rules, it replaces, adds, or prepends rules
+in the old rules with new ones, then returns the modified rules.  In a
+multi-language major mode it is sometimes necessary to modify rules from
+one of the major modes to better suit the new multilingual context.
+
 ---
 *** New variable 'treesit-simple-indent-override-rules'.
 Users can customize this variable to add simple custom indentation rules
@@ -1464,6 +1464,11 @@ This command cycles the visibility state of the current block between
 hiding the parent block, hiding only the nested blocks and showing all
 the blocks.
 
++++
+*** New user option 'hs-cycle-filter' for visibility-cycling with 'TAB'.
+This user option controls the positions on the headline of hideable blocks
+where the 'TAB' key cycles the blocks' visibility.
+
 +++
 *** New command 'hs-toggle-all'.
 This command hides or shows all the blocks in the current buffer.
@@ -1510,12 +1515,7 @@ customize the indicators appearance, but apply only if
 'hs-hide-block', 'hs-hide-level', 'hs-cycle' and 'hs-toggle-hiding' now
 hide the innermost block to which the current line belongs instead of
 the block after point.  To restore the old behavior, set the new user
-option 'hs-hide-block-behavior' to 'after-cursor'.
-
-+++
-*** New user option 'hs-cycle-filter' for visibility-cycling with 'TAB'.
-This user option controls the positions on the headline of hideable blocks
-where the 'TAB' key cycles the blocks' visibility.
+option 'hs-hide-block-behavior' to 'after-point'.
 
 ---
 *** The variable 'hs-special-modes-alist' is now obsolete.
@@ -1637,7 +1637,7 @@ Rules for finding siblings of a PHP file.
 
 ---
 *** New user option 'php-ts-mode-phpdoc-highlight-errors'.
-When non nil, it highlights unknown PHPDOC tags using
+When non-nil, it highlights unknown PHPDOC tags using
 'font-lock-warning-face' so that the user can identify them more easily.
 
 ---
@@ -1952,7 +1952,7 @@ bookmark state that you, or a package that you use, maintains.
 Customize user option 'recentf-autosave-interval' to the number of
 seconds between auto saving recently opened files.  For example,
 customize this variable to 300 to save recently opened files every 5
-minutes.  From Lisp, use 'setopt' not 'setq'.  If
+minutes.  From Lisp, use 'setopt', not 'setq'.  If
 'recentf-autosave-interval' is nil, auto saving is disabled; this is the
 default.
 
@@ -1986,7 +1986,7 @@ extensions by customizing the new user option
 *** You can now regularly auto-save places.
 Customize user option 'save-place-autosave-interval' to the number of
 seconds between auto-saving places.  For example, customize this
-variable to 300 to save places every 5 minutes.  From Lisp, use 'setopt'
+variable to 300 to save places every 5 minutes.  From Lisp, use 'setopt',
 not 'setq'.  If 'save-place-autosave-interval' is nil, auto saving is
 disabled; this is the default.
 
@@ -3599,6 +3599,11 @@ without marking it as automatically buffer-local.
 
 ** Pulse
 
+---
+*** New user option 'pulse-face-duration'.
+This option controls the flash duration for 'flash-face-bell-function'
+and 'flash-echo-area-bell-function'.
+
 ---
 *** New function 'pulse-faces'.
 This function pulses a specified list of faces.  The pulse duration is
@@ -3982,7 +3987,7 @@ frame and be interpreted as a command.
 This specifies the buffers in which 'global-hl-line-mode' should be
 switched on.  The default is all buffers except the minibuffer, and
 buffers that enable 'cursor-face-highlight-mode', like the
-"*Completions*" buffer
+"*Completions*" buffer.
 
 ---
 *** New value 'window' for the user option 'global-hl-line-sticky-flag'.
@@ -4008,11 +4013,6 @@ It is intended to be used in 'ring-bell-function'.
 This function flashes the current frame's echo area briefly.
 It is intended to be used in 'ring-bell-function'.
 
----
-*** New user option 'pulse-face-duration'.
-This option controls the flash duration for 'flash-face-bell-function'
-and 'flash-echo-area-bell-function'.
-
 ---
 *** New user option 'flash-face-faces'.
 This option tells 'flash-face-bell-function' which faces should flash.
@@ -4184,7 +4184,7 @@ The compiler now unifies more constants that are 'equal' for better code
 generation.  This does not affect correct programs but may expose some
 coding mistakes.  For example,
 
-    (eq (cdr '(1 2 3)) '(2 3)))
+    (eq (cdr '(1 2 3)) '(2 3))
 
 may return either nil or t.
 
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 92a85473bc0..7115071d6a7 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -334,15 +334,13 @@ comments too."
 (defcustom hs-hide-block-behavior 'after-bol
   "How hideshow should hide a block.
 If set to `after-bol', hide the innermost block to which the current
-line belongs.
+line belongs.  If set to `after-point', hide the block after point.
 
-If set to `after-cursor', hide the block after cursor position.
-
-This only has effect in `hs-hide-block', `hs-cycle', `hs-hide-level' and
+This affects only the `hs-hide-block', `hs-cycle', `hs-hide-level' and
 `hs-toggle-hiding' commands."
   :type
   '(choice
-    (const :tag "Hide the block after cursor" after-cursor)
+    (const :tag "Hide the block after point" after-point)
     (const :tag "Hide the block after beginning of current line" after-bol))
   :version "31.1")
 
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 50f3a75af68..481c2c42740 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1747,18 +1747,20 @@ These are the commands available for use in the file status buffer:
 	  nil t nil nil)))))
   (unless backend
     (setq backend (vc-responsible-backend dir)))
-  (let (pop-up-windows)		      ; based on cvs-examine; bug#6204
-    (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)))
-  (if (derived-mode-p 'vc-dir-mode)
-      (vc-dir-refresh)
-    ;; FIXME: find a better way to pass the backend to `vc-dir-mode'.
-    (let ((use-vc-backend backend))
-      (vc-dir-mode)
-      ;; Activate the backend-specific minor mode, if any.
-      (when-let* ((minor-mode
-                   (intern-soft (format "vc-dir-%s-mode"
-                                        (downcase (symbol-name backend))))))
-        (funcall minor-mode 1)))))
+  (let ((pop-up-windows)		      ; based on cvs-examine; bug#6204
+        (buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)))
+    (with-current-buffer buffer
+      (if (derived-mode-p 'vc-dir-mode)
+          (vc-dir-refresh)
+        ;; FIXME: find a better way to pass the backend to `vc-dir-mode'.
+        (let ((use-vc-backend backend))
+          (vc-dir-mode)
+          ;; Activate the backend-specific minor mode, if any.
+          (when-let* ((minor-mode
+                       (intern-soft (format "vc-dir-%s-mode"
+                                            (downcase (symbol-name backend))))))
+            (funcall minor-mode 1)))))
+    (pop-to-buffer buffer)))
 
 (defun vc-default-dir-extra-headers (_backend _dir)
   ;; Be loud by default to remind people to add code to display
diff --git a/src/nsterm.m b/src/nsterm.m
index 120442cda25..a5273e93272 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -446,10 +446,11 @@ ev_modifiers_helper (unsigned int flags, unsigned int left_mask,
 /* This is a piece of code which is common to all the event handling
    methods.  Maybe it should even be a function.  */
 #define EV_TRAILER(e)						\
-  {								\
-    XSETFRAME (emacs_event->frame_or_window, emacsframe);	\
-    EV_TRAILER2 (e);						\
-  }
+  if (emacs_event->kind != NO_EVENT)				\
+    {								\
+      XSETFRAME (emacs_event->frame_or_window, emacsframe);	\
+      EV_TRAILER2 (e);						\
+    }
 
 #define EV_TRAILER2(e)                                                  \
   {                                                                     \
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.