aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index cc89aad6ca3..1a8402e06c4 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -633,8 +633,8 @@ Non-nil OLD means that we want the old file."
633 "Convert unified diffs to context diffs. 633 "Convert unified diffs to context diffs.
634START and END are either taken from the region (if a prefix arg is given) or 634START and END are either taken from the region (if a prefix arg is given) or
635else cover the whole bufer." 635else cover the whole bufer."
636 (interactive (if current-prefix-arg 636 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
637 (list (mark) (point)) 637 (list (region-beginning) (region-end))
638 (list (point-min) (point-max)))) 638 (list (point-min) (point-max))))
639 (unless (markerp end) (setq end (copy-marker end))) 639 (unless (markerp end) (setq end (copy-marker end)))
640 (let (;;(diff-inhibit-after-change t) 640 (let (;;(diff-inhibit-after-change t)
@@ -722,7 +722,7 @@ START and END are either taken from the region
722\(when it is highlighted) or else cover the whole buffer. 722\(when it is highlighted) or else cover the whole buffer.
723With a prefix argument, convert unified format to context format." 723With a prefix argument, convert unified format to context format."
724 (interactive (if (and transient-mark-mode mark-active) 724 (interactive (if (and transient-mark-mode mark-active)
725 (list (mark) (point) current-prefix-arg) 725 (list (region-beginning) (region-end) current-prefix-arg)
726 (list (point-min) (point-max) current-prefix-arg))) 726 (list (point-min) (point-max) current-prefix-arg)))
727 (if to-context 727 (if to-context
728 (diff-unified->context start end) 728 (diff-unified->context start end)
@@ -795,8 +795,8 @@ With a prefix argument, convert unified format to context format."
795 "Reverse the direction of the diffs. 795 "Reverse the direction of the diffs.
796START and END are either taken from the region (if a prefix arg is given) or 796START and END are either taken from the region (if a prefix arg is given) or
797else cover the whole bufer." 797else cover the whole bufer."
798 (interactive (if current-prefix-arg 798 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
799 (list (mark) (point)) 799 (list (region-beginning) (region-end))
800 (list (point-min) (point-max)))) 800 (list (point-min) (point-max))))
801 (unless (markerp end) (setq end (copy-marker end))) 801 (unless (markerp end) (setq end (copy-marker end)))
802 (let (;;(diff-inhibit-after-change t) 802 (let (;;(diff-inhibit-after-change t)
@@ -857,8 +857,8 @@ else cover the whole bufer."
857 "Fixup the hunk headers (in case the buffer was modified). 857 "Fixup the hunk headers (in case the buffer was modified).
858START and END are either taken from the region (if a prefix arg is given) or 858START and END are either taken from the region (if a prefix arg is given) or
859else cover the whole bufer." 859else cover the whole bufer."
860 (interactive (if current-prefix-arg 860 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
861 (list (mark) (point)) 861 (list (region-beginning) (region-end))
862 (list (point-min) (point-max)))) 862 (list (point-min) (point-max))))
863 (let ((inhibit-read-only t)) 863 (let ((inhibit-read-only t))
864 (save-excursion 864 (save-excursion
@@ -1069,7 +1069,7 @@ Only works for unified diffs."
1069 1069
1070(defun diff-hunk-text (hunk destp char-offset) 1070(defun diff-hunk-text (hunk destp char-offset)
1071 "Return the literal source text from HUNK as (TEXT . OFFSET). 1071 "Return the literal source text from HUNK as (TEXT . OFFSET).
1072if DESTP is nil TEXT is the source, otherwise the destination text. 1072If DESTP is nil, TEXT is the source, otherwise the destination text.
1073CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding 1073CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding
1074char-offset in TEXT." 1074char-offset in TEXT."
1075 (with-temp-buffer 1075 (with-temp-buffer
@@ -1302,7 +1302,7 @@ With a prefix argument, try to REVERSE the hunk."
1302`diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg 1302`diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg
1303is given) determines whether to jump to the old or the new file. 1303is given) determines whether to jump to the old or the new file.
1304If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument]) 1304If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument])
1305 then `diff-jump-to-old-file' is also set, for the next invocations." 1305then `diff-jump-to-old-file' is also set, for the next invocations."
1306 (interactive (list current-prefix-arg last-input-event)) 1306 (interactive (list current-prefix-arg last-input-event))
1307 ;; When pointing at a removal line, we probably want to jump to 1307 ;; When pointing at a removal line, we probably want to jump to
1308 ;; the old location, and else to the new (i.e. as if reverting). 1308 ;; the old location, and else to the new (i.e. as if reverting).