unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Could eval-expression be in lisp mode?
@ 2019-09-06 15:54 ndame
  2019-09-06 17:52 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: ndame @ 2019-09-06 15:54 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

I use eval-expression (M-:) a lot for quick scripts which work on a
buffer and it's always annoying my usual elisp abbrevs, for example,
are not available in the minibuffer when editing an expression.

Which raises the question: why isn't the minibuffer in
lisp-interaction-mode when using M-: ?

Is there a drawback?
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Could eval-expression be in lisp mode?
  2019-09-06 15:54 Could eval-expression be in lisp mode? ndame
@ 2019-09-06 17:52 ` Drew Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2019-09-06 17:52 UTC (permalink / raw)
  To: ndame, help-gnu-emacs

> I use eval-expression (M-:) a lot for quick scripts which work on a
> buffer and it's always annoying my usual elisp abbrevs, for example,
> are not available in the minibuffer when editing an expression.
> 
> Which raises the question: why isn't the minibuffer in
> lisp-interaction-mode when using M-: ?
> 
> Is there a drawback?

(FWIW, I never use `lisp-interaction-mode'.  Even
for scratch buffers I use `emacs-lisp-mode'.)

Vanilla `M-:' does at least give you completion
with `TAB' and `M-TAB' (aka `ESC TAB').

I typically want the result in another buffer, in
`emacs-lisp-mode', but I also want to be able to
see it instead in a tooltip.  And I want the command
to respect different print options (so I can have
different values from those for `eval-expression').

I bind `M-:' to `pp-eval-expression', from `pp+.el'.
(Actually, I use `icicle-pp-eval-expression.)

`pp-eval-expression' and other commands in `pp+.el'
read a Lisp expression using `pp-read-expression-map',
not `read-expression-map' (provides indentation and
defun-eval keys).

You can bind any keys you like (in either map),
to get whatever Lisp abbrev support you want.

https://www.emacswiki.org/emacs/PpPlus




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-06 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-06 15:54 Could eval-expression be in lisp mode? ndame
2019-09-06 17:52 ` Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).