diff options
author | Juri Linkov <juri@linkov.net> | 2018-11-14 02:23:04 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2018-11-14 02:23:04 +0200 |
commit | f561c6a1124d4a1d79c264a9cb79ac0e7cb1650f (patch) | |
tree | 19e38540b703d39ae7711848607da9b205ef237b /lisp/vc/diff-mode.el | |
parent | 2ccfb4b5f43b7592af4efe943c24741370f3eb86 (diff) | |
download | emacs-f561c6a1124d4a1d79c264a9cb79ac0e7cb1650f.tar.gz |
New option vc-find-revision-no-save to not write revision to file
* lisp/vc/vc.el (vc-find-revision-no-save): New defcustom (bug#33319).
(vc-find-revision): Depending on vc-find-revision-no-save,
call either vc-find-revision-no-save or vc-find-revision-save.
(vc-find-revision-save): Rename from vc-find-revision.
(vc-find-revision-no-save): New function.
* lisp/vc/diff-mode.el (diff-find-source-location):
Let-bind vc-find-revision-no-save to t.
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r-- | lisp/vc/diff-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 8539423eed5..b86c17fe366 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -56,6 +56,7 @@ (eval-when-compile (require 'cl-lib)) (autoload 'vc-find-revision "vc") +(defvar vc-find-revision-no-save) (defvar add-log-buffer-file-name-function) @@ -1743,7 +1744,8 @@ NOPROMPT, if non-nil, means not to prompt the user." (revision (and other diff-vc-backend (nth (if reverse 1 0) diff-vc-revisions))) (buf (if revision - (vc-find-revision file revision diff-vc-backend) + (let ((vc-find-revision-no-save t)) + (vc-find-revision file revision diff-vc-backend)) (find-file-noselect file)))) ;; Update the user preference if he so wished. (when (> (prefix-numeric-value other-file) 8) |