* insert-kbd-macros: restrict completion to macros
@ 2004-10-27 20:44 Alan Shutko
0 siblings, 0 replies; only message in thread
From: Alan Shutko @ 2004-10-27 20:44 UTC (permalink / raw)
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 <ats@acm.org>
* 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 <ats@acm.org> - I am the rocks.
The best location for a Caps Lock key is nailed to the wall!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-27 20:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-27 20:44 insert-kbd-macros: restrict completion to macros Alan Shutko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).