aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2022-11-13 15:58:48 +0100
committerStefan Kangas2022-11-13 16:53:31 +0100
commitae1a6b5bdf112716aa4bf08cbb723dc3d393f6ed (patch)
tree5d563991e86e2b45bd2dc9ba0866c536955a8dc5
parent90a7dee79d0b99131ba97d05acc4bf8c9294fc15 (diff)
downloademacs-ae1a6b5bdf112716aa4bf08cbb723dc3d393f6ed.tar.gz
emacs-ae1a6b5bdf112716aa4bf08cbb723dc3d393f6ed.zip
; * lisp/simple.el (execute-extended-command): Improve comments.
-rw-r--r--lisp/simple.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 5f676ea50de..35fe130ab9c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2492,8 +2492,6 @@ Also see `suggest-key-bindings'."
2492(defvar execute-extended-command--binding-timer nil) 2492(defvar execute-extended-command--binding-timer nil)
2493 2493
2494(defun execute-extended-command (prefixarg &optional command-name typed) 2494(defun execute-extended-command (prefixarg &optional command-name typed)
2495 ;; Based on Fexecute_extended_command in keyboard.c of Emacs.
2496 ;; Aaron S. Hawley <aaron.s.hawley(at)gmail.com> 2009-08-24
2497 "Read a command name, then read the arguments and call the command. 2495 "Read a command name, then read the arguments and call the command.
2498To pass a prefix argument to the command you are 2496To pass a prefix argument to the command you are
2499invoking, give a prefix argument to `execute-extended-command'." 2497invoking, give a prefix argument to `execute-extended-command'."
@@ -2540,11 +2538,11 @@ invoking, give a prefix argument to `execute-extended-command'."
2540 ;; flight. 2538 ;; flight.
2541 (when execute-extended-command--binding-timer 2539 (when execute-extended-command--binding-timer
2542 (cancel-timer execute-extended-command--binding-timer)) 2540 (cancel-timer execute-extended-command--binding-timer))
2543 ;; If this command displayed something in the echo area, then
2544 ;; postpone the display of our suggestion message a bit.
2545 (when (and suggest-key-bindings 2541 (when (and suggest-key-bindings
2546 (or binding 2542 (or binding
2547 (and extended-command-suggest-shorter typed))) 2543 (and extended-command-suggest-shorter typed)))
2544 ;; If this command displayed something in the echo area, then
2545 ;; postpone the display of our suggestion message a bit.
2548 (setq delay-before-suggest 2546 (setq delay-before-suggest
2549 (cond 2547 (cond
2550 ((zerop (length (current-message))) 0) 2548 ((zerop (length (current-message))) 0)
@@ -2556,7 +2554,7 @@ invoking, give a prefix argument to `execute-extended-command'."
2556 (symbolp function) 2554 (symbolp function)
2557 (> (length (symbol-name function)) 2)) 2555 (> (length (symbol-name function)) 2))
2558 ;; There's no binding for CMD. Let's try and find the shortest 2556 ;; There's no binding for CMD. Let's try and find the shortest
2559 ;; string to use in M-x. 2557 ;; string to use in M-x. But don't actually do anything yet.
2560 (setq find-shorter t)) 2558 (setq find-shorter t))
2561 (when (or binding find-shorter) 2559 (when (or binding find-shorter)
2562 (setq execute-extended-command--binding-timer 2560 (setq execute-extended-command--binding-timer