GNU bug report logs -
#8169
23.2; wrong fontification in gdb-script
Previous Next
Reported by: Tom Tromey <tromey <at> redhat.com>
Date: Thu, 3 Mar 2011 21:04:02 UTC
Severity: minor
Found in version 23.2
Fixed in version 24.1
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 8169 <at> debbugs.gnu.org (full text, mbox):
>>>>> "Tom" == Tom Tromey <tromey <at> 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
This bug report was last modified 14 years and 138 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.