* [PATCH] Keep a separate input history for `customize-variable'
@ 2009-08-08 11:51 Mario Lang
2009-08-08 20:52 ` Juri Linkov
0 siblings, 1 reply; 2+ messages in thread
From: Mario Lang @ 2009-08-08 11:51 UTC (permalink / raw)
To: emacs-devel
When `widget-menu-minibuffer-flag' is t, it can be pretty
anoying to have possibly invalid input in the history
when invoking M-x customize-variable RET.
* cus-edit.el: (custom-variable-prompt-history)
(custom-variable-prompt) Keep a separate input history for
`customize-variable'.
---
lisp/ChangeLog | 6 ++++++
lisp/cus-edit.el | 6 +++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0f8372f..4a13c87 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-08 Mario Lang <mlang@delysid.org>
+
+ * cus-edit.el: (custom-variable-prompt-history)
+ (custom-variable-prompt) Keep a separate input history for
+ `customize-variable'.
+
2009-08-08 Eli Zaretskii <eliz@gnu.org>
* mail/rmail.el (rmail-add-mbox-headers)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 9ad6a05..676532b 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -494,6 +494,9 @@ IF REGEXP is not a string, return it unchanged."
(split-string regexp "\\\\|")
regexp))
+(defvar custom-variable-prompt-history nil
+ "History of input to `custom-variable-prompt'.")
+
(defun custom-variable-prompt ()
"Prompt for a custom variable, defaulting to the variable at point.
Return a list suitable for use in `interactive'."
@@ -504,7 +507,8 @@ Return a list suitable for use in `interactive'."
(setq val (completing-read
(if default (format "Customize variable (default %s): " default)
"Customize variable: ")
- obarray 'custom-variable-p t nil nil default))
+ obarray 'custom-variable-p t nil
+ 'custom-variable-prompt-history default))
(list (if (equal val "")
(if (symbolp v) v nil)
(intern val)))))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Keep a separate input history for `customize-variable'
2009-08-08 11:51 [PATCH] Keep a separate input history for `customize-variable' Mario Lang
@ 2009-08-08 20:52 ` Juri Linkov
0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2009-08-08 20:52 UTC (permalink / raw)
To: Mario Lang; +Cc: emacs-devel
> When `widget-menu-minibuffer-flag' is t, it can be pretty
> anoying to have possibly invalid input in the history
> when invoking M-x customize-variable RET.
Please don't create a separate history variable for every possible
minibuffer prompt. It is better to group them conceptually.
For example, all variable reading commands (`customize-variable',
`describe-variable', `set-variable', `read-variable') could share
the same history.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-08 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-08 11:51 [PATCH] Keep a separate input history for `customize-variable' Mario Lang
2009-08-08 20:52 ` Juri Linkov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.