comparison lisp/diff-mode.el @ 78429:a3a4480349cb

(diff-unified->context, diff-reverse-direction, diff-fixup-modifs): Typo in docstring.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 06 Aug 2007 20:08:08 +0000
parents 2dd5d799a16d
children b2023ab19990 e5a68f18fcb9
comparison
equal deleted inserted replaced
78428:65b1a3eb58c4 78429:a3a4480349cb
683 ;; "Non-nil means inhibit `diff-mode's after-change functions.") 683 ;; "Non-nil means inhibit `diff-mode's after-change functions.")
684 684
685 (defun diff-unified->context (start end) 685 (defun diff-unified->context (start end)
686 "Convert unified diffs to context diffs. 686 "Convert unified diffs to context diffs.
687 START and END are either taken from the region (if a prefix arg is given) or 687 START and END are either taken from the region (if a prefix arg is given) or
688 else cover the whole bufer." 688 else cover the whole buffer."
689 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) 689 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
690 (list (region-beginning) (region-end)) 690 (list (region-beginning) (region-end))
691 (list (point-min) (point-max)))) 691 (list (point-min) (point-max))))
692 (unless (markerp end) (setq end (copy-marker end t))) 692 (unless (markerp end) (setq end (copy-marker end t)))
693 (let (;;(diff-inhibit-after-change t) 693 (let (;;(diff-inhibit-after-change t)
845 -1)) " @@"))))))))))) 845 -1)) " @@")))))))))))
846 846
847 (defun diff-reverse-direction (start end) 847 (defun diff-reverse-direction (start end)
848 "Reverse the direction of the diffs. 848 "Reverse the direction of the diffs.
849 START and END are either taken from the region (if a prefix arg is given) or 849 START and END are either taken from the region (if a prefix arg is given) or
850 else cover the whole bufer." 850 else cover the whole buffer."
851 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) 851 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
852 (list (region-beginning) (region-end)) 852 (list (region-beginning) (region-end))
853 (list (point-min) (point-max)))) 853 (list (point-min) (point-max))))
854 (unless (markerp end) (setq end (copy-marker end t))) 854 (unless (markerp end) (setq end (copy-marker end t)))
855 (let (;;(diff-inhibit-after-change t) 855 (let (;;(diff-inhibit-after-change t)
907 (forward-line 1)))))))))) 907 (forward-line 1))))))))))
908 908
909 (defun diff-fixup-modifs (start end) 909 (defun diff-fixup-modifs (start end)
910 "Fixup the hunk headers (in case the buffer was modified). 910 "Fixup the hunk headers (in case the buffer was modified).
911 START and END are either taken from the region (if a prefix arg is given) or 911 START and END are either taken from the region (if a prefix arg is given) or
912 else cover the whole bufer." 912 else cover the whole buffer."
913 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) 913 (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
914 (list (region-beginning) (region-end)) 914 (list (region-beginning) (region-end))
915 (list (point-min) (point-max)))) 915 (list (point-min) (point-max))))
916 (let ((inhibit-read-only t)) 916 (let ((inhibit-read-only t))
917 (save-excursion 917 (save-excursion