[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/diff-mode.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/diff-mode.el |
Date: |
Tue, 16 Jul 2002 09:37:15 -0400 |
Index: emacs/lisp/diff-mode.el
diff -c emacs/lisp/diff-mode.el:1.45 emacs/lisp/diff-mode.el:1.46
*** emacs/lisp/diff-mode.el:1.45 Tue Jan 1 17:12:19 2002
--- emacs/lisp/diff-mode.el Tue Jul 16 09:37:15 2002
***************
*** 742,751 ****
(delete-char 1) (insert "-") t)
((?\\ ?#) t)
(t (when (and first last (< first last))
! (let ((str
! (save-excursion
! (delete-and-extract-region first last))))
! (insert str)))
(setq first nil last nil)
(equal ?\ c)))
(forward-line 1))))))))))
--- 742,748 ----
(delete-char 1) (insert "-") t)
((?\\ ?#) t)
(t (when (and first last (< first last))
! (insert (delete-and-extract-region first last)))
(setq first nil last nil)
(equal ?\ c)))
(forward-line 1))))))))))
***************
*** 819,825 ****
(if diff-unhandled-changes
(setq diff-unhandled-changes
(cons (min beg (car diff-unhandled-changes))
! (max beg (cdr diff-unhandled-changes))))
(setq diff-unhandled-changes (cons beg end)))))
(defun diff-post-command-hook ()
--- 816,822 ----
(if diff-unhandled-changes
(setq diff-unhandled-changes
(cons (min beg (car diff-unhandled-changes))
! (max end (cdr diff-unhandled-changes))))
(setq diff-unhandled-changes (cons beg end)))))
(defun diff-post-command-hook ()
***************
*** 828,833 ****
--- 825,832 ----
(ignore-errors
(save-excursion
(goto-char (car diff-unhandled-changes))
+ ;; Maybe we've cut the end of the hunk before point.
+ (if (and (bolp) (not (bobp))) (backward-char 1))
;; We used to fixup modifs on all the changes, but it turns out
;; that it's safer not to do it on big changes, for example
;; when yanking a big diff, since we might then screw up perfectly
***************
*** 844,850 ****
(diff-beginning-of-hunk)
(when (save-excursion
(diff-end-of-hunk)
! (> (point) (cdr diff-unhandled-changes)))
(diff-fixup-modifs (point) (cdr diff-unhandled-changes)))))
(setq diff-unhandled-changes nil)))
--- 843,849 ----
(diff-beginning-of-hunk)
(when (save-excursion
(diff-end-of-hunk)
! (>= (point) (cdr diff-unhandled-changes)))
(diff-fixup-modifs (point) (cdr diff-unhandled-changes)))))
(setq diff-unhandled-changes nil)))
***************
*** 1183,1190 ****
(let ((old (if switched dst src)))
(with-temp-buffer
(insert (car old))
- (goto-char (cdr old))
(funcall (with-current-buffer buf major-mode))
(add-log-current-defun))))
(with-current-buffer buf
(goto-char (+ (car pos) (cdr src)))
--- 1182,1189 ----
(let ((old (if switched dst src)))
(with-temp-buffer
(insert (car old))
(funcall (with-current-buffer buf major-mode))
+ (goto-char (+ (point-min) (cdr old)))
(add-log-current-defun))))
(with-current-buffer buf
(goto-char (+ (car pos) (cdr src)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/diff-mode.el,
Stefan Monnier <=