;ELC   
;;; Compiled by rms@psilocin.ai.mit.edu on Sat Mar 14 02:50:29 1998
;;; from file /gd/gnu/emacs/lisp/diff.el
;;; in Emacs version 20.2.89.9
;;; with bytecomp version 2.38
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`diff.el' was compiled for Emacs 19.29 or later"))


(byte-code "\301\302!\210\303\304\305\306\307%\207" [:group require compile custom-declare-group diff nil "Comparing files with `diff'." tools] 6)
#@75 *A string or list of strings specifying switches to be be passed to diff.
(custom-declare-variable 'diff-switches '"-c" '(#$ . -674) :type '(choice string (repeat string)) :group 'diff)
#@34 *The command to use to run diff.
(custom-declare-variable 'diff-command '"diff" '(#$ . -866) :type 'string :group 'diff)
#@326 Alist (REGEXP OLD-IDX NEW-IDX) of regular expressions to match difference
sections in \[diff] output.  If REGEXP matches, the OLD-IDX'th
subexpression gives the line number in the old file, and NEW-IDX'th
subexpression gives the line number in the new file.  If OLD-IDX or NEW-IDX
is nil, REGEXP matches only half a section.
(defvar diff-regexp-alist '(("^@@ -\\([0-9]+\\),[0-9]+ \\+\\([0-9]+\\),[0-9]+ @@$" 1 2) ("^\\*\\*\\* \\([0-9]+\\),[0-9]+ \\*\\*\\*\\*$" 1 nil) ("^--- \\([0-9]+\\),[0-9]+ ----$" nil 1) ("^\\([0-9]+\\)\\(,[0-9]+\\)?[adc]\\([0-9]+\\)\\(,[0-9]+\\)?$" 1 3) ("^\\([0-9]+\\)\\(,[0-9]+\\)?[adc]$" 1) ("^[adc]\\([0-9]+\\)\\( [0-9]+\\)?$" 1)) (#$ . 994))
#@61 This is the old file name in the comparison in this buffer.
(defvar diff-old-file nil (#$ . 1670))
#@61 This is the new file name in the comparison in this buffer.
(defvar diff-new-file nil (#$ . 1775))
#@68 This is the name of a temp file to be deleted after diff finishes.
(defvar diff-old-temp-file nil (#$ . 1880))
#@68 This is the name of a temp file to be deleted after diff finishes.
(defvar diff-new-temp-file nil (#$ . 1997))
(defalias 'diff-parse-differences #[(limit-search find-at-least) "\306\307\310!\210	\203 	b\210\311\312\n\313#\314\315\316\n\")\317\306\320\306\204\215 \321\306\322#\203\215 \211\203J \f@@\224\204J \fA\211\204< \f@\211A@\203\\ \fA@\"\210\323\f8\203k \323\f8\"\210T\203z Y\204\206 \203' `Y\203' \322\211\203, \203\227 `\202\231 d\307\324!\210.\237\211\207" [compilation-error-list compilation-parsing-end diff-regexp-alist subexpr g num-loci-found nil message "Parsing differences..." mapconcat #[(elt) "\301@\302Q\207" [elt "\\(" "\\)"] 3] "\\|" 1 mapcar #[(elt) "\302\303	A\"B\304	@!\\\305\\\207" [subexpr elt mapcar #[(n) "\205 	\\\207" [n subexpr] 2] count-regexp-groupings 1] 4] #[(file subexpr) "\212\224b\210\305y\210\306 )\307\224\225{!\212\310 \311\216\312!q\210*\212\313	!\210\306 +B\fB\211\207" [subexpr line save-match-data-internal file compilation-error-list 0 point-marker string-to-int match-data ((set-match-data save-match-data-internal)) find-file-noselect goto-line] 4] 0 re-search-forward t 2 "Parsing differences...done" found-desired new-error groups regexp diff-old-file diff-new-file find-at-least limit-search] 7])
#@56 Set up `compilation-exit-message-function' for `diff'.
(defalias 'diff-process-setup #[nil "\300\301!\302L\207" [make-local-variable compilation-exit-message-function #[(status code msg) "\303=\204\n 	\nB\207\n\304U\203 \305\207\n\306U\203 \307\207	\nB\207" [status msg code exit 0 ("finished (no differences)\n" . "no differences") 1 ("finished\n" . "differences found")] 2]] 2 (#$ . 3318)])
#@222 Find and display the differences between OLD and NEW files.
Interactively the current buffer's file name is the default for NEW
and a backup file for NEW is the default for OLD.
With prefix arg, prompt for diff switches.
(defalias 'diff #[(old new &optional switches) "\306!\306	!\307	!\307!\310\212\311\312\313\314C\203/ :\203) \202= C\202= :\203: \202= C\f\204E \205J \315	\315F\316\f\206P 	!C\316\206X !C%\317# \320\321\322\323$\211q\210\324\325!	L\210\324\326!L\210\324\327!\fL\210\324\330!L\210\324\331!\332L\210\333\334!\204\226 \310\211\"\210\n.\207" [new old buf new-alt old-alt diff-command expand-file-name file-local-copy nil diff-process-setup mapconcat identity append "-L" shell-quote-argument " " compile-internal "No more differences" "Diff" diff-parse-differences make-local-variable diff-old-file diff-new-file diff-old-temp-file diff-new-temp-file compilation-finish-function #[(buff msg) "\203 \302!\210	\205 \302	!\207" [diff-old-temp-file diff-new-temp-file delete-file] 2] fboundp start-process switches diff-switches command compilation-process-setup-function] 11 (#$ . 3721) (byte-code "\304\211\305 \211\203 \306!\203 \307\310\311!\312Q\304\313$\202% \307\314\304\211\313$\211\315!\211\203E \306	!\203E \307\316\311	!\312Q\317	!	\313$\202M \307\320\317!\304\313$\211D\237*\n\205h \321\322;\203a \202f \323\324\325#\"C\244\207" [newf oldf current-prefix-arg diff-switches nil buffer-file-name file-exists-p read-file-name "Diff new file: (" file-name-nondirectory ") " t "Diff new file: " file-newest-backup "Diff original file: (" file-name-directory "Diff original file: " read-string "Diff switches: " mapconcat identity " "] 8)])
#@220 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'.
(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 (#$ . 5444) (list (read-file-name "Diff (file with backup): ") (if current-prefix-arg (read-string "Diff switches: " (if (stringp diff-switches) diff-switches (mapconcat 'identity diff-switches " "))) nil))])
#@52 Return the latest existing backup of FILE, or nil.
(defalias 'diff-latest-backup-file #[(fn) "\306\307\"\211\203 	\307\"\202E \310\311!!\312!\313\n!\205! \n)\206E \314!@\315!\316\317!!\320P\211G\f\321\322\f\"\323\"@P,)\207" [fn handler bak backupname dir base-versions find-file-name-handler diff-latest-backup-file file-chase-links expand-file-name make-backup-file-name file-exists-p find-backup-file-name file-name-directory file-name-sans-versions file-name-nondirectory ".~" sort file-name-all-completions #[(fn1 fn2) "\302!\302	!V\207" [fn1 fn2 backup-extract-version] 3] backup-extract-version-start] 6 (#$ . 6147)])
(provide 'diff)
