emacs-diffs
[Top][All Lists]
Advanced

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

master 48d1e6e 3/3: Merge from origin/emacs-28


From: Stefan Kangas
Subject: master 48d1e6e 3/3: Merge from origin/emacs-28
Date: Thu, 2 Dec 2021 11:52:22 -0500 (EST)

branch: master
commit 48d1e6e9d9217918b68daac9b23140bf8e36c2bf
Merge: 8ff1a9d f38dfa5
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Merge from origin/emacs-28
    
    f38dfa56a0 ; Update loaddefs files.
    b3d4b18507 ; make change-history-commit
    334ff0232e * lisp/repeat.el: Use same logic for repeat-check-key and ...
    8230a47ecc * lisp/help.el (help--analyze-key): Prefer posn-set-point ...
    
    # Conflicts:
    #   lisp/ldefs-boot.el
---
 ChangeLog.3     | 32 +++++++++++++++++++++++++++++++-
 lisp/help.el    | 14 +++++---------
 lisp/isearch.el |  4 ++--
 lisp/repeat.el  | 27 ++++++++++++++++-----------
 4 files changed, 54 insertions(+), 23 deletions(-)

diff --git a/ChangeLog.3 b/ChangeLog.3
index 6e62182..fecad62 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -1,3 +1,33 @@
+2021-12-01  Juri Linkov  <juri@linkov.net>
+
+       * lisp/repeat.el: Use same logic for repeat-check-key and 
repeat-exit-timeout.
+
+       * lisp/repeat.el (repeat-check-key): Use for repeat-check-key the same 
logic
+       as is used for repeat-exit-timeout in repeat-post-hook (bug#51390).
+       (repeat-post-hook): Check for repeat-exit-timeout symbol property.
+
+2021-12-01  Juri Linkov  <juri@linkov.net>
+
+       * lisp/help.el (help--analyze-key): Prefer posn-set-point over 
mouse-set-point
+
+       * lisp/help.el (help--analyze-key): Use posn-set-point instead of
+       mouse-set-point that runs the hook mouse-leave-buffer-hook via
+       mouse-minibuffer-check.  Using posn-set-point also unnecessitates
+       extra conditions added in bug#51421.
+
+       * lisp/isearch.el (isearch-describe-key, isearch-describe-mode):
+       Add precautions to not call isearch-update when the executed
+       command exited isearch-mode (bug#51173).
+
+2021-12-01  Stefan Kangas  <stefan@marxist.se>
+
+       Bump Emacs version to 28.0.90
+
+       * README:
+       * configure.ac:
+       * msdos/sed2v2.inp:
+       * nt/README.W32: Bump Emacs version to 28.0.90.
+
 2021-12-01  Alan Mackenzie  <acm@muc.de>
 
        CC Mode: Recognise "struct foo {" as introducing a type declaration
@@ -233383,7 +233413,7 @@
 
 This file records repository revisions from
 commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
-commit 2be090d5d3002e2ddfc8dbe46c29536f7410a86d (inclusive).
+commit 334ff0232e07dad2ff5595b7f85c0f6f5efcb11c (inclusive).
 See ChangeLog.2 for earlier changes.
 
 ;; Local Variables:
diff --git a/lisp/help.el b/lisp/help.el
index 1917ef4..adb2bd8 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -704,18 +704,14 @@ in the selected window."
         (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
                            (memq 'drag modifiers))
                         " at that spot" ""))
-         ;; Use `mouse-set-point' to handle the case when a menu item
+         ;; Use `posn-set-point' to handle the case when a menu item
          ;; is selected from the context menu that should describe KEY
          ;; at the position of mouse click that opened the context menu.
-         ;; When no mouse was involved, don't use `mouse-set-point'.
-         (defn (if (or buffer
-                       ;; Clicks on the menu bar produce "event" that
-                       ;; is just '(menu-bar)', for which
-                       ;; `mouse-set-point' is not useful.
-                       (and (not (windowp (posn-window (event-start event))))
-                            (not (framep (posn-window (event-start event))))))
+         ;; When no mouse was involved, don't use `posn-set-point'.
+         (defn (if buffer
                    (key-binding key t)
-                 (save-excursion (mouse-set-point event) (key-binding key 
t)))))
+                 (save-excursion (posn-set-point (event-end event))
+                                 (key-binding key t)))))
     ;; Handle the case where we faked an entry in "Select and Paste" menu.
     (when (and (eq defn nil)
               (stringp (aref key (1- (length key))))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9dc8525..fcb7d64 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -521,14 +521,14 @@ This is like `describe-bindings', but displays only 
Isearch keys."
   (interactive)
   (let ((display-buffer-overriding-action isearch--display-help-action))
     (call-interactively 'describe-key))
-  (isearch-update))
+  (when isearch-mode (isearch-update)))
 
 (defun isearch-describe-mode ()
   "Display documentation of Isearch mode."
   (interactive)
   (let ((display-buffer-overriding-action isearch--display-help-action))
     (describe-function 'isearch-forward))
-  (isearch-update))
+  (when isearch-mode (isearch-update)))
 
 (defalias 'isearch-mode-help 'isearch-describe-mode)
 
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 5930219..ea6da5d 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -345,7 +345,9 @@ For example, you can set it to <return> like 
`isearch-exit'."
 (defcustom repeat-exit-timeout nil
   "Break the repetition chain of keys after specified timeout.
 When a number, exit the transient repeating mode after idle time
-of the specified number of seconds."
+of the specified number of seconds.
+You can also set the property `repeat-exit-timeout' on the command symbol.
+This property can override the value of this variable."
   :type '(choice (const :tag "No timeout to exit repeating sequence" nil)
                  (number :tag "Timeout in seconds to exit repeating"))
   :group 'convenience
@@ -431,8 +433,9 @@ See `describe-repeat-maps' for a list of all repeatable 
commands."
 
 (defun repeat-check-key (key map)
   "Check if the last key is suitable to activate the repeating MAP."
-  (let ((property (repeat--command-property 'repeat-check-key)))
-    (or (if repeat-check-key (eq property 'no) (not (eq property t)))
+  (let* ((prop (repeat--command-property 'repeat-check-key))
+         (check-key (unless (eq prop 'no) (or prop repeat-check-key))))
+    (or (not check-key)
         (lookup-key map (vector key))
         ;; Try without modifiers:
         (lookup-key map (vector (event-basic-type key))))))
@@ -475,14 +478,16 @@ See `describe-repeat-maps' for a list of all repeatable 
commands."
                   (cancel-timer repeat-exit-timer)
                   (setq repeat-exit-timer nil))
 
-                (when repeat-exit-timeout
-                  (setq repeat-exit-timer
-                        (run-with-idle-timer
-                         repeat-exit-timeout nil
-                         (lambda ()
-                           (setq repeat-in-progress nil)
-                           (funcall exitfun)
-                           (funcall repeat-echo-function nil)))))))))))
+                (let* ((prop (repeat--command-property 'repeat-exit-timeout))
+                       (timeout (unless (eq prop 'no) (or prop 
repeat-exit-timeout))))
+                  (when timeout
+                    (setq repeat-exit-timer
+                          (run-with-idle-timer
+                           timeout nil
+                           (lambda ()
+                             (setq repeat-in-progress nil)
+                             (funcall exitfun)
+                             (funcall repeat-echo-function nil))))))))))))
 
     (setq repeat-map nil)
     (setq repeat--prev-mb (cons (minibuffer-depth) current-minibuffer-command))



reply via email to

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