emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Keep a separate input history for `customize-variable'


From: Mario Lang
Subject: [PATCH] Keep a separate input history for `customize-variable'
Date: Sat, 8 Aug 2009 13:51:30 +0200

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  <address@hidden>
+
+       * cus-edit.el: (custom-variable-prompt-history)
+       (custom-variable-prompt) Keep a separate input history for
+       `customize-variable'.
+
 2009-08-08  Eli Zaretskii  <address@hidden>
 
        * 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]