diff lisp/diff-mode.el @ 90389:146cd8369025

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-60 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 259-273) - Update from CVS - lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t - Merge from gnus--rel--5.10 - Rename "field-at-point" to "field-at-pos" - (comint-insert-input): Remove redundant calls to setq and goto-char * gnus--rel--5.10 (patch 99-100) - Merge from emacs--devo--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 10 May 2006 20:42:41 +0000
parents 2ecafc6d5db7 ef7506f44a3a
children a8190f7e546e
line wrap: on
line diff
--- a/lisp/diff-mode.el	Tue May 02 08:50:29 2006 +0000
+++ b/lisp/diff-mode.el	Wed May 10 20:42:41 2006 +0000
@@ -633,8 +633,8 @@
   "Convert unified diffs to context diffs.
 START and END are either taken from the region (if a prefix arg is given) or
 else cover the whole bufer."
-  (interactive (if current-prefix-arg
-		   (list (mark) (point))
+  (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
+		   (list (region-beginning) (region-end))
 		 (list (point-min) (point-max))))
   (unless (markerp end) (setq end (copy-marker end)))
   (let (;;(diff-inhibit-after-change t)
@@ -722,7 +722,7 @@
 \(when it is highlighted) or else cover the whole buffer.
 With a prefix argument, convert unified format to context format."
   (interactive (if (and transient-mark-mode mark-active)
-		   (list (mark) (point) current-prefix-arg)
+		   (list (region-beginning) (region-end) current-prefix-arg)
 		 (list (point-min) (point-max) current-prefix-arg)))
   (if to-context
       (diff-unified->context start end)
@@ -795,8 +795,8 @@
   "Reverse the direction of the diffs.
 START and END are either taken from the region (if a prefix arg is given) or
 else cover the whole bufer."
-  (interactive (if current-prefix-arg
-		   (list (mark) (point))
+  (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
+		   (list (region-beginning) (region-end))
 		 (list (point-min) (point-max))))
   (unless (markerp end) (setq end (copy-marker end)))
   (let (;;(diff-inhibit-after-change t)
@@ -857,8 +857,8 @@
   "Fixup the hunk headers (in case the buffer was modified).
 START and END are either taken from the region (if a prefix arg is given) or
 else cover the whole bufer."
-  (interactive (if current-prefix-arg
-		   (list (mark) (point))
+  (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
+		   (list (region-beginning) (region-end))
 		 (list (point-min) (point-max))))
   (let ((inhibit-read-only t))
     (save-excursion
@@ -1069,7 +1069,7 @@
 
 (defun diff-hunk-text (hunk destp char-offset)
   "Return the literal source text from HUNK as (TEXT . OFFSET).
-if DESTP is nil TEXT is the source, otherwise the destination text.
+If DESTP is nil, TEXT is the source, otherwise the destination text.
 CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding
 char-offset in TEXT."
   (with-temp-buffer
@@ -1302,7 +1302,7 @@
 `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg
 is given) determines whether to jump to the old or the new file.
 If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument])
-  then `diff-jump-to-old-file' is also set, for the next invocations."
+then `diff-jump-to-old-file' is also set, for the next invocations."
   (interactive (list current-prefix-arg last-input-event))
   ;; When pointing at a removal line, we probably want to jump to
   ;; the old location, and else to the new (i.e. as if reverting).