]> git.eshelyaron.com Git - emacs.git/commitdiff
(add-log-current-defun): Handle `private', `public' in C++ class definitions.
authorRichard M. Stallman <rms@gnu.org>
Fri, 20 Oct 1995 15:22:56 +0000 (15:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 20 Oct 1995 15:22:56 +0000 (15:22 +0000)
lisp/add-log.el

index 41ada9f91bb7d65b6927b5b27a70d48f91922ed9..48a72a9a3ecc8dd41237968968c15be3010e8e63 100644 (file)
@@ -444,6 +444,14 @@ Has a preference of looking backwards."
                                   ;; precede the name.
                                   (setq middle (point))
                                   (forward-word -1)
+                                  ;; Ignore these subparts of a class decl
+                                  ;; and move back to the class name itself.
+                                  (while (looking-at "public \\|private ")
+                                    (skip-chars-backward " \t:")
+                                    (setq end (point))
+                                    (backward-sexp 1)
+                                    (setq middle (point))
+                                    (forward-word -1))
                                   (and (bolp)
                                        (looking-at "struct \\|union \\|class ")
                                        (setq middle (point)))