Commit 6dfa1d83 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(add-log-current-defun): Handle `private', `public' in C++ class definitions.

parent 7badea30
......@@ -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)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment