Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ecb7ad00
Commit
ecb7ad00
authored
Aug 24, 1997
by
Richard M. Stallman
Browse files
(eval-expression): Prefix arg means insert value in current buffer.
parent
b87fe54b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lisp/simple.el
lisp/simple.el
+6
-3
No files found.
lisp/simple.el
View file @
ecb7ad00
...
...
@@ -514,15 +514,18 @@ Other major modes are defined by comparison with this one."
;; We define this, rather than making `eval' interactive,
;; for the sake of completion of names like eval-region, eval-current-buffer.
(
defun
eval-expression
(
eval-expression-arg
)
(
defun
eval-expression
(
eval-expression-arg
&optional
eval-expression-insert-value
)
"Evaluate EXPRESSION and print value in minibuffer.
Value is also consed on to front of the variable `values'."
(
interactive
(
list
(
read-from-minibuffer
"Eval: "
nil
read-expression-map
t
'read-expression-history
)))
'read-expression-history
)
current-prefix-arg
))
(
setq
values
(
cons
(
eval
eval-expression-arg
)
values
))
(
prin1
(
car
values
)
t
))
(
prin1
(
car
values
)
(
if
eval-expression-insert-value
(
current-buffer
)
t
)))
(
defun
edit-and-eval-command
(
prompt
command
)
"Prompting with PROMPT, let user edit COMMAND and eval result.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment