;;; compiled by rms@mole.gnu.ai.mit.edu on Sun May  9 13:59:47 1993
;;; from file /home/fsf/rms/e19/lisp/diff.el
;;; emacs version 19.5.10.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(require (quote compile))
(defvar diff-switches "-c" "\
*A string or list of strings specifying switches to be be passed to diff.")
(defvar diff-regexp-alist (quote (("^@@ -\\([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))) "\
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-old-file nil "\
This is the old file name in the comparison in this buffer.")
(defvar diff-new-file nil "\
This is the new file name in the comparison in this buffer.")
(defvar diff-old-temp-file nil "\
This is the name of a temp file to be deleted after diff finishes.")
(defvar diff-new-temp-file nil "\
This is the name of a temp file to be deleted after diff finishes.")
(fset (quote diff-parse-differences) #[(limit-search find-at-least) "ÀÂÃ!ˆƒ bˆÅÆÈ#É\nËÌ\")ÍÀÎÀ„Ÿ ÕÀÖ#ƒŸ ‰ƒT ×@@!„T A‰„B @‰A@ƒi A@\"ˆÙ8ƒz Ù8\"ˆTƒŒ Y„˜ ƒ, `Yƒ, Ö‰ƒ1 ƒ© `‚« dÂÝ!ˆ.Þ	!‰‡" [nil compilation-error-list message "Parsing differences..." compilation-parsing-end mapconcat #[(elt) "À	@ÂQ‡" ["\\(" elt "\\)"] 3] diff-regexp-alist "\\|" 1 subexpr mapcar #[(elt) "ÁÂA\"BÄ@!Å\\\\‡" [subexpr mapcar #[(n) "… 	\\‡" [n subexpr] 2] elt count-regexp-groupings 1] 4] #[(file subexpr) "ŠÀ	!bˆÂÃ!ˆÄ )ÅÆÀ	!Ç	!\"!ŠÉ\n!qˆŠË!ˆÄ +BB‰‡" [match-beginning subexpr forward-line 0 point-marker string-to-int buffer-substring match-end line find-file-noselect file goto-line compilation-error-list] 6] 0 g num-loci-found found-desired new-error groups regexp re-search-forward t match-beginning diff-old-file 2 diff-new-file find-at-least limit-search "Parsing differences...done" nreverse] 7])
(defalias 'diff #[(old new &optional switches) "À	!À\n!Ã\n!Ã	!ÄÄŽÈÉÊË:ƒ% ‚( C„2 …7 Í\nÍ	F†= \nC†D 	C%Î#ÐÑÒÓ$ŠqˆÔÕ!\nLˆÔÖ!	LˆÔ×!LˆÔØ!LˆÔÙ!ÚLˆ)-‡" [expand-file-name new old file-local-copy nil buf new-alt old-alt mapconcat identity append ("diff") diff-switches "-L" " " command 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) "ƒ Á!ˆ\n… Á\n!‡" [diff-old-temp-file delete-file diff-new-temp-file] 2]] 9 "\
Find and display the differences between OLD and NEW files.
Interactively the current buffer's file name is the default for for NEW
and a backup file for NEW is the default for OLD.
With prefix arg, prompt for diff switches." (byte-code "ÀÁ‰ÄÅ ‰ƒ! Æ\n!ƒ! ÇÈÉ\n!ÊQÁ\nË$‚' ÇÌÁ‰Ë$‰Í\n!‰ƒG Æ!ƒG ÇÎÉ!ÊQÏ!Ë$‚O ÇÐÏ\n!ÁË$‰D!*…n ÒÓ;ƒf ‚l ÕÖ×#\"C\"‡" [nconc nil newf oldf nreverse 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: " current-prefix-arg read-string "Diff switches: " diff-switches mapconcat identity " "] 9)])
(defalias 'diff-backup #[(file &optional switches) "À‰Ã!ƒ Å!‚  Æ!† ÇÈ\"É\n	\n#*‡" [nil ori bak backup-file-name-p file file-name-sans-versions diff-latest-backup-file error "No backup found for %s" diff switches] 4 "\
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'." (list (read-file-name "Diff (file with backup): ") (if current-prefix-arg (read-string "Diff switches: " (if (stringp diff-switches) diff-switches (mapconcat (quote identity) diff-switches " "))) nil))])
(defalias 'diff-latest-backup-file #[(fn) "À	!Â	!Ä!… )†1 Å	!Ç	!ÈP‰	G\nËÌ	\"Í\"@P+‡" [expand-file-name fn make-backup-file-name bak file-exists-p file-name-directory dir file-name-nondirectory ".~" base-versions bv-length sort file-name-all-completions #[(fn1 fn2) "À	!À\n!V‡" [backup-extract-version fn1 fn2] 3]] 6 "\
Return the latest existing backup of FILE, or nil."])
(provide (quote diff))
