]> code.delx.au - gnu-emacs/blobdiff - lisp/log-view.el
(gdb-mouse-toggle-breakpoint-margin)
[gnu-emacs] / lisp / log-view.el
index 01fb0b2f0a85fc13172298d1ecd991df24101ac9..6fbe84296719e14a5233338422f5d985f704811f 100644 (file)
@@ -1,10 +1,10 @@
 ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output
 
 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008, 2009  Free Software Foundation, Inc.
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
-;; Keywords: rcs sccs cvs log version-control
+;; Keywords: rcs sccs cvs log version-control tools
 
 ;; This file is part of GNU Emacs.
 
 (eval-when-compile (require 'cl))
 (require 'pcvs-util)
 (autoload 'vc-find-revision "vc")
-(autoload 'vc-version-diff "vc")
+(autoload 'vc-diff-internal "vc")
 
 (defvar cvs-minor-wrap-function)
 
   :group 'pcl-cvs
   :prefix "log-view-")
 
+;; Needed because log-view-mode-map inherits from widget-keymap.  (Bug#5311)
+(require 'wid-edit)
+
 (easy-mmode-defmap log-view-mode-map
   '(("z" . kill-this-buffer)
+    ("q" . quit-window)
     ("m" . log-view-toggle-mark-entry)
     ("e" . log-view-modify-change-comment)
     ("d" . log-view-diff)
+    ("=" . log-view-diff)
     ("D" . log-view-diff-changeset)
     ("a" . log-view-annotate-version)
     ("f" . log-view-find-revision)
     ("\M-n" . log-view-file-next)
     ("\M-p" . log-view-file-prev))
   "Log-View's keymap."
+  :inherit widget-keymap
   :group 'log-view)
 
 (easy-menu-define log-view-mode-menu log-view-mode-map
@@ -483,7 +489,9 @@ log entries."
 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."
+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))))
@@ -494,11 +502,12 @@ and ends."
         (goto-char end)
         (log-view-msg-next)
         (setq to (log-view-current-tag))))
-    (vc-version-diff
-     (if log-view-per-file-logs
-        (list (log-view-current-file))
-       log-view-vc-fileset)
-       to fr)))
+    (vc-diff-internal
+     t (list log-view-vc-backend
+            (if log-view-per-file-logs
+                (list (log-view-current-file))
+              log-view-vc-fileset))
+     to fr)))
 
 (declare-function vc-diff-internal "vc"
                  (async vc-fileset rev1 rev2 &optional verbose))
@@ -508,7 +517,9 @@ and ends."
 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."
+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))))