[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
insert-kbd-macros: restrict completion to macros
From: |
Alan Shutko |
Subject: |
insert-kbd-macros: restrict completion to macros |
Date: |
Wed, 27 Oct 2004 15:44:39 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
I noticed that completion for insert-kbd-macros offers all command
names for completions, rather than just macros. This makes completion
for this command much less useful. I suggest the following patch
limiting completion to macros:
2004-10-27 Alan Shutko <address@hidden>
* macros.el (insert-kbd-macro): Do completions based on macros,
rather than all commands.
--- macros.el 22 Sep 2004 10:04:02 -0500 1.42
+++ macros.el 27 Oct 2004 15:39:53 -0500
@@ -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
--
Alan Shutko <address@hidden> - I am the rocks.
The best location for a Caps Lock key is nailed to the wall!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- insert-kbd-macros: restrict completion to macros,
Alan Shutko <=