aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-10-20 15:22:56 +0000
committerRichard M. Stallman1995-10-20 15:22:56 +0000
commit6dfa1d83fd3c647784d41c7561848daec5ddb29a (patch)
treea5650e53be70c164ea62fd45fbbfc1f554fa6159
parent7badea30363cb3c0ee83f83ab1ab53860db61146 (diff)
downloademacs-6dfa1d83fd3c647784d41c7561848daec5ddb29a.tar.gz
emacs-6dfa1d83fd3c647784d41c7561848daec5ddb29a.zip
(add-log-current-defun): Handle `private', `public' in C++ class definitions.
-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."
444 ;; precede the name. 444 ;; precede the name.
445 (setq middle (point)) 445 (setq middle (point))
446 (forward-word -1) 446 (forward-word -1)
447 ;; Ignore these subparts of a class decl
448 ;; and move back to the class name itself.
449 (while (looking-at "public \\|private ")
450 (skip-chars-backward " \t:")
451 (setq end (point))
452 (backward-sexp 1)
453 (setq middle (point))
454 (forward-word -1))
447 (and (bolp) 455 (and (bolp)
448 (looking-at "struct \\|union \\|class ") 456 (looking-at "struct \\|union \\|class ")
449 (setq middle (point))) 457 (setq middle (point)))