diff options
| author | Richard M. Stallman <rms@gnu.org> | 1992-10-08 08:35:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1992-10-08 08:35:26 +0000 |
| commit | d80788d86d0249afb1c8598ffd458342a76616cb (patch) | |
| tree | 216630c687c9b538dea4a1f0d64bfbe1c7be4447 /lisp/add-log.el | |
| parent | 7b02ee3c41fdbf75c122ad96099e7b6407d9c5ff (diff) | |
| download | emacs-d80788d86d0249afb1c8598ffd458342a76616cb.tar.gz | |
(add-log-current-defun): In normal C case,
start with beginning-of-line.
In last (fallback) case, start with end-of-line.
(add-log-current-defun-header-regexp): In first alternative
within the parens, don't allow space as last character.
Diffstat (limited to 'lisp/add-log.el')
| -rw-r--r-- | lisp/add-log.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index 3400d93d985..f7f61b3952f 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -203,7 +203,7 @@ Runs `change-log-mode-hook'." (run-hooks 'change-log-mode-hook)) (defvar add-log-current-defun-header-regexp - "^\\([A-Z][A-Z_ ]+\\|[a-z_---A-Z]+\\)[ \t]*[:=]" + "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[a-z_---A-Z]+\\)[ \t]*[:=]" "*Heuristic regexp used by `add-log-current-defun' for unknown major modes.") (defun add-log-current-defun () @@ -253,6 +253,7 @@ Has a preference of looking backwards." (buffer-substring (point) (progn (forward-sexp 1) (point)))) ((memq major-mode '(c-mode 'c++-mode)) + (beginning-of-line) ;; See if we are in the beginning part of a function, ;; before the open brace. If so, advance forward. (while (not (looking-at "{\\|\\(\\s *$\\)")) @@ -340,6 +341,7 @@ Has a preference of looking backwards." (t ;; If all else fails, try heuristics (let (case-fold-search) + (end-of-line) (if (re-search-backward add-log-current-defun-header-regexp (- (point) 10000) t) |
