]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/log-view.el
* mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
[gnu-emacs] / lisp / vc / log-view.el
index 6514fbd22d767700e4bde575cb5325a1339509cb..b74ff77bc4119be9fafe1148e9bb6eff20a81f3d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output -*- lexical-binding: t -*-
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords: rcs, sccs, cvs, log, vc, tools
@@ -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)
@@ -537,15 +537,17 @@ It assumes that a log entry starts with a line matching
 
 (defun log-view-diff (beg end)
   "Get the diff between two revisions.
-If the mark is not active or the mark is on the revision at point,
-get the diff between the revision at point and its previous revision.
-Otherwise, get the diff between the revisions where the region starts
-and ends.
-Contrary to `log-view-diff-changeset', it will only show the part of the
-changeset that affected the currently considered file(s)."
+If the region is inactive or the mark is on the revision at
+point, get the diff between the revision at point and its
+previous revision.  Otherwise, get the diff between the revisions
+where the region starts and ends.
+
+Unlike `log-view-diff-changeset', this function only shows the
+part of the changeset which 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)
@@ -562,15 +564,17 @@ changeset that affected the currently considered file(s)."
 
 (defun log-view-diff-changeset (beg end)
   "Get the diff between two revisions.
-If the mark is not active or the mark is on the revision at point,
-get the diff between the revision at point and its previous revision.
-Otherwise, get the diff between the revisions where the region starts
-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)."
+If the region is inactive or the mark is on the revision at
+point, get the diff between the revision at point and its
+previous revision.  Otherwise, get the diff between the revisions
+where the region starts and ends.
+
+Unlike `log-view-diff' this function shows the whole changeset,
+including changes affecting 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))