aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/simple.el60
2 files changed, 35 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 381aeda8cb4..9d474f3f27f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-04-01 Nicolas Richard <theonewiththeevillook@yahoo.fr>
2
3 * simple.el (command-execute): Do not execute the command when it
4 is disabled; fixes thinko in 2013-02-20 conversion from C. (Bug#17151)
5
12014-03-29 Juri Linkov <juri@jurta.org> 62014-03-29 Juri Linkov <juri@jurta.org>
2 7
3 * dired-aux.el (dired-compress-file): Don't use string-match-p 8 * dired-aux.el (dired-compress-file): Don't use string-match-p
diff --git a/lisp/simple.el b/lisp/simple.el
index 98604a44de5..10a3a98973d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1628,36 +1628,36 @@ a special event, so ignore the prefix argument and don't clear it."
1628 (prog1 prefix-arg 1628 (prog1 prefix-arg
1629 (setq current-prefix-arg prefix-arg) 1629 (setq current-prefix-arg prefix-arg)
1630 (setq prefix-arg nil))))) 1630 (setq prefix-arg nil)))))
1631 (and (symbolp cmd) 1631 (if (and (symbolp cmd)
1632 (get cmd 'disabled) 1632 (get cmd 'disabled))
1633 ;; FIXME: Weird calling convention! 1633 ;; FIXME: Weird calling convention!
1634 (run-hooks 'disabled-command-function)) 1634 (run-hooks 'disabled-command-function)
1635 (let ((final cmd)) 1635 (let ((final cmd))
1636 (while 1636 (while
1637 (progn 1637 (progn
1638 (setq final (indirect-function final)) 1638 (setq final (indirect-function final))
1639 (if (autoloadp final) 1639 (if (autoloadp final)
1640 (setq final (autoload-do-load final cmd))))) 1640 (setq final (autoload-do-load final cmd)))))
1641 (cond 1641 (cond
1642 ((arrayp final) 1642 ((arrayp final)
1643 ;; If requested, place the macro in the command history. For 1643 ;; If requested, place the macro in the command history. For
1644 ;; other sorts of commands, call-interactively takes care of this. 1644 ;; other sorts of commands, call-interactively takes care of this.
1645 (when record-flag 1645 (when record-flag
1646 (push `(execute-kbd-macro ,final ,prefixarg) command-history) 1646 (push `(execute-kbd-macro ,final ,prefixarg) command-history)
1647 ;; Don't keep command history around forever. 1647 ;; Don't keep command history around forever.
1648 (when (and (numberp history-length) (> history-length 0)) 1648 (when (and (numberp history-length) (> history-length 0))
1649 (let ((cell (nthcdr history-length command-history))) 1649 (let ((cell (nthcdr history-length command-history)))
1650 (if (consp cell) (setcdr cell nil))))) 1650 (if (consp cell) (setcdr cell nil)))))
1651 (execute-kbd-macro final prefixarg)) 1651 (execute-kbd-macro final prefixarg))
1652 (t 1652 (t
1653 ;; Pass `cmd' rather than `final', for the backtrace's sake. 1653 ;; Pass `cmd' rather than `final', for the backtrace's sake.
1654 (prog1 (call-interactively cmd record-flag keys) 1654 (prog1 (call-interactively cmd record-flag keys)
1655 (when (and (symbolp cmd) 1655 (when (and (symbolp cmd)
1656 (get cmd 'byte-obsolete-info) 1656 (get cmd 'byte-obsolete-info)
1657 (not (get cmd 'command-execute-obsolete-warned))) 1657 (not (get cmd 'command-execute-obsolete-warned)))
1658 (put cmd 'command-execute-obsolete-warned t) 1658 (put cmd 'command-execute-obsolete-warned t)
1659 (message "%s" (macroexp--obsolete-warning 1659 (message "%s" (macroexp--obsolete-warning
1660 cmd (get cmd 'byte-obsolete-info) "command"))))))))) 1660 cmd (get cmd 'byte-obsolete-info) "command"))))))))))
1661 1661
1662(defvar minibuffer-history nil 1662(defvar minibuffer-history nil
1663 "Default minibuffer history list. 1663 "Default minibuffer history list.