summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2007-01-27 19:53:25 +0000
committerRichard M. Stallman <rms@gnu.org>2007-01-27 19:53:25 +0000
commit9b469b61cadb15629a29a6cde5ed1889a12637d2 (patch)
treefafe781b59509eddcd5c644f5de21066f881ddd9
parent5340648dac7b85c0344ab567b0bea35c5fc25026 (diff)
downloademacs-9b469b61cadb15629a29a6cde5ed1889a12637d2.tar.gz
add-log-current-defun): Skip the semicolon ``;'' for
enum/union/struct/class definition. Revert change to call `forward-sexp' multiple times.
-rw-r--r--lisp/add-log.el20
1 files changed, 7 insertions, 13 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 748abefd400..08ce78d371d 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -828,6 +828,10 @@ Has a preference of looking backwards."
;; here is the position after the final }.
(backward-sexp 1)
(forward-sexp 1)
+ ;; Skip the semicolon ``;'' for
+ ;; enum/union/struct/class definition.
+ (if (= (char-after (point)) ?\;)
+ (forward-char 1))
(setq previous-defun-end (point)))
(save-excursion
@@ -921,19 +925,9 @@ Has a preference of looking backwards."
;; Include certain keywords if they
;; precede the name.
(setq middle (point))
- ;; 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))
+ ;; We tried calling `forward-sexp' in a loop
+ ;; but it causes inconsistency for C names.
+ (forward-sexp -1)
;; Is this C++ method?
(when (and (< 2 middle)
(string= (buffer-substring (- middle 2)