diff options
Diffstat (limited to 'lisp/vc/diff.el')
| -rw-r--r-- | lisp/vc/diff.el | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index dd4b4757e88..2eefdee1836 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; diff.el --- run `diff' | 1 | ;;; diff.el --- run `diff' -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1994, 1996, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 1994, 1996, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -147,11 +147,8 @@ specified in `diff-switches' are passed to the diff command." | |||
| 147 | (buffer-enable-undo (current-buffer)) | 147 | (buffer-enable-undo (current-buffer)) |
| 148 | (diff-mode) | 148 | (diff-mode) |
| 149 | (set (make-local-variable 'revert-buffer-function) | 149 | (set (make-local-variable 'revert-buffer-function) |
| 150 | (lexical-let ((old old) (new new) | 150 | (lambda (_ignore-auto _noconfirm) |
| 151 | (switches switches) | 151 | (diff-no-select old new switches no-async (current-buffer)))) |
| 152 | (no-async no-async)) | ||
| 153 | (lambda (ignore-auto noconfirm) | ||
| 154 | (diff-no-select old new switches no-async (current-buffer))))) | ||
| 155 | (setq default-directory thisdir) | 152 | (setq default-directory thisdir) |
| 156 | (let ((inhibit-read-only t)) | 153 | (let ((inhibit-read-only t)) |
| 157 | (insert command "\n")) | 154 | (insert command "\n")) |
| @@ -159,12 +156,11 @@ specified in `diff-switches' are passed to the diff command." | |||
| 159 | (let ((proc (start-process "Diff" buf shell-file-name | 156 | (let ((proc (start-process "Diff" buf shell-file-name |
| 160 | shell-command-switch command))) | 157 | shell-command-switch command))) |
| 161 | (set-process-filter proc 'diff-process-filter) | 158 | (set-process-filter proc 'diff-process-filter) |
| 162 | (lexical-let ((old-alt old-alt) (new-alt new-alt)) | 159 | (set-process-sentinel |
| 163 | (set-process-sentinel | 160 | proc (lambda (proc _msg) |
| 164 | proc (lambda (proc msg) | 161 | (with-current-buffer (process-buffer proc) |
| 165 | (with-current-buffer (process-buffer proc) | 162 | (diff-sentinel (process-exit-status proc) |
| 166 | (diff-sentinel (process-exit-status proc) | 163 | old-alt new-alt))))) |
| 167 | old-alt new-alt)))))) | ||
| 168 | ;; Async processes aren't available. | 164 | ;; Async processes aren't available. |
| 169 | (let ((inhibit-read-only t)) | 165 | (let ((inhibit-read-only t)) |
| 170 | (diff-sentinel | 166 | (diff-sentinel |