summaryrefslogtreecommitdiff
path: root/lisp/add-log.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1999-08-16 03:16:06 +0000
committerKarl Heuer <kwzh@gnu.org>1999-08-16 03:16:06 +0000
commitfe44bc6d35140096916c8524613b6fb6f711d0ce (patch)
treea017aacda64eb6af9abdc5aacbae427d45e7f25d /lisp/add-log.el
parent0c40a645afdfb57feefe2f6595c8dd90d2d79682 (diff)
downloademacs-fe44bc6d35140096916c8524613b6fb6f711d0ce.tar.gz
(add-log-current-defun): Exclude all trailing whitespace.
Handle `enum' like `struct'.
Diffstat (limited to 'lisp/add-log.el')
-rw-r--r--lisp/add-log.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 24ff059c3a5..f85a62e30ee 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -612,10 +612,9 @@ Has a preference of looking backwards."
;; shouldn't take us back before BEG.
(> (point) beg))
(let (end middle)
- ;; Don't include any final newline
+ ;; Don't include any final whitespace
;; in the name we use.
- (if (= (preceding-char) ?\n)
- (forward-char -1))
+ (skip-chars-backward " \t\n")
(setq end (point))
(backward-sexp 1)
;; Now find the right beginning of the name.
@@ -632,7 +631,7 @@ Has a preference of looking backwards."
(setq middle (point))
(forward-word -1))
(and (bolp)
- (looking-at "struct \\|union \\|class ")
+ (looking-at "enum \\|struct \\|union \\|class ")
(setq middle (point)))
(goto-char end)
(when (eq (preceding-char) ?=)