From: Richard M. Stallman Date: Fri, 20 Oct 1995 15:22:56 +0000 (+0000) Subject: (add-log-current-defun): Handle `private', `public' in C++ class definitions. X-Git-Tag: emacs-19.34~2605 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6dfa1d83fd3c647784d41c7561848daec5ddb29a;p=emacs.git (add-log-current-defun): Handle `private', `public' in C++ class definitions. --- 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)))