/[emacs]/emacs/lisp/diff-mode.el
ViewVC logotype

Diff of /emacs/lisp/diff-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by pj, Tue Jan 1 22:12:19 2002 UTC revision 1.46 by monnier, Tue Jul 16 13:37:15 2002 UTC
# Line 742  else cover the whole bufer." Line 742  else cover the whole bufer."
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))))))))))
# Line 819  See `after-change-functions' for the mea Line 816  See `after-change-functions' for the mea
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 ()
# Line 828  See `after-change-functions' for the mea Line 825  See `after-change-functions' for the mea
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
# Line 844  See `after-change-functions' for the mea Line 843  See `after-change-functions' for the mea
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    
# Line 1183  For use in `add-log-current-defun-functi Line 1182  For use in `add-log-current-defun-functi
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)))

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26