Mercurial > emacs
changeset 25273:c8d2d5e80cc0
(add-log-current-defun): Exclude all trailing whitespace.
Handle `enum' like `struct'.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 16 Aug 1999 03:16:06 +0000 |
parents | db26c1e76313 |
children | de041ba369d9 |
files | lisp/add-log.el |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/add-log.el Mon Aug 16 03:15:11 1999 +0000 +++ b/lisp/add-log.el Mon Aug 16 03:16:06 1999 +0000 @@ -612,10 +612,9 @@ ;; 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 @@ (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) ?=)