comparison lisp/add-log.el @ 13255:9e94f911f00c

(add-log-current-defun): Handle `private', `public' in C++ class definitions.
author Richard M. Stallman <rms@gnu.org>
date Fri, 20 Oct 1995 15:22:56 +0000
parents 1bc6075184d7
children 69fe836d7f02
comparison
equal deleted inserted replaced
13254:7ed0775e99af 13255:9e94f911f00c
442 ;; Now find the right beginning of the name. 442 ;; Now find the right beginning of the name.
443 ;; Include certain keywords if they 443 ;; Include certain keywords if they
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)))
450 (buffer-substring middle end))))))))) 458 (buffer-substring middle end)))))))))
451 ((memq major-mode 459 ((memq major-mode