diff options
| author | Masatake YAMATO | 2006-12-26 03:53:04 +0000 |
|---|---|---|
| committer | Masatake YAMATO | 2006-12-26 03:53:04 +0000 |
| commit | 3b2452fd1ab156e0aa6259ed79c5abe8266233a8 (patch) | |
| tree | 1fcfd7c3cc929f358d676de7518064a90c8fe695 | |
| parent | 39d410b58bc6d685727e344af0042263ae2c4b26 (diff) | |
| download | emacs-3b2452fd1ab156e0aa6259ed79c5abe8266233a8.tar.gz emacs-3b2452fd1ab156e0aa6259ed79c5abe8266233a8.zip | |
(add-log-current-defun): Call `forward-sexp'
multiple times to pick a member function name defined as
part of nested classes/namespaces.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/add-log.el | 14 |
2 files changed, 20 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87a00c26065..6d4d36d3be0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-12-26 Guanpeng Xu <herberteuler@hotmail.com> (tiny change) | ||
| 2 | |||
| 3 | * add-log.el (add-log-current-defun): Call `forward-sexp' | ||
| 4 | multiple times to pick a member function name defined as | ||
| 5 | part of nested classes/namespaces. | ||
| 6 | |||
| 1 | 2006-12-26 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | 2006-12-26 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 8 | ||
| 3 | * emacs-lisp/easymenu.el (easy-menu-change): New arg MAP to indicate | 9 | * emacs-lisp/easymenu.el (easy-menu-change): New arg MAP to indicate |
| @@ -2959,7 +2965,7 @@ | |||
| 2959 | 2965 | ||
| 2960 | * add-log.el (add-log-current-defun): Use `forward-sexp' | 2966 | * add-log.el (add-log-current-defun): Use `forward-sexp' |
| 2961 | instead of `forward-word' to pick c++::symbol. | 2967 | instead of `forward-word' to pick c++::symbol. |
| 2962 | Reported by Herbert Euler <herberteuler@hotmail.com>. | 2968 | Reported by Guanpeng Xu <herberteuler@hotmail.com>. |
| 2963 | 2969 | ||
| 2964 | 2006-09-22 Kenichi Handa <handa@m17n.org> | 2970 | 2006-09-22 Kenichi Handa <handa@m17n.org> |
| 2965 | 2971 | ||
diff --git a/lisp/add-log.el b/lisp/add-log.el index 70345a122e1..2ecb274b4de 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -916,7 +916,19 @@ Has a preference of looking backwards." | |||
| 916 | ;; Include certain keywords if they | 916 | ;; Include certain keywords if they |
| 917 | ;; precede the name. | 917 | ;; precede the name. |
| 918 | (setq middle (point)) | 918 | (setq middle (point)) |
| 919 | (forward-sexp -1) | 919 | ;; Single (forward-sexp -1) invocation is |
| 920 | ;; not enough for C++ member function defined | ||
| 921 | ;; as part of nested class and/or namespace | ||
| 922 | ;; like: | ||
| 923 | ;; | ||
| 924 | ;; void | ||
| 925 | ;; foo::bar::baz::bazz () | ||
| 926 | ;; { ... | ||
| 927 | ;; | ||
| 928 | ;; Here we have to move the point to | ||
| 929 | ;; the beginning of foo, not bazz. | ||
| 930 | (while (not (looking-back "\\(^\\|[ \t]\\)")) | ||
| 931 | (forward-sexp -1)) | ||
| 920 | ;; Is this C++ method? | 932 | ;; Is this C++ method? |
| 921 | (when (and (< 2 middle) | 933 | (when (and (< 2 middle) |
| 922 | (string= (buffer-substring (- middle 2) | 934 | (string= (buffer-substring (- middle 2) |