diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2004-04-23 14:44:11 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2004-04-23 14:44:11 +0000 |
commit | ced7ed5611e2a6e60a5ac7a97e165545843d0fa9 (patch) | |
tree | 85194b67c680d1a37af652a4b614a7e1fcd336ba /lisp/diff-mode.el | |
parent | 6ad9aaa961f1ac376bdaa1a5516d0481e6c7fafa (diff) | |
parent | f24814e0e9806db8d01c16b8d8592d6e9b9ee481 (diff) | |
download | emacs-ced7ed5611e2a6e60a5ac7a97e165545843d0fa9.tar.gz emacs-ced7ed5611e2a6e60a5ac7a97e165545843d0fa9.tar.bz2 emacs-ced7ed5611e2a6e60a5ac7a97e165545843d0fa9.zip |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-230
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-231
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-232
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-233
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-234
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-235
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-236
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-237
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-238
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-239
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-240
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-152
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index d41bfcad58a..17602317958 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -48,7 +48,6 @@ ;; ;; - Refine hunk on a word-by-word basis. ;; -;; - Use the new next-error-function to allow C-x `. ;; - Handle `diff -b' output in context->unified. ;;; Code: @@ -886,9 +885,14 @@ See `after-change-functions' for the meaning of BEG, END and LEN." (diff-fixup-modifs (point) (cdr diff-unhandled-changes))))) (setq diff-unhandled-changes nil))) -;;;; -;;;; The main function -;;;; +(defun diff-next-error (arg reset) + ;; Select a window that displays the current buffer so that point + ;; movements are reflected in that window. Otherwise, the user might + ;; never see the hunk corresponding to the source she's jumping to. + (pop-to-buffer (current-buffer)) + (if reset (goto-char (point-min))) + (diff-hunk-next arg) + (diff-goto-source)) ;;;###autoload (define-derived-mode diff-mode fundamental-mode "Diff" @@ -916,6 +920,7 @@ a diff with \\[diff-reverse-direction]." ;; (set (make-local-variable 'paragraph-separate) paragraph-start) ;; (set (make-local-variable 'page-delimiter) "--- [^\t]+\t") ;; compile support + (set (make-local-variable 'next-error-function) 'diff-next-error) (when (and (> (point-max) (point-min)) diff-default-read-only) (toggle-read-only t)) |