all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@gnu.org>,
	"'Lars Magne Ingebrigtsen'" <larsi@gnus.org>
Cc: 1169@debbugs.gnu.org
Subject: bug#1169: 23.0.60; (substitute-command-keys "\\{...}") adds extra newline
Date: Wed, 30 May 2012 07:44:34 -0700	[thread overview]
Message-ID: <B506D5A4D01E4F05A3303D510E9586E6@us.oracle.com> (raw)
In-Reply-To: <8762bdyd2p.fsf@gnu.org>

> >> I've now made the change,
> >
> > This change breaks the highlighting code in `help-make-xrefs' which
> > assumes that a list of key bindings produced by 
> > substitute-command-keys (in `documentation') ends with an extra blank line
> 
> Thanks.  I've reverted the change in the emacs-24 branch, and added a
> note to the docstring of substitute-command-keys that the two newlines
> are needed by `help-make-xrefs'.

Huh?  Two newlines is the wrong thing.  It is the point of this bug report.

If some other fix is needed than the one that you made, fine.  Just DTRT.
Sounds like `help-make-xrefs' needs to be fixed - dunno.

In any case, the extra newline still needs to be removed.  It is simply wrong -
doesn't belong in `substitute-command-keys' - is not part of its mission.

And you added your note to the _doc string_?  Of `substitute-command-keys'?  If
you need to make a note that this bug still needs to be fixed then that should
be done elsewhere than a doc string.

There is absolutely nothing in the purpose of `substitute-command-keys' that
constrains it or invites it to add an extra newline.  Quite the contrary.

`substitute-command-keys' is a very general utility function.  It is not some
helper routine for `help-make-xrefs'.  Bending it to fix inadequate code in
`help-make-xrefs' is _way_ wrong.  And putting that kind of note into its doc
string is doubly wrong.

To repeat, from the bug report:

> If text is added after the returned string, then it should be up
> to *that* text to start with a \n if it wants a blank separator line.
> If, for example, it starts instead with ^L, then the current code
> includes an extra blank line before the form feed.
> 
> It should be up to the *calling* function to decide whether it wants
> a blank line at the end -  *only* the calling function knows the
> context and whether such a line is appropriate.






  reply	other threads:[~2012-05-30 14:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 22:45 bug#1169: 23.0.60; (substitute-command-keys "\\{...}") adds extra newline Drew Adams
2011-07-07 17:21 ` Lars Magne Ingebrigtsen
2011-07-07 17:25   ` Drew Adams
2011-07-07 17:32     ` Lars Magne Ingebrigtsen
2011-07-07 17:50       ` Drew Adams
2011-07-07 20:06       ` Juanma Barranquero
2012-05-29 17:44   ` Johan Bockgård
2012-05-29 19:06     ` Drew Adams
2012-05-30 14:10     ` Chong Yidong
2012-05-30 14:44       ` Drew Adams [this message]
2012-05-30 16:40         ` Chong Yidong
2012-05-30 17:36           ` Drew Adams
2012-05-30 20:02             ` Andreas Schwab
2012-05-30 20:21               ` 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

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

  git send-email \
    --in-reply-to=B506D5A4D01E4F05A3303D510E9586E6@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=1169@debbugs.gnu.org \
    --cc=cyd@gnu.org \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.