From 6dfa1d83fd3c647784d41c7561848daec5ddb29a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 20 Oct 1995 15:22:56 +0000 Subject: [PATCH] (add-log-current-defun): Handle `private', `public' in C++ class definitions. --- lisp/add-log.el | 8 ++++++++ 1 file changed, 8 insertions(+) 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))) -- 2.39.2