summaryrefslogtreecommitdiff
path: root/lisp/add-log.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-20 15:22:56 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-20 15:22:56 +0000
commitc8903c000bd0ece755a8950745fe4ccc8d4dc971 (patch)
tree5806928e23d646862e3703c52a582e87b7137eda /lisp/add-log.el
parent172d421c9879fe36192088213b44e509d74c7ba0 (diff)
downloademacs-c8903c000bd0ece755a8950745fe4ccc8d4dc971.tar.gz
(add-log-current-defun): Handle `private', `public' in C++ class definitions.
Diffstat (limited to 'lisp/add-log.el')
-rw-r--r--lisp/add-log.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 41ada9f91bb..48a72a9a3ec 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -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)))