[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and
From: |
Lars Ingebrigtsen |
Subject: |
bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp |
Date: |
Wed, 23 Mar 2022 15:06:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Visuwesh <visuweshm@gmail.com> writes:
> The notion of "last sexp" is different for eval-last-sexp and
> pp-eval-last-sexp as seen by the following,
>
> ,(list 1 2 3)
>
> eval-last-sexp echoes (1 2 3) in the echo area but pp-eval-last-sexp
> signals an error. I am not sure which one is more correct, but
> eval-last-sexp behaviour is more convenient (and backward-sexp when
> after the closing parenthesis places the point after , too...).
The pp function uses (forward-sexp -1) to determine where the preceding
expression begins, which seems natural. (And it skips to before the
comma.)
The non-pp function uses (elisp--preceding-sexp), which basically does
the same, but then explicitly skips past the comma.
I think the non-pp function has the most convenient behaviour, so I'd be
in favour of changing it to just use (elisp--preceding-sexp). Any opinions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Visuwesh, 2022/03/23
- bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp,
Lars Ingebrigtsen <=
- bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Drew Adams, 2022/03/23
- bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Visuwesh, 2022/03/23
- bug#54537: Re: bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Drew Adams, 2022/03/23
- bug#54537: Re: bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Michael Heerdegen, 2022/03/23
- bug#54537: Re: bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Drew Adams, 2022/03/23
- bug#54537: Re: bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Michael Heerdegen, 2022/03/23
- bug#54537: Re: bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Drew Adams, 2022/03/23
- bug#54537: Re: bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Visuwesh, 2022/03/23
bug#54537: 29.0.50; Last sexp notion is different for eval-last-sexp and pp-eval-last-sexp, Lars Ingebrigtsen, 2022/03/25