changeset 57969:e661f2202106

(insert-kbd-macro): Do completions based on macros, rather than all commands.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 06 Nov 2004 11:48:25 +0000
parents a1a7e74ce4b5
children 94c708bd270d
files lisp/macros.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/macros.el	Sat Nov 06 11:28:42 2004 +0000
+++ b/lisp/macros.el	Sat Nov 06 11:48:25 2004 +0000
@@ -63,7 +63,14 @@
 
 To save a kbd macro, visit a file of Lisp code such as your `~/.emacs',
 use this command, and then save the file."
-  (interactive "CInsert kbd macro (name): \nP")
+  (interactive (list (intern (completing-read "Insert kbd macro (name): " 
+					      obarray 
+					      (lambda (elt)
+						(and (fboundp elt)
+						     (or (stringp (symbol-function elt))
+							 (vectorp (symbol-function elt)))))
+					      t))
+		     current-prefix-arg))
   (let (definition)
     (if (string= (symbol-name macroname) "")
 	(progn