aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-08-09 15:45:23 +0800
committerChong Yidong2012-08-09 15:45:23 +0800
commita9f5a6491c6b3deead2975bfe4da583568a0167a (patch)
tree7ca59d955049fedd56768d54f9ea219c6d4f3403
parentdab7711b3848fa6a22b23a5c33597ce9c8ad5d08 (diff)
downloademacs-a9f5a6491c6b3deead2975bfe4da583568a0167a.tar.gz
emacs-a9f5a6491c6b3deead2975bfe4da583568a0167a.zip
* lisp/vc/log-view.el (log-view-diff): Use use-region-p.
(log-view-diff-changeset, log-view-minor-wrap): Likewise. Fixes: debbugs:10133
-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 @@
12012-08-09 Chong Yidong <cyd@gnu.org> 12012-08-09 Chong Yidong <cyd@gnu.org>
2 2
3 * vc/log-view.el (log-view-diff): Use use-region-p (Bug#10133).
4 (log-view-diff-changeset, log-view-minor-wrap): Likewise.
5
3 * align.el (align-region): Delete temporary markers (Bug#10047). 6 * align.el (align-region): Delete temporary markers (Bug#10047).
4 Plus some code cleanups. 7 Plus some code cleanups.
5 8
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
452(defun log-view-minor-wrap (buf f) 452(defun log-view-minor-wrap (buf f)
453 (let ((data (with-current-buffer buf 453 (let ((data (with-current-buffer buf
454 (let* ((beg (point)) 454 (let* ((beg (point))
455 (end (if mark-active (mark) (point))) 455 (end (if (use-region-p) (mark) (point)))
456 (fr (log-view-current-tag beg)) 456 (fr (log-view-current-tag beg))
457 (to (log-view-current-tag end))) 457 (to (log-view-current-tag end)))
458 (when (string-equal fr to) 458 (when (string-equal fr to)
@@ -544,8 +544,8 @@ and ends.
544Contrary to `log-view-diff-changeset', it will only show the part of the 544Contrary to `log-view-diff-changeset', it will only show the part of the
545changeset that affected the currently considered file(s)." 545changeset that affected the currently considered file(s)."
546 (interactive 546 (interactive
547 (list (if mark-active (region-beginning) (point)) 547 (list (if (use-region-p) (region-beginning) (point))
548 (if mark-active (region-end) (point)))) 548 (if (use-region-p) (region-end) (point))))
549 (let ((fr (log-view-current-tag beg)) 549 (let ((fr (log-view-current-tag beg))
550 (to (log-view-current-tag end))) 550 (to (log-view-current-tag end)))
551 (when (string-equal fr to) 551 (when (string-equal fr to)
@@ -569,8 +569,8 @@ and ends.
569Contrary to `log-view-diff', it will show the whole changeset including 569Contrary to `log-view-diff', it will show the whole changeset including
570the changes that affected other files than the currently considered file(s)." 570the changes that affected other files than the currently considered file(s)."
571 (interactive 571 (interactive
572 (list (if mark-active (region-beginning) (point)) 572 (list (if (use-region-p) (region-beginning) (point))
573 (if mark-active (region-end) (point)))) 573 (if (use-region-p) (region-end) (point))))
574 (when (eq (vc-call-backend log-view-vc-backend 'revision-granularity) 'file) 574 (when (eq (vc-call-backend log-view-vc-backend 'revision-granularity) 'file)
575 (error "The %s backend does not support changeset diffs" log-view-vc-backend)) 575 (error "The %s backend does not support changeset diffs" log-view-vc-backend))
576 (let ((fr (log-view-current-tag beg)) 576 (let ((fr (log-view-current-tag beg))