emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 958f591: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 958f591: Merge from origin/emacs-27
Date: Mon, 16 Aug 2021 11:01:12 -0400 (EDT)

branch: master
commit 958f5915672f77f2b98c425fae4035dea5dc5116
Merge: 5d7b1d5 9664ee1
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Merge from origin/emacs-27
    
    9664ee182c (origin/emacs-27) C++ Mode: Don't confuse the pointer oper...
    b3aec9ee48 CC Mode: Fix unstable fontification of doc strings.
    
    # Conflicts:
    #   lisp/progmodes/cc-fonts.el
---
 lisp/progmodes/cc-engine.el |  2 +-
 lisp/progmodes/cc-fonts.el  | 15 +++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 7f7175f..5d2e41a 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -12675,7 +12675,7 @@ comment at the start of cc-engine.el for more info."
                       (save-excursion
                         (while
                             (progn
-                              (c-syntactic-skip-backward "^;=}>" closest-lim t)
+                              (c-syntactic-skip-backward "^;=,}>" closest-lim 
t)
                               (and (eq (char-before) ?>)
                                    (c-backward-token-2)
                                    (not (looking-at c-haskell-op-re)))))
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 3c42915..7e7053b 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -2797,13 +2797,14 @@ need for `pike-font-lock-extra-types'.")
   ;;
   ;; This function might do hidden buffer changes.
   (declare (indent 2))
-  (let (comment-beg region-beg)
+  (let (comment-beg region-beg comment-mid)
     (if (memq (get-text-property (point) 'face)
              '(font-lock-comment-face font-lock-comment-delimiter-face))
        ;; Handle the case when the fontified region starts inside a
        ;; comment.
        (let ((start (c-literal-start)))
-         (setq region-beg (point))
+         (setq region-beg (point)
+               comment-mid (point))
          (when start
            (goto-char start))
          (when (looking-at prefix)
@@ -2829,7 +2830,8 @@ need for `pike-font-lock-extra-types'.")
                                (goto-char comment-beg)
                                (c-in-literal)))))
              (setq comment-beg nil))
-           (setq region-beg comment-beg))
+           (setq region-beg comment-beg
+                 comment-mid comment-beg))
 
       (if (elt (parse-partial-sexp comment-beg (+ comment-beg 2)) 7)
          ;; Collect a sequence of doc style line comments.
@@ -2837,15 +2839,16 @@ need for `pike-font-lock-extra-types'.")
            (goto-char comment-beg)
            (while (and (progn
                          (c-forward-single-comment)
-                         (c-put-font-lock-face comment-beg (point)
+                         (c-put-font-lock-face comment-mid (point)
                                                c-doc-face-name)
                          (skip-syntax-forward " ")
-                         (setq comment-beg (point))
+                         (setq comment-beg (point)
+                               comment-mid (point))
                          (< (point) limit))
                        (looking-at prefix))))
        (goto-char comment-beg)
        (c-forward-single-comment)
-       (c-put-font-lock-face comment-beg (point) c-doc-face-name))
+       (c-put-font-lock-face region-beg (point) c-doc-face-name))
       (if (> (point) limit) (goto-char limit))
       (setq comment-beg nil)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]