comparison lisp/diff.el @ 5542:004856d1b311

(diff): Select the differences buffer.
author Richard M. Stallman <rms@gnu.org>
date Sun, 09 Jan 1994 22:39:21 +0000
parents b203ef787d9c
children f89879182407
comparison
equal deleted inserted replaced
5541:b203ef787d9c 5542:004856d1b311
214 " "))) 214 " ")))
215 (setq buf 215 (setq buf
216 (compile-internal command 216 (compile-internal command
217 "No more differences" "Diff" 217 "No more differences" "Diff"
218 'diff-parse-differences)) 218 'diff-parse-differences))
219 (save-excursion 219 (pop-to-buffer buf)
220 (set-buffer buf) 220 (set (make-local-variable 'diff-old-file) old)
221 (set (make-local-variable 'diff-old-file) old) 221 (set (make-local-variable 'diff-new-file) new)
222 (set (make-local-variable 'diff-new-file) new) 222 (set (make-local-variable 'diff-old-temp-file) old-alt)
223 (set (make-local-variable 'diff-old-temp-file) old-alt) 223 (set (make-local-variable 'diff-new-temp-file) new-alt)
224 (set (make-local-variable 'diff-new-temp-file) new-alt) 224 (set (make-local-variable 'compilation-finish-function)
225 (set (make-local-variable 'compilation-finish-function) 225 (function (lambda (buff msg)
226 (function (lambda (buff msg) 226 (if diff-old-temp-file
227 (if diff-old-temp-file 227 (delete-file diff-old-temp-file))
228 (delete-file diff-old-temp-file)) 228 (if diff-new-temp-file
229 (if diff-new-temp-file 229 (delete-file diff-new-temp-file)))))
230 (delete-file diff-new-temp-file))))))
231 buf)))) 230 buf))))
232 231
233 ;;;###autoload 232 ;;;###autoload
234 (defun diff-backup (file &optional switches) 233 (defun diff-backup (file &optional switches)
235 "Diff this file with its backup file or vice versa. 234 "Diff this file with its backup file or vice versa.