summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2007-03-08 14:43:08 +0000
committerChong Yidong <cyd@stupidchicken.com>2007-03-08 14:43:08 +0000
commitad6aa5eded99de15c5d7273e92f631c054fe0f9a (patch)
tree20cfe89e17db3a87f7614410fd9c0b95f91c49fe /lisp/simple.el
parent3cfd08fdaec26d3b997e81755061aeacabc0e410 (diff)
downloademacs-ad6aa5eded99de15c5d7273e92f631c054fe0f9a.tar.gz
(minibuffer-completing-symbol): New var.
(eval-expression): Use it. (completion-setup-function): Don't bind completion-base-size when completing a symbol in the minibuffer.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index c1e61a57fc5..1dd6b802c05 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1005,6 +1005,9 @@ in *Help* buffer. See also the command `describe-char'."
(defvar read-expression-history nil)
+(defvar minibuffer-completing-symbol nil
+ "Non-nil means completing a Lisp symbol in the minibuffer.")
+
(defcustom eval-expression-print-level 4
"Value for `print-level' while printing value in `eval-expression'.
A value of nil means no limit."
@@ -1056,9 +1059,10 @@ the echo area.
If `eval-expression-debug-on-error' is non-nil, which is the default,
this command arranges for all errors to enter the debugger."
(interactive
- (list (read-from-minibuffer "Eval: "
- nil read-expression-map t
- 'read-expression-history)
+ (list (let ((minibuffer-completing-symbol t))
+ (read-from-minibuffer "Eval: "
+ nil read-expression-map t
+ 'read-expression-history))
current-prefix-arg))
(if (null eval-expression-debug-on-error)
@@ -5109,6 +5113,7 @@ of the minibuffer before point is always the common substring.)")
(save-excursion
(skip-chars-backward completion-root-regexp)
(- (point) (minibuffer-prompt-end)))))
+ (minibuffer-completing-symbol nil)
;; Otherwise, in minibuffer, the base size is 0.
((minibufferp mainbuf) 0)))
(setq common-string-length