742 |
(delete-char 1) (insert "-") t) |
(delete-char 1) (insert "-") t) |
743 |
((?\\ ?#) t) |
((?\\ ?#) t) |
744 |
(t (when (and first last (< first last)) |
(t (when (and first last (< first last)) |
745 |
(let ((str |
(insert (delete-and-extract-region first last))) |
|
(save-excursion |
|
|
(delete-and-extract-region first last)))) |
|
|
(insert str))) |
|
746 |
(setq first nil last nil) |
(setq first nil last nil) |
747 |
(equal ?\ c))) |
(equal ?\ c))) |
748 |
(forward-line 1)))))))))) |
(forward-line 1)))))))))) |
816 |
(if diff-unhandled-changes |
(if diff-unhandled-changes |
817 |
(setq diff-unhandled-changes |
(setq diff-unhandled-changes |
818 |
(cons (min beg (car diff-unhandled-changes)) |
(cons (min beg (car diff-unhandled-changes)) |
819 |
(max beg (cdr diff-unhandled-changes)))) |
(max end (cdr diff-unhandled-changes)))) |
820 |
(setq diff-unhandled-changes (cons beg end))))) |
(setq diff-unhandled-changes (cons beg end))))) |
821 |
|
|
822 |
(defun diff-post-command-hook () |
(defun diff-post-command-hook () |
825 |
(ignore-errors |
(ignore-errors |
826 |
(save-excursion |
(save-excursion |
827 |
(goto-char (car diff-unhandled-changes)) |
(goto-char (car diff-unhandled-changes)) |
828 |
|
;; Maybe we've cut the end of the hunk before point. |
829 |
|
(if (and (bolp) (not (bobp))) (backward-char 1)) |
830 |
;; We used to fixup modifs on all the changes, but it turns out |
;; We used to fixup modifs on all the changes, but it turns out |
831 |
;; that it's safer not to do it on big changes, for example |
;; that it's safer not to do it on big changes, for example |
832 |
;; when yanking a big diff, since we might then screw up perfectly |
;; when yanking a big diff, since we might then screw up perfectly |
843 |
(diff-beginning-of-hunk) |
(diff-beginning-of-hunk) |
844 |
(when (save-excursion |
(when (save-excursion |
845 |
(diff-end-of-hunk) |
(diff-end-of-hunk) |
846 |
(> (point) (cdr diff-unhandled-changes))) |
(>= (point) (cdr diff-unhandled-changes))) |
847 |
(diff-fixup-modifs (point) (cdr diff-unhandled-changes))))) |
(diff-fixup-modifs (point) (cdr diff-unhandled-changes))))) |
848 |
(setq diff-unhandled-changes nil))) |
(setq diff-unhandled-changes nil))) |
849 |
|
|
1182 |
(let ((old (if switched dst src))) |
(let ((old (if switched dst src))) |
1183 |
(with-temp-buffer |
(with-temp-buffer |
1184 |
(insert (car old)) |
(insert (car old)) |
|
(goto-char (cdr old)) |
|
1185 |
(funcall (with-current-buffer buf major-mode)) |
(funcall (with-current-buffer buf major-mode)) |
1186 |
|
(goto-char (+ (point-min) (cdr old))) |
1187 |
(add-log-current-defun)))) |
(add-log-current-defun)))) |
1188 |
(with-current-buffer buf |
(with-current-buffer buf |
1189 |
(goto-char (+ (car pos) (cdr src))) |
(goto-char (+ (car pos) (cdr src))) |