diff options
| author | Noam Postavsky <npostavs@gmail.com> | 2020-03-20 06:00:11 -0400 |
|---|---|---|
| committer | Noam Postavsky <npostavs@gmail.com> | 2020-03-22 23:06:31 -0400 |
| commit | 8709aaddd8707c9eafb359f9ec824e4bc109bbc6 (patch) | |
| tree | 899e70ed928ec78656ea655db00cc9b6f5487c98 /lisp/vc/log-edit.el | |
| parent | 9ab85f087f7db38168dcf07d24f51ecd2c583f8a (diff) | |
| download | emacs-8709aaddd8707c9eafb359f9ec824e4bc109bbc6.tar.gz | |
Fix a couple of problems in changelog generating functions
* lisp/vc/diff-mode.el (diff-add-log-current-defuns): If there is a
scan-error when calling end-of-defun, go to end of hunk. This can
easily happen since we are calling end-of-defun on a partial code
fragment from a diff.
* lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff): Bind
display-buffer-overriding-action around the log-edit-show-diff call
only. Otherwise, it can affect, for example, debugger windows
triggered by the diff-add-log-current-defuns call.
Diffstat (limited to 'lisp/vc/log-edit.el')
| -rw-r--r-- | lisp/vc/log-edit.el | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 8b6168835f0..d5d46147cf7 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -788,18 +788,20 @@ This command will generate a ChangeLog entries listing the functions. You can then add a description where needed, and use \\[fill-paragraph] to join consecutive function names." (interactive) - (let* ((diff-buf nil) - ;; Unfortunately, `log-edit-show-diff' doesn't have a NO-SHOW - ;; option, so we try to work around it via display-buffer - ;; machinery. - (display-buffer-overriding-action - `(,(lambda (buf alist) - (setq diff-buf buf) - (display-buffer-no-window buf alist)) - . ((allow-no-window . t))))) - (change-log-insert-entries - (with-current-buffer (progn (log-edit-show-diff) diff-buf) - (diff-add-log-current-defuns))))) + (change-log-insert-entries + (with-current-buffer + (let* ((diff-buf nil) + ;; Unfortunately, `log-edit-show-diff' doesn't have a + ;; NO-SHOW option, so we try to work around it via + ;; display-buffer machinery. + (display-buffer-overriding-action + `(,(lambda (buf alist) + (setq diff-buf buf) + (display-buffer-no-window buf alist)) + . ((allow-no-window . t))))) + (log-edit-show-diff) + diff-buf) + (diff-add-log-current-defuns)))) (defun log-edit-insert-changelog (&optional use-first) "Insert a log message by looking at the ChangeLog. |
