From: Masatake YAMATO Date: Thu, 10 Nov 2005 12:36:52 +0000 (+0000) Subject: (add-log-current-defun): Handle class::method notation of c++. X-Git-Tag: emacs-pretest-22.0.90~5968 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94b073f33d8d8069f0477c561f67826c95feb8d1;p=emacs.git (add-log-current-defun): Handle class::method notation of c++. Fix incorrect comment. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 72d2167870b..8cb9e52c434 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/add-log.el b/lisp/add-log.el index 024262a6bee..91d7ba36bab 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -860,7 +860,7 @@ Has a preference of looking backwards." (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 @@ Has a preference of looking backwards." ;; 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 ")