From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Tom Tromey <tromey@redhat.com>
Cc: 8169@debbugs.gnu.org
Subject: bug#8169: 23.2; wrong fontification in gdb-script
Date: Thu, 03 Mar 2011 23:49:10 -0500 [thread overview]
Message-ID: <jwvei6nwkxa.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3aahbx6g1.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu, 03 Mar 2011 14:03:26 -0700")
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
> Visit a file named .gdbinit and enter:
> define something
> echo hi
> # a comment
> end
> Notice that "end" is incorrect given the comment face.
> This happens due to some logic in gdb-script-syntax-propertize-function.
> It overrides the comment-end syntax on the newline. But, this is
> only really ok if the newline is actually part of a "document" command.
Good point. The patch below fixes this case, I think.
Stefan "can't commit right now"
=== modified file 'lisp/progmodes/gud.el'
--- lisp/progmodes/gud.el 2011-01-25 20:26:05 +0000
+++ lisp/progmodes/gud.el 2011-03-04 04:47:29 +0000
@@ -3128,7 +3128,9 @@
("^document\\s-.*\\(\n\\)" (1 "< b"))
("^end\\(\\>\\)"
(1 (ignore
- (unless (eq (match-beginning 0) (point-min))
+ (when (and (> (match-beginning 0) (point-min))
+ (eq 1 (nth 7 (save-excursion
+ (syntax-ppss (1- (match-beginning 0)))))))
;; We change the \n in front, which is more difficult, but results
;; in better highlighting. If the doc is empty, the single \n is
;; both the beginning and the end of the docstring, which can't be
next prev parent reply other threads:[~2011-03-04 4:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 21:03 bug#8169: 23.2; wrong fontification in gdb-script Tom Tromey
2011-03-04 4:49 ` Stefan Monnier [this message]
2011-03-04 15:37 ` Tom Tromey
2011-03-06 20:49 ` Stefan Monnier
2011-03-07 14:44 ` Tom Tromey
2011-03-06 20:58 ` Stefan Monnier
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=jwvei6nwkxa.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=8169@debbugs.gnu.org \
--cc=tromey@redhat.com \
/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.