]> git.eshelyaron.com Git - emacs.git/commitdiff
(add-log-current-defun): Handle class::method notation of c++.
authorMasatake YAMATO <jet@gyve.org>
Thu, 10 Nov 2005 12:36:52 +0000 (12:36 +0000)
committerMasatake YAMATO <jet@gyve.org>
Thu, 10 Nov 2005 12:36:52 +0000 (12:36 +0000)
Fix incorrect comment.

lisp/ChangeLog
lisp/add-log.el

index 72d2167870b14629c02eaf64331f387dd8cb6ba3..8cb9e52c4342d299d6e06b3e2800903db36942d5 100644 (file)
@@ -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
index 024262a6beee0bd79ace88db3f1d4b76ab65ac52..91d7ba36bab7381545381631ef641e3201305217 100644 (file)
@@ -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 ")