# HG changeset patch # User Masatake YAMATO # Date 1131626212 0 # Node ID 4b89f1c6c558ab65de79d04f63b3f2762c3fc991 # Parent eb56e6f1ff40393e1ce8213192320cb7957bf934 (add-log-current-defun): Handle class::method notation of c++. Fix incorrect comment. diff -r eb56e6f1ff40 -r 4b89f1c6c558 lisp/ChangeLog --- a/lisp/ChangeLog Thu Nov 10 11:57:35 2005 +0000 +++ b/lisp/ChangeLog Thu Nov 10 12:36:52 2005 +0000 @@ -1,3 +1,9 @@ +2005-11-10 Masatake YAMATO + + * add-log.el: (add-log-current-defun): Handle + class::method notation of c++. + Fix incorrect comment. + 2005-11-10 Alan Mackenzie * help-fns.el (describe-variable): Make C-h v work when a variable diff -r eb56e6f1ff40 -r 4b89f1c6c558 lisp/add-log.el --- a/lisp/add-log.el Thu Nov 10 11:57:35 2005 +0000 +++ b/lisp/add-log.el Thu Nov 10 12:36:52 2005 +0000 @@ -860,7 +860,7 @@ (skip-syntax-backward " ") (point)))) (if (looking-at "^[+-]") - ;; C++. + ;; Objective-C (change-log-get-method-definition) ;; Ordinary C function syntax. (setq beg (point)) @@ -901,6 +901,13 @@ ;; precede the name. (setq middle (point)) (forward-word -1) + ;; Is this C++ method? + (when (and (< 2 middle) + (string= (buffer-substring (- middle 2) + middle) + "::")) + ;; Include "classname::". + (setq middle (point))) ;; Ignore these subparts of a class decl ;; and move back to the class name itself. (while (looking-at "public \\|private ")