diff options
| -rw-r--r-- | lisp/vc/ediff.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 36580c73d6b..bc89b2025ff 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el | |||
| @@ -360,10 +360,13 @@ has been saved (if not in `buffer-file-name')." | |||
| 360 | (defalias 'ediff #'ediff-files) | 360 | (defalias 'ediff #'ediff-files) |
| 361 | 361 | ||
| 362 | ;;;###autoload | 362 | ;;;###autoload |
| 363 | (defun ediff-current-file () | 363 | (defun ediff-current-file (&optional startup-hooks) |
| 364 | "Start ediff between current buffer and its file on disk. | 364 | "Start ediff between current buffer and its file on disk. |
| 365 | This command can be used instead of `revert-buffer'. If there is | 365 | This command can be used instead of `revert-buffer'. If there is |
| 366 | nothing to revert then this command fails." | 366 | nothing to revert then this command fails. |
| 367 | |||
| 368 | Non-interactively, STARTUP-HOOKS is a list of functions that Emacs calls | ||
| 369 | without arguments after setting up the Ediff buffers." | ||
| 367 | (interactive) | 370 | (interactive) |
| 368 | ;; This duplicates code from menu-bar.el. | 371 | ;; This duplicates code from menu-bar.el. |
| 369 | (unless (or (not (eq revert-buffer-function 'revert-buffer--default)) | 372 | (unless (or (not (eq revert-buffer-function 'revert-buffer--default)) |
| @@ -395,7 +398,7 @@ nothing to revert then this command fails." | |||
| 395 | (insert-file-contents file-name) | 398 | (insert-file-contents file-name) |
| 396 | ;; Assume same modes: | 399 | ;; Assume same modes: |
| 397 | (funcall current-major)) | 400 | (funcall current-major)) |
| 398 | (ediff-buffers revert-buf (current-buffer)))) | 401 | (ediff-buffers revert-buf (current-buffer) startup-hooks))) |
| 399 | 402 | ||
| 400 | 403 | ||
| 401 | ;;;###autoload | 404 | ;;;###autoload |