Mercurial > emacs
comparison lisp/simple.el @ 4894:1574c6c6561f
(eval-expression): Fix typo: missing paren.
(read-expression-map): Use an indirection to minibuffer-local-map rather
than copying it.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Tue, 26 Oct 1993 18:06:48 +0000 |
parents | 20e345c97e28 |
children | 9a42f23df119 |
comparison
equal
deleted
inserted
replaced
4893:c4bab885aa8d | 4894:1574c6c6561f |
---|---|
367 "Major mode not specialized for anything in particular. | 367 "Major mode not specialized for anything in particular. |
368 Other major modes are defined by comparison with this one." | 368 Other major modes are defined by comparison with this one." |
369 (interactive) | 369 (interactive) |
370 (kill-all-local-variables)) | 370 (kill-all-local-variables)) |
371 | 371 |
372 (defvar read-expression-map (copy-keymap minibuffer-local-map) | 372 (defvar read-expression-map (cons 'keymap minibuffer-local-map) |
373 "Minibuffer keymap used for reading Lisp expressions.") | 373 "Minibuffer keymap used for reading Lisp expressions.") |
374 (define-key read-expression-map "\M-\t" 'lisp-complete-symbol) | 374 (define-key read-expression-map "\M-\t" 'lisp-complete-symbol) |
375 | 375 |
376 (put 'eval-expression 'disabled t) | 376 (put 'eval-expression 'disabled t) |
377 | 377 |
384 Value is also consed on to front of the variable `values'." | 384 Value is also consed on to front of the variable `values'." |
385 (interactive | 385 (interactive |
386 (let* ((minibuffer-history-sexp-flag t)) | 386 (let* ((minibuffer-history-sexp-flag t)) |
387 (list (read-from-minibuffer "Eval: " | 387 (list (read-from-minibuffer "Eval: " |
388 nil read-expression-map t | 388 nil read-expression-map t |
389 'read-expression-history))) | 389 'read-expression-history)))) |
390 (setq values (cons (eval expression) values)) | 390 (setq values (cons (eval expression) values)) |
391 (prin1 (car values) t)) | 391 (prin1 (car values) t)) |
392 | 392 |
393 (defun edit-and-eval-command (prompt command) | 393 (defun edit-and-eval-command (prompt command) |
394 "Prompting with PROMPT, let user edit COMMAND and eval result. | 394 "Prompting with PROMPT, let user edit COMMAND and eval result. |