From a9f5a6491c6b3deead2975bfe4da583568a0167a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 9 Aug 2012 15:45:23 +0800 Subject: [PATCH] * lisp/vc/log-view.el (log-view-diff): Use use-region-p. (log-view-diff-changeset, log-view-minor-wrap): Likewise. Fixes: debbugs:10133 --- lisp/ChangeLog | 3 +++ lisp/vc/log-view.el | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a25b1cc431f..533ecae39e2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-08-09 Chong Yidong + * vc/log-view.el (log-view-diff): Use use-region-p (Bug#10133). + (log-view-diff-changeset, log-view-minor-wrap): Likewise. + * align.el (align-region): Delete temporary markers (Bug#10047). Plus some code cleanups. diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index 6514fbd22d7..0f21437419c 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -452,7 +452,7 @@ It assumes that a log entry starts with a line matching (defun log-view-minor-wrap (buf f) (let ((data (with-current-buffer buf (let* ((beg (point)) - (end (if mark-active (mark) (point))) + (end (if (use-region-p) (mark) (point))) (fr (log-view-current-tag beg)) (to (log-view-current-tag end))) (when (string-equal fr to) @@ -544,8 +544,8 @@ and ends. Contrary to `log-view-diff-changeset', it will only show the part of the changeset that affected the currently considered file(s)." (interactive - (list (if mark-active (region-beginning) (point)) - (if mark-active (region-end) (point)))) + (list (if (use-region-p) (region-beginning) (point)) + (if (use-region-p) (region-end) (point)))) (let ((fr (log-view-current-tag beg)) (to (log-view-current-tag end))) (when (string-equal fr to) @@ -569,8 +569,8 @@ and ends. Contrary to `log-view-diff', it will show the whole changeset including the changes that affected other files than the currently considered file(s)." (interactive - (list (if mark-active (region-beginning) (point)) - (if mark-active (region-end) (point)))) + (list (if (use-region-p) (region-beginning) (point)) + (if (use-region-p) (region-end) (point)))) (when (eq (vc-call-backend log-view-vc-backend 'revision-granularity) 'file) (error "The %s backend does not support changeset diffs" log-view-vc-backend)) (let ((fr (log-view-current-tag beg)) -- 2.39.2