diff options
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 @@ | |||
| 48 | ;; | 48 | ;; |
| 49 | ;; - Refine hunk on a word-by-word basis. | 49 | ;; - Refine hunk on a word-by-word basis. |
| 50 | ;; | 50 | ;; |
| 51 | ;; - Use the new next-error-function to allow C-x `. | ||
| 52 | ;; - Handle `diff -b' output in context->unified. | 51 | ;; - Handle `diff -b' output in context->unified. |
| 53 | 52 | ||
| 54 | ;;; Code: | 53 | ;;; Code: |
| @@ -886,9 +885,14 @@ See `after-change-functions' for the meaning of BEG, END and LEN." | |||
| 886 | (diff-fixup-modifs (point) (cdr diff-unhandled-changes))))) | 885 | (diff-fixup-modifs (point) (cdr diff-unhandled-changes))))) |
| 887 | (setq diff-unhandled-changes nil))) | 886 | (setq diff-unhandled-changes nil))) |
| 888 | 887 | ||
| 889 | ;;;; | 888 | (defun diff-next-error (arg reset) |
| 890 | ;;;; The main function | 889 | ;; Select a window that displays the current buffer so that point |
| 891 | ;;;; | 890 | ;; movements are reflected in that window. Otherwise, the user might |
| 891 | ;; never see the hunk corresponding to the source she's jumping to. | ||
| 892 | (pop-to-buffer (current-buffer)) | ||
| 893 | (if reset (goto-char (point-min))) | ||
| 894 | (diff-hunk-next arg) | ||
| 895 | (diff-goto-source)) | ||
| 892 | 896 | ||
| 893 | ;;;###autoload | 897 | ;;;###autoload |
| 894 | (define-derived-mode diff-mode fundamental-mode "Diff" | 898 | (define-derived-mode diff-mode fundamental-mode "Diff" |
| @@ -916,6 +920,7 @@ a diff with \\[diff-reverse-direction]." | |||
| 916 | ;; (set (make-local-variable 'paragraph-separate) paragraph-start) | 920 | ;; (set (make-local-variable 'paragraph-separate) paragraph-start) |
| 917 | ;; (set (make-local-variable 'page-delimiter) "--- [^\t]+\t") | 921 | ;; (set (make-local-variable 'page-delimiter) "--- [^\t]+\t") |
| 918 | ;; compile support | 922 | ;; compile support |
| 923 | (set (make-local-variable 'next-error-function) 'diff-next-error) | ||
| 919 | 924 | ||
| 920 | (when (and (> (point-max) (point-min)) diff-default-read-only) | 925 | (when (and (> (point-max) (point-min)) diff-default-read-only) |
| 921 | (toggle-read-only t)) | 926 | (toggle-read-only t)) |