;ELC
;;; Compiled by LTX@Xue-LingTaos-MacBook-Pro.local on Wed Mar 16 23:19:21 2011
;;; from file /Users/LTX/Projects/Emacs/emacs/lisp/vc/diff.el
;;; in Emacs version 24.0.50.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(custom-declare-group 'diff nil "Comparing files with `diff'." :group 'tools)
#@71 A string or list of strings specifying switches to be passed to diff.
(custom-declare-variable 'diff-switches '(purecopy "-c") '(#$ . 619) :type '(choice string (repeat string)) :group 'diff)
#@33 The command to use to run diff.
(custom-declare-variable 'diff-command '(purecopy "diff") '(#$ . 817) :type 'string :group 'diff)
(defalias 'diff-switches #[nil "\205\302\303	;\203	\202\304\305	\306#\"\207" [current-prefix-arg diff-switches read-string "Diff switches: " mapconcat identity " "] 6])
#@224 Code run when the diff process exits.
CODE is the exit code of the process.  It should be 0 only if no diffs
were found.
If optional args OLD-TEMP-FILE and/or NEW-TEMP-FILE are non-nil,
delete the temporary files so named.
(defalias 'diff-sentinel #[(code &optional old-temp-file new-temp-file) "\203\304!\210	\203\304	!\210\212db\210\305\306\307\310\232\203\"\311\202-\312\232\203,\313\202-\314\315 #c*\207" [old-temp-file new-temp-file inhibit-read-only code delete-file t format "\nDiff finished%s.  %s\n" 0 " (no differences)" 2 " (diff error)" "" current-time-string] 4 (#$ . 1130)])
#@473 Find and display the differences between OLD and NEW files.
When called interactively, read OLD and NEW using the minibuffer;
the default for NEW is the current buffer's file name, and the
default for OLD is a backup file for NEW, if one exists.
If NO-ASYNC is non-nil, call diff synchronously.

When called interactively with a prefix argument, prompt
interactively for diff switches.  Otherwise, the switches
specified in `diff-switches' are passed to the diff command.
(defalias 'diff #[(old new &optional switches no-async) "\304\305	\n$!\207" [old new switches no-async display-buffer diff-no-select] 6 (#$ . 1739) (let* ((newf (if (and buffer-file-name (file-exists-p buffer-file-name)) (read-file-name (concat "Diff new file (default " (file-name-nondirectory buffer-file-name) "): ") nil buffer-file-name t) (read-file-name "Diff new file: " nil nil t))) (oldf (file-newest-backup newf))) (setq oldf (if (and oldf (file-exists-p oldf)) (read-file-name (concat "Diff original file (default " (file-name-nondirectory oldf) "): ") (file-name-directory oldf) oldf t) (read-file-name "Diff original file: " (file-name-directory newf) nil t))) (list oldf newf (diff-switches)))])
(defalias 'diff-file-local-copy #[(file-or-buf) "\302!\203rq\210\303\304!\305\306\211	\306\307%\210	*\207\310!\207" [file-or-buf tempfile bufferp make-temp-file "buffer-content-" write-region nil nomessage file-local-copy] 6])
(defalias 'diff-no-select #[(old new &optional switches no-async buf) "\306!\204\n\307!\306	!\204\307	!\n\204\n<\204\"\nC\f\204*\310\311!\312	!\312!2\313\3143\315\n\316\317
\204D2\205_\320	;\203N	\202Q\321	!\320;\203[\202^\321!F
\206d	2\206jD\244\"\"B\322#456r\fq\210\3237\324p!\210\3238\325 \210)\326p!\210\327 \210\330\331!\210\332\333!\332\334!\332\335!\332\336!9:;\211<	L\210;L\210:\nL\2109=L\210\337\340\341\342\3439D\343:D\343;D\343<D\344\257E,65\32384\345\261\210)=\204/\346\347!\203/\347\350\f>?4%@\351@\352\"\210\332\353!\332\354!A\211B
L\210A2L\210\355@\337\340\341\356\343AD\343BD\344\257E\"\210+\202E\3238\357\360>\361\f\361?4&
2#\210))\f,\207" [new old switches diff-switches buf old-alt bufferp expand-file-name get-buffer-create "*Diff*" diff-file-local-copy mapconcat identity append mapcar shell-quote-argument "-L" prin1-to-string " " t buffer-disable-undo erase-buffer buffer-enable-undo diff-mode make-local-variable revert-buffer-function make-symbol "--old--" "--new--" "--switches--" "--no-async--" lambda (&rest --cl-rest--) apply #[(#1=#:G94500 #2=#:G94501 #3=#:G94502 #4=#:G94503 ignore-auto noconfirm) "\304J	J\nJJp%\207" [#4# #3# #2# #1# diff-no-select] 6] quote --cl-rest-- "\n" fboundp start-process "Diff" set-process-filter diff-process-filter "--old-alt--" "--new-alt--" set-process-sentinel #[(#5=#:G94504 #6=#:G94505 proc msg) "r\303!q\210\304\305!	J\nJ#)\207" [proc #6# #5# process-buffer diff-sentinel process-exit-status] 4] diff-sentinel call-process nil new-alt diff-command command default-directory thisdir buffer-read-only inhibit-read-only #7=#:--cl-no-async-- #8=#:--cl-switches-- #9=#:--cl-new-- #10=#:--cl-old-- no-async shell-file-name shell-command-switch proc #11=#:--cl-new-alt-- #12=#:--cl-old-alt--] 13])
(defalias 'diff-process-filter #[(proc string) "r\304!q\210`\305!U\212\305!b\210\306c\210)\305!`\307\223\210)	\205(\305!b*\207" [proc moving inhibit-read-only string process-buffer process-mark t nil] 3])
#@263 Diff this file with its backup file or vice versa.
Uses the latest backup, if there are several numerical backups.
If this file is a backup, diff it with its original.
The backup file is the first file given to `diff'.
With prefix arg, prompt for diff switches.
(defalias 'diff-backup #[(file &optional switches) "\304\211\305\n!\203\n\306\n!\202 \307\n!\206\310\311\n\"\n\312	#*\207" [ori bak file switches nil backup-file-name-p file-name-sans-versions diff-latest-backup-file error "No backup found for %s" diff] 4 (#$ . 5221) (list (read-file-name "Diff (file with backup): ") (diff-switches))])
#@52 Return the latest existing backup of FILE, or nil.
(defalias 'diff-latest-backup-file #[(fn) "\302\303\"\211\203	\303\"\202\304!)\207" [fn handler find-file-name-handler diff-latest-backup-file file-newest-backup] 4 (#$ . 5840)])
#@131 View the differences between BUFFER and its associated file.
This requires the external program `diff' to be in your `exec-path'.
(defalias 'diff-buffer-with-file #[(&optional buffer) "r\302\206p!q\210\303	p\304\305$)\207" [buffer buffer-file-name get-buffer diff nil noasync] 5 (#$ . 6085) "bBuffer: "])
(provide 'diff)
