summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-08-09 15:45:23 +0800
committerChong Yidong <cyd@gnu.org>2012-08-09 15:45:23 +0800
commita9f5a6491c6b3deead2975bfe4da583568a0167a (patch)
tree7ca59d955049fedd56768d54f9ea219c6d4f3403 /lisp
parentdab7711b3848fa6a22b23a5c33597ce9c8ad5d08 (diff)
downloademacs-a9f5a6491c6b3deead2975bfe4da583568a0167a.tar.gz
* lisp/vc/log-view.el (log-view-diff): Use use-region-p.
(log-view-diff-changeset, log-view-minor-wrap): Likewise. Fixes: debbugs:10133
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/vc/log-view.el10
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 <cyd@gnu.org>
+ * 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))