;;; 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