all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Johan Bockgård" <bojohan@gnu.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: cyd@gnu.org, 1169@debbugs.gnu.org
Subject: bug#1169: 23.0.60; (substitute-command-keys "\\{...}") adds extra newline
Date: Tue, 29 May 2012 19:44:58 +0200	[thread overview]
Message-ID: <87ehq251b9.fsf@gnu.org> (raw)
In-Reply-To: <m3d3hmt3b1.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Thu, 07 Jul 2011 19:21:06 +0200")

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> "Drew Adams" <drew.adams@oracle.com> writes:
>
>> (substitute-command-keys "\\{minibuffer-local-map}") ; or another map
>>
>> The returned string ends in \n\n. It should end in just \n.
[...]

> 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:

    (while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n"
                              nil t)
      (let ((col (- (match-end 1) (match-beginning 1))))
        (while
            (and (not (eobp))
                 ;; Stop at a pair of blank lines.
                 (not (looking-at "\n\\s-*\n")))

Example:

   emacs -Q
   C-h m
   C-x o
   M->

Note the highlighted "or"s in the last two paragraphs.





  parent reply	other threads:[~2012-05-29 17: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 [this message]
2012-05-29 19:06     ` Drew Adams
2012-05-30 14:10     ` Chong Yidong
2012-05-30 14:44       ` Drew Adams
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=87ehq251b9.fsf@gnu.org \
    --to=bojohan@gnu.org \
    --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.