summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/simple.el12
2 files changed, 15 insertions, 3 deletions
diff --git a/etc/NEWS b/etc/NEWS
index a1255a6f423..34d078b485f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -820,6 +820,12 @@ window after starting). This variable defaults to nil.
** Miscellaneous
---
+*** 'C-s' in 'M-x' now searches over completions again.
+In Emacs 23, typing 'M-x' ('read-extended-command') and then 'C-s' (to
+do an interactive search) would search over possible completions.
+This was lost in Emacs 24, but is now back again.
+
+---
*** 'M-x report-emacs-bug' will no longer include "Recent messages" section.
These were taken from the "*Messages*" buffer, and may inadvertently
leak information from the reporting user.
diff --git a/lisp/simple.el b/lisp/simple.el
index 755d700cd4b..5f1338abb0c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1847,9 +1847,15 @@ to get different commands to edit and resubmit."
(lambda ()
;; Get a command name at point in the original buffer
;; to propose it after M-n.
- (with-current-buffer (window-buffer (minibuffer-selected-window))
- (and (commandp (function-called-at-point))
- (format "%S" (function-called-at-point)))))))
+ (let ((def (with-current-buffer
+ (window-buffer (minibuffer-selected-window))
+ (and (commandp (function-called-at-point))
+ (format "%S" (function-called-at-point)))))
+ (all (sort (minibuffer-default-add-completions)
+ (lambda (a b) (string< a b)))))
+ (if def
+ (cons def (delete def all))
+ all)))))
;; Read a string, completing from and restricting to the set of
;; all defined commands. Don't provide any initial input.
;; Save the command read on the extended-command history list.