diff options
author | Glenn Morris <rgm@gnu.org> | 2011-05-14 16:27:09 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-05-14 16:27:09 -0700 |
commit | 7210a7391fe7b02cf27e55a90af5b828d7558384 (patch) | |
tree | 64154f5565d80ba771eda0ced8d7937c29bb330b /lisp/vc/add-log.el | |
parent | ccd1ad0793f2c6624f146527865dc98b4ed2eebd (diff) | |
download | emacs-7210a7391fe7b02cf27e55a90af5b828d7558384.tar.gz |
add-log.el fix for multiple author entries (bug#8645)
* lisp/vc/add-log.el (add-change-log-entry): Don't start adding a new entry
in the middle of an existing one with multiple authors.
Diffstat (limited to 'lisp/vc/add-log.el')
-rw-r--r-- | lisp/vc/add-log.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 73e83414e99..aecb0cd9ef6 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -237,7 +237,7 @@ Note: The search is conducted only within 10%, at the beginning of the file." (defvar change-log-font-lock-keywords `(;; ;; Date lines, new (2000-01-01) and old (Sat Jan 1 00:00:00 2000) styles. - ;; Fixme: this regepx is just an approximate one and may match + ;; Fixme: this regexp is just an approximate one and may match ;; wrongly with a non-date line existing as a random note. In ;; addition, using any kind of fixed setting like this doesn't ;; work if a user customizes add-log-time-format. @@ -865,8 +865,12 @@ non-nil, otherwise in local time." (if (and (not add-log-always-start-new-record) (let ((hit nil)) (dolist (entry new-entries hit) - (when (looking-at (regexp-quote entry)) - (setq hit t))))) + (and (looking-at (regexp-quote entry)) + ;; Reject multiple author entries. (Bug#8645) + (save-excursion + (forward-line 1) + (not (looking-at "[ \t]+.*<.*>$"))) + (setq hit t))))) (forward-line 1) (insert (nth (random (length new-entries)) new-entries) |