From: João Távora Date: Thu, 10 Oct 2013 14:59:09 +0000 (-0400) Subject: * vc/vc.el (vc-diff-build-argument-list-internal): If the file is X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1298 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db1386987b5c2ccbfa28d4638b822afc5a8eedbb;p=emacs.git * vc/vc.el (vc-diff-build-argument-list-internal): If the file is not locked, use last revision and current source as defaults. (Bug#15569) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f9450f0db8..bb675ce5088 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-10-10 João Távora + + * vc/vc.el (vc-diff-build-argument-list-internal): If the file is + not locked, use last revision and current source as + defaults. (Bug#15569) + 2013-10-10 Masatake YAMATO * menu-bar.el (menu-bar-open): Don't use popup-menu if diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 13f0d836f91..585b6d48d45 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1739,13 +1739,12 @@ Return t if the buffer had changes, nil otherwise." ;; if the file is not up-to-date, use working revision as older revision ((not (vc-up-to-date-p first)) (setq rev1-default (vc-working-revision first))) - ;; if the file is not locked, use last and previous revisions as defaults + ;; if the file is not locked, use last revision and current source as defaults (t (setq rev1-default (ignore-errors ;If `previous-revision' doesn't work. (vc-call-backend backend 'previous-revision first (vc-working-revision first)))) - (when (string= rev1-default "") (setq rev1-default nil)) - (setq rev2-default (vc-working-revision first)))) + (when (string= rev1-default "") (setq rev1-default nil)))) ;; construct argument list (let* ((rev1-prompt (if rev1-default (concat "Older revision (default "