unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Drew Adams <drew.adams@oracle.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 19362@debbugs.gnu.org
Subject: bug#19362: 25.0.50; Fix `pp.el' in line with new `elisp-mode.el'
Date: Wed, 6 Jul 2016 16:39:15 -0400	[thread overview]
Message-ID: <CAM-tV-9_RnUjUtTKE0y5KsatvHXXsTkVEdTyUY_7L=4nfDaH3g@mail.gmail.com> (raw)
In-Reply-To: <b8392264-7645-4247-beea-0da4dacc35f4@default>

On Thu, Jun 30, 2016 at 11:07 PM, Drew Adams <drew.adams@oracle.com> wrote:
>> >> Do you have a list of things that you think should be aligned?
>> >
>> > No, but diff of the source code should show it. ;-)
>>
>> I tried diffing pp.el and elisp-mode.el, but it was unenlightening.
>> Like this bug report.
>
> Yes, well, it's quite difficult.  Some of the code from lisp-mode.el
> was moved to elisp-mode.el.  And then it was modified, in some cases
> radically.  Dunno why, except that some of the changes seem to have
> involved integrating eldoc.  But most of the changes presumably do not
> concern this bug, which is only about the part of lisp-mode.el that
> had functions that correspond to pp.el functions.)
>
> ===> The starting point is `eval-last-sexp', which used to correspond
> directly with `pp-eval-last-sexp'.  The former was (presumably)
> improved, but the latter was not modified similarly.
>
> Some functions were renamed to add the prefix `elisp-' or `elisp--'
> (e.g. `elisp--preceding-sexp', `elisp--eval-last-sexp',
> `elisp--eval-last-sexp-print-value', `elisp--eval-last-sexp-fake-value',
> `elisp--eval-defun-1', `elisp--eval-defun'), so knowing that can help.
> In some cases they were just renamed.  In other cases the code was
> changed quite a bit.  But again, this bug is only about the pp-like
> code.
>
> This is not something you will understand in 5 minutes.  It likely
> requires understanding the changes that were made to `eval-last-sexp'
> and its supporting functions, and then doing the right thing (not
> necessarily exactly the same thing) for `pp-eval-last-sexp'.  The
> pp.el code was slightly different from the Emacs 24.4 (and prior)
> lisp-mode.el code (different helper functions, and one does not
> involve pretty-printing), but they generally mirror one another.
> Using their former correspondence as a guide should help.
>
> I cannot help more than this.  It is unfortunate that the person
> who changed the non-pp version did not think to act similarly for
> the pp version.  I discovered it late, myself.  Once things are
> properly understood, perhaps the code fix will be minor.  Dunno.

But do you know of any concrete cases where there is a difference in
behaviour? Or is this report just about code duplication (or lack
thereof)?

I found #10495 "pp-eval-last-sexp doesn't work on a `symbol' in
quotes", but that was reported against 24.0.92, so perhaps these
functions were in fact never "aligned"?





  reply	other threads:[~2016-07-06 20:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13  2:46 bug#19362: 25.0.50; Fix `pp.el' in line with new `elisp-mode.el' Drew Adams
2016-04-30 16:26 ` Lars Ingebrigtsen
2016-04-30 17:36   ` Drew Adams
2016-04-30 17:43     ` Lars Ingebrigtsen
2016-04-30 18:16       ` Drew Adams
2016-04-30 18:33         ` Lars Ingebrigtsen
2016-07-01  2:04         ` npostavs
2016-07-01  3:07           ` Drew Adams
2016-07-06 20:39             ` Noam Postavsky [this message]
2016-07-06 22:35               ` Drew Adams
2016-07-06 23:36                 ` Noam Postavsky
2016-07-06 23:51                   ` Drew Adams
2016-07-07  0:26                     ` npostavs
2016-07-07  2:34                       ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV-9_RnUjUtTKE0y5KsatvHXXsTkVEdTyUY_7L=4nfDaH3g@mail.gmail.com' \
    --to=npostavs@users.sourceforge.net \
    --cc=19362@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).