diff options
| author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-25 14:55:26 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-25 23:41:07 +0100 |
| commit | fb16a6c124c99a0e58dc8152b9a803c8a28e2436 (patch) | |
| tree | 32f2b26fa122749ab80e676783b1a212a780f1ae | |
| parent | 2362eb09804541cf75d0148d23f4dbe50fe311d0 (diff) | |
| download | emacs-fb16a6c124c99a0e58dc8152b9a803c8a28e2436.tar.gz | |
Improve how change-log-mode fills all-file-name lines
* lisp/vc/add-log.el (change-log-fill-file-list): New function to
improve how we fill all-file-name ChangeLog lines (bug#19341).
(change-log-indent): Use it.
| -rw-r--r-- | lisp/vc/add-log.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index e9a21825e18..beaad2e835f 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1068,8 +1068,23 @@ the change log file in another window." (insert-before-markers "(")) (error nil))))) +;; If we're filling a line that has a whole bunch of file names, and +;; we're still in the file names, then transform this so that it'll +;; still font-lock properly. +(defun change-log-fill-file-list () + (save-excursion + (unless (bobp) + (forward-line -1) + (when (looking-at change-log-file-names-re) + (goto-char (match-end 0)) + (while (looking-at "\\=, \\([^ ,:([\n]+\\)") + (goto-char (match-end 0))) + (when (looking-at ", *\n") + (replace-match ":\n *" t t)))))) + (defun change-log-indent () (change-log-fill-parenthesized-list) + (change-log-fill-file-list) (let* ((indent (save-excursion (beginning-of-line) |
