changeset 66797:4b89f1c6c558

(add-log-current-defun): Handle class::method notation of c++. Fix incorrect comment.
author Masatake YAMATO <jet@gyve.org>
date Thu, 10 Nov 2005 12:36:52 +0000
parents eb56e6f1ff40
children ed892a42b091
files lisp/ChangeLog lisp/add-log.el
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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  <jet@gyve.org>
+
+	* add-log.el: (add-log-current-defun): Handle 
+	class::method notation of c++.
+	Fix incorrect comment.
+
 2005-11-10  Alan Mackenzie  <acm@muc.de>
 
 	* help-fns.el (describe-variable): Make C-h v work when a variable
--- 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 ")