From 2b0787b344da7aff66e36fa35c4b73eddf980e80 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 6 Mar 2011 15:55:52 -0500 Subject: [PATCH] * lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): Don't change the syntax of a \n that closes a comment. Fixes: debbugs:8169 --- lisp/ChangeLog | 9 +++++++-- lisp/progmodes/gud.el | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5e9e134e746..6b7768fe93c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-06 Stefan Monnier + + * progmodes/gud.el (gdb-script-syntax-propertize-function): + Don't change the syntax of a \n that closes a comment (bug#8169). + 2011-03-06 Chong Yidong * emacs-lisp/package-x.el (package-archive-upload-base): Make it a @@ -25,8 +30,8 @@ 2011-03-06 Jay Belanger - * calc/calc-ext.el (calc-init-extensions): Rename - calc-logunits-dblevel and calc-logunits-nplevel to calc-dblevel + * calc/calc-ext.el (calc-init-extensions): + Rename calc-logunits-dblevel and calc-logunits-nplevel to calc-dblevel and calc-nplevel, respectively. Add keybindings for calc-spn, calc-midi and calc-freq. Add autoloads for calcFunc-spn, calcFunc-midi, calcFunc-freq, calc-spn, calc-midi and calc-freq. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 53918b903ee..47cbdf19ed2 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3127,7 +3127,9 @@ class of the file (using s to separate nested class ids)." ("^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 -- 2.39.5