diff options
| author | Chong Yidong | 2007-03-08 14:43:08 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-03-08 14:43:08 +0000 |
| commit | ad6aa5eded99de15c5d7273e92f631c054fe0f9a (patch) | |
| tree | 20cfe89e17db3a87f7614410fd9c0b95f91c49fe | |
| parent | 3cfd08fdaec26d3b997e81755061aeacabc0e410 (diff) | |
| download | emacs-ad6aa5eded99de15c5d7273e92f631c054fe0f9a.tar.gz emacs-ad6aa5eded99de15c5d7273e92f631c054fe0f9a.zip | |
(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.
| -rw-r--r-- | lisp/simple.el | 11 |
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'." | |||
| 1005 | 1005 | ||
| 1006 | (defvar read-expression-history nil) | 1006 | (defvar read-expression-history nil) |
| 1007 | 1007 | ||
| 1008 | (defvar minibuffer-completing-symbol nil | ||
| 1009 | "Non-nil means completing a Lisp symbol in the minibuffer.") | ||
| 1010 | |||
| 1008 | (defcustom eval-expression-print-level 4 | 1011 | (defcustom eval-expression-print-level 4 |
| 1009 | "Value for `print-level' while printing value in `eval-expression'. | 1012 | "Value for `print-level' while printing value in `eval-expression'. |
| 1010 | A value of nil means no limit." | 1013 | A value of nil means no limit." |
| @@ -1056,9 +1059,10 @@ the echo area. | |||
| 1056 | If `eval-expression-debug-on-error' is non-nil, which is the default, | 1059 | If `eval-expression-debug-on-error' is non-nil, which is the default, |
| 1057 | this command arranges for all errors to enter the debugger." | 1060 | this command arranges for all errors to enter the debugger." |
| 1058 | (interactive | 1061 | (interactive |
| 1059 | (list (read-from-minibuffer "Eval: " | 1062 | (list (let ((minibuffer-completing-symbol t)) |
| 1060 | nil read-expression-map t | 1063 | (read-from-minibuffer "Eval: " |
| 1061 | 'read-expression-history) | 1064 | nil read-expression-map t |
| 1065 | 'read-expression-history)) | ||
| 1062 | current-prefix-arg)) | 1066 | current-prefix-arg)) |
| 1063 | 1067 | ||
| 1064 | (if (null eval-expression-debug-on-error) | 1068 | (if (null eval-expression-debug-on-error) |
| @@ -5109,6 +5113,7 @@ of the minibuffer before point is always the common substring.)") | |||
| 5109 | (save-excursion | 5113 | (save-excursion |
| 5110 | (skip-chars-backward completion-root-regexp) | 5114 | (skip-chars-backward completion-root-regexp) |
| 5111 | (- (point) (minibuffer-prompt-end))))) | 5115 | (- (point) (minibuffer-prompt-end))))) |
| 5116 | (minibuffer-completing-symbol nil) | ||
| 5112 | ;; Otherwise, in minibuffer, the base size is 0. | 5117 | ;; Otherwise, in minibuffer, the base size is 0. |
| 5113 | ((minibufferp mainbuf) 0))) | 5118 | ((minibufferp mainbuf) 0))) |
| 5114 | (setq common-string-length | 5119 | (setq common-string-length |