1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-09 15:50:21 +00:00

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

This commit is contained in:
Richard M. Stallman 1995-10-20 15:22:56 +00:00
parent 7badea3036
commit 6dfa1d83fd

View File

@ -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)))