diff options
| author | Masatake YAMATO | 2005-11-10 12:36:52 +0000 |
|---|---|---|
| committer | Masatake YAMATO | 2005-11-10 12:36:52 +0000 |
| commit | 94b073f33d8d8069f0477c561f67826c95feb8d1 (patch) | |
| tree | 3e9a58aa8a83bbd17ec39e731e7b47b862ace8e6 | |
| parent | 19a9c3b741cb254dc74c9f673ce484feb3801fdf (diff) | |
| download | emacs-94b073f33d8d8069f0477c561f67826c95feb8d1.tar.gz emacs-94b073f33d8d8069f0477c561f67826c95feb8d1.zip | |
(add-log-current-defun): Handle class::method notation of c++.
Fix incorrect comment.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/add-log.el | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 72d2167870b..8cb9e52c434 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2005-11-10 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * add-log.el: (add-log-current-defun): Handle | ||
| 4 | class::method notation of c++. | ||
| 5 | Fix incorrect comment. | ||
| 6 | |||
| 1 | 2005-11-10 Alan Mackenzie <acm@muc.de> | 7 | 2005-11-10 Alan Mackenzie <acm@muc.de> |
| 2 | 8 | ||
| 3 | * help-fns.el (describe-variable): Make C-h v work when a variable | 9 | * 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." | |||
| 860 | (skip-syntax-backward " ") | 860 | (skip-syntax-backward " ") |
| 861 | (point)))) | 861 | (point)))) |
| 862 | (if (looking-at "^[+-]") | 862 | (if (looking-at "^[+-]") |
| 863 | ;; C++. | 863 | ;; Objective-C |
| 864 | (change-log-get-method-definition) | 864 | (change-log-get-method-definition) |
| 865 | ;; Ordinary C function syntax. | 865 | ;; Ordinary C function syntax. |
| 866 | (setq beg (point)) | 866 | (setq beg (point)) |
| @@ -901,6 +901,13 @@ Has a preference of looking backwards." | |||
| 901 | ;; precede the name. | 901 | ;; precede the name. |
| 902 | (setq middle (point)) | 902 | (setq middle (point)) |
| 903 | (forward-word -1) | 903 | (forward-word -1) |
| 904 | ;; Is this C++ method? | ||
| 905 | (when (and (< 2 middle) | ||
| 906 | (string= (buffer-substring (- middle 2) | ||
| 907 | middle) | ||
| 908 | "::")) | ||
| 909 | ;; Include "classname::". | ||
| 910 | (setq middle (point))) | ||
| 904 | ;; Ignore these subparts of a class decl | 911 | ;; Ignore these subparts of a class decl |
| 905 | ;; and move back to the class name itself. | 912 | ;; and move back to the class name itself. |
| 906 | (while (looking-at "public \\|private ") | 913 | (while (looking-at "public \\|private ") |