]> code.delx.au - gnu-emacs/blobdiff - lisp/log-view.el
(command-line-1): Refer to "Pure Storage" on
[gnu-emacs] / lisp / log-view.el
index 7025a8932875d641bddc5e7a87ecb0ef36baa446..dbee454b7d6579f490d890fd2dd6b03cf9bd7b99 100644 (file)
@@ -1,9 +1,9 @@
 ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+;;   2006 Free Software Foundation, Inc.
 
-;; Author: Stefan Monnier <monnier@cs.yale.edu>
+;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords: rcs sccs cvs log version-control
 
 ;; This file is part of GNU Emacs.
 
 (defun log-view-minor-wrap (buf f)
   (let ((data (with-current-buffer buf
-               (cons
-                (cons (log-view-current-file)
-                      (log-view-current-tag))
-                (when mark-active
-                  (save-excursion
-                    (goto-char (mark))
-                    (cons (log-view-current-file)
-                          (log-view-current-tag))))))))
+               (let* ((beg (point))
+                      (end (if mark-active (mark) (point)))
+                      (fr (log-view-current-tag beg))
+                      (to (log-view-current-tag end)))
+                 (when (string-equal fr to)
+                   (save-excursion
+                     (goto-char end)
+                     (log-view-msg-next)
+                     (setq to (log-view-current-tag))))
+                 (cons
+                   ;; The first revision has to be the one at point, for
+                   ;; operations that only take one revision
+                   ;; (e.g. cvs-mode-edit).
+                  (cons (log-view-current-file) fr)
+                  (cons (log-view-current-file) to))))))
     (let ((cvs-branch-prefix (cdar data))
          (cvs-secondary-branch-prefix (and (cdar data) (cddr data)))
          (cvs-minor-current-files