aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer1999-08-16 03:16:06 +0000
committerKarl Heuer1999-08-16 03:16:06 +0000
commitfe44bc6d35140096916c8524613b6fb6f711d0ce (patch)
treea017aacda64eb6af9abdc5aacbae427d45e7f25d /lisp
parent0c40a645afdfb57feefe2f6595c8dd90d2d79682 (diff)
downloademacs-fe44bc6d35140096916c8524613b6fb6f711d0ce.tar.gz
emacs-fe44bc6d35140096916c8524613b6fb6f711d0ce.zip
(add-log-current-defun): Exclude all trailing whitespace.
Handle `enum' like `struct'.
Diffstat (limited to 'lisp')
-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."
612 ;; shouldn't take us back before BEG. 612 ;; shouldn't take us back before BEG.
613 (> (point) beg)) 613 (> (point) beg))
614 (let (end middle) 614 (let (end middle)
615 ;; Don't include any final newline 615 ;; Don't include any final whitespace
616 ;; in the name we use. 616 ;; in the name we use.
617 (if (= (preceding-char) ?\n) 617 (skip-chars-backward " \t\n")
618 (forward-char -1))
619 (setq end (point)) 618 (setq end (point))
620 (backward-sexp 1) 619 (backward-sexp 1)
621 ;; Now find the right beginning of the name. 620 ;; Now find the right beginning of the name.
@@ -632,7 +631,7 @@ Has a preference of looking backwards."
632 (setq middle (point)) 631 (setq middle (point))
633 (forward-word -1)) 632 (forward-word -1))
634 (and (bolp) 633 (and (bolp)
635 (looking-at "struct \\|union \\|class ") 634 (looking-at "enum \\|struct \\|union \\|class ")
636 (setq middle (point))) 635 (setq middle (point)))
637 (goto-char end) 636 (goto-char end)
638 (when (eq (preceding-char) ?=) 637 (when (eq (preceding-char) ?=)