diff options
Diffstat (limited to 'lisp/add-log.el')
-rw-r--r-- | lisp/add-log.el | 14 |
1 files changed, 13 insertions, 1 deletions
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." ;; Include certain keywords if they ;; precede the name. (setq middle (point)) - (forward-sexp -1) + ;; Single (forward-sexp -1) invocation is + ;; not enough for C++ member function defined + ;; as part of nested class and/or namespace + ;; like: + ;; + ;; void + ;; foo::bar::baz::bazz () + ;; { ... + ;; + ;; Here we have to move the point to + ;; the beginning of foo, not bazz. + (while (not (looking-back "\\(^\\|[ \t]\\)")) + (forward-sexp -1)) ;; Is this C++ method? (when (and (< 2 middle) (string= (buffer-substring (- middle 2) |