mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
(add-log-current-defun): Exclude all trailing whitespace.
Handle `enum' like `struct'.
This commit is contained in:
parent
0c40a645af
commit
fe44bc6d35
1 changed files with 3 additions and 4 deletions
|
|
@ -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) ?=)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue