emacs-diffs
[Top][All Lists]
Advanced

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

master 98c273ce1c 3/3: Merge branch 'master' of git.savannah.gnu.org:/sr


From: Eli Zaretskii
Subject: master 98c273ce1c 3/3: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Thu, 10 Nov 2022 05:09:47 -0500 (EST)

branch: master
commit 98c273ce1c23ce5ba3fb201daef13ec0da3e5185
Merge: 7e9afea775 af6a93b2b8
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
 lisp/progmodes/cc-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 2aa6b90dea..34ba97bb87 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -2390,6 +2390,8 @@ with // and /*, not more generic line and block comments."
          ;; Go to a less nested declaration each time round this loop.
          (and
           (setq old-pos (point))
+          ;; The following form tries to move to the end of the previous
+          ;; declaration without moving outside of an enclosing {.
           (let (pseudo)
             (while
                 (and
@@ -2404,7 +2406,9 @@ with // and /*, not more generic line and block comments."
                           (setq pseudo (c-cheap-inside-bracelist-p 
(c-parse-state)))))))
               (goto-char pseudo))
             t)
-          (>= (point) bod-lim)
+          (or (> (point) bod-lim)
+              (eq bod-lim (point-min)))
+          ;; Move forward to the start of the next declaration.
           (progn (c-forward-syntactic-ws)
                  ;; Have we got stuck in a comment at EOB?
                  (not (and (eobp)



reply via email to

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