[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116890: Fix for command-execute handling of disa
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs-24 r116890: Fix for command-execute handling of disabled commands |
Date: |
Wed, 02 Apr 2014 06:52:17 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116890
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17151
author: Nicolas Richard <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-04-01 23:51:59 -0700
message:
Fix for command-execute handling of disabled commands
* lisp/simple.el (command-execute): Do not execute the command when it
is disabled; fixes thinko in 2013-02-20 conversion from C.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/simple.el simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-03-29 17:59:36 +0000
+++ b/lisp/ChangeLog 2014-04-02 06:51:59 +0000
@@ -1,3 +1,8 @@
+2014-04-01 Nicolas Richard <address@hidden>
+
+ * simple.el (command-execute): Do not execute the command when it
+ is disabled; fixes thinko in 2013-02-20 conversion from C. (Bug#17151)
+
2014-03-29 Juri Linkov <address@hidden>
* dired-aux.el (dired-compress-file): Don't use string-match-p
=== modified file 'lisp/simple.el'
--- a/lisp/simple.el 2014-03-25 23:30:08 +0000
+++ b/lisp/simple.el 2014-04-02 06:51:59 +0000
@@ -1628,36 +1628,36 @@
(prog1 prefix-arg
(setq current-prefix-arg prefix-arg)
(setq prefix-arg nil)))))
- (and (symbolp cmd)
- (get cmd 'disabled)
- ;; FIXME: Weird calling convention!
- (run-hooks 'disabled-command-function))
- (let ((final cmd))
- (while
- (progn
- (setq final (indirect-function final))
- (if (autoloadp final)
- (setq final (autoload-do-load final cmd)))))
- (cond
- ((arrayp final)
- ;; If requested, place the macro in the command history. For
- ;; other sorts of commands, call-interactively takes care of this.
- (when record-flag
- (push `(execute-kbd-macro ,final ,prefixarg) command-history)
- ;; Don't keep command history around forever.
- (when (and (numberp history-length) (> history-length 0))
- (let ((cell (nthcdr history-length command-history)))
- (if (consp cell) (setcdr cell nil)))))
- (execute-kbd-macro final prefixarg))
- (t
- ;; Pass `cmd' rather than `final', for the backtrace's sake.
- (prog1 (call-interactively cmd record-flag keys)
- (when (and (symbolp cmd)
- (get cmd 'byte-obsolete-info)
- (not (get cmd 'command-execute-obsolete-warned)))
- (put cmd 'command-execute-obsolete-warned t)
- (message "%s" (macroexp--obsolete-warning
- cmd (get cmd 'byte-obsolete-info) "command")))))))))
+ (if (and (symbolp cmd)
+ (get cmd 'disabled))
+ ;; FIXME: Weird calling convention!
+ (run-hooks 'disabled-command-function)
+ (let ((final cmd))
+ (while
+ (progn
+ (setq final (indirect-function final))
+ (if (autoloadp final)
+ (setq final (autoload-do-load final cmd)))))
+ (cond
+ ((arrayp final)
+ ;; If requested, place the macro in the command history. For
+ ;; other sorts of commands, call-interactively takes care of this.
+ (when record-flag
+ (push `(execute-kbd-macro ,final ,prefixarg) command-history)
+ ;; Don't keep command history around forever.
+ (when (and (numberp history-length) (> history-length 0))
+ (let ((cell (nthcdr history-length command-history)))
+ (if (consp cell) (setcdr cell nil)))))
+ (execute-kbd-macro final prefixarg))
+ (t
+ ;; Pass `cmd' rather than `final', for the backtrace's sake.
+ (prog1 (call-interactively cmd record-flag keys)
+ (when (and (symbolp cmd)
+ (get cmd 'byte-obsolete-info)
+ (not (get cmd 'command-execute-obsolete-warned)))
+ (put cmd 'command-execute-obsolete-warned t)
+ (message "%s" (macroexp--obsolete-warning
+ cmd (get cmd 'byte-obsolete-info)
"command"))))))))))
(defvar minibuffer-history nil
"Default minibuffer history list.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116890: Fix for command-execute handling of disabled commands,
Glenn Morris <=