;ELC ;;; compiled by kwzh@nutrimat.gnu.ai.mit.edu on Wed Jul 17 15:40:48 1996 ;;; from file /gd/gnu/emacs/19.0/lisp/ediff-diff.el ;;; emacs version 19.31.94.1. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`ediff-diff.el' was compiled for Emacs 19.29 or later")) (require (quote ediff-init)) #@366 *The shell used to run diff and patch. If user's .profile or .cshrc files are set up correctly, any shell will do. However, some people set $prompt or other things incorrectly, which leads to undesirable output messages. These may cause Ediff to fail. In such a case, set ediff-shell to a shell that you are not using or, better, fix your shell's startup file. (defvar ediff-shell (byte-code "=‡>\f>ƇLJ" [system-type emx "cmd" (ms-dos windows-nt windows-95) shell-file-name (vax-vms axp-vms) "*dcl*" "sh"] 2) (#$ . -514)) #@67 *Program to use for generating the differential of the two files. (defvar ediff-diff-program "diff" (#$ . -1064)) #@273 *Options to pass to `ediff-diff-program'. If diff(1) is used as `ediff-diff-program', then the most useful options are `-w', to ignore space, and `-i', to ignore case of letters. At present, the option `-c' is ignored, since Ediff doesn't understand this type of output. (defvar ediff-diff-options "" (#$ . -1185)) #@121 *Program to use for generating custom diff output for saving it in a file. This output is not used by Ediff internally. (defvar ediff-custom-diff-program ediff-diff-program (#$ . -1508)) #@50 *Options to pass to `ediff-custom-diff-program'. (defvar ediff-custom-diff-options "-c" (#$ . -1701)) #@69 Pattern to match lines produced by diff3 that describe differences. (defvar ediff-match-diff3-line "^====\\(.?\\)$" (#$ . 1809)) #@105 *Program to be used for three-way comparison. Must produce output compatible with Unix's diff3 program. (defvar ediff-diff3-program "diff3" (#$ . -1945)) #@44 *Options to pass to `ediff-diff3-program'. (defvar ediff-diff3-options "" (#$ . -2105)) #@128 *Regexp that matches normal output lines from `ediff-diff3-program'. Lines that do not match are assumed to be error messages. (defvar ediff-diff3-ok-lines-regexp "^\\([1-3]:\\|====\\| \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^ $\\)" (#$ . -2200)) #@2  (defvar ediff-diff-status "" (#$ . 2466)) (byte-code "!#" [make-variable-buffer-local ediff-diff-status put permanent-local t] 4) #@324 If `on', Ediff auto-highlights fine diffs for the current diff region. If `off', auto-highlighting is not used. If `nix', no fine diffs are shown at all, unless the user force-refines the region by hitting `*'. This variable can be set either in .emacs or toggled interactively. Use `setq-default' if setting it in .emacs (defvar ediff-auto-refine (byte-code " ‡" [ediff-has-face-support-p on nix] 1) (#$ . 2612)) (byte-code "!#" [make-variable-buffer-local ediff-auto-refine put permanent-local t] 4) #@201 *If t, skip over difference regions that differ only in the white space and line breaks. This variable can be set either in .emacs or toggled interactively. Use `setq-default' if setting it in .emacs (defvar ediff-ignore-similar-regions nil (#$ . -3137)) (byte-code "!#" [make-variable-buffer-local ediff-ignore-similar-regions put permanent-local t] 4) #@64 *Auto-refine only the regions of this size (in bytes) or less. (defvar ediff-auto-refine-limit 1400 (#$ . -3505)) (byte-code "!#" [make-variable-buffer-local ediff-auto-refine-limit put permanent-local t] 4) #@260 Regexp that matches normal output lines from `ediff-diff-program'. This is mostly lifted from Emerge, except that Ediff also considers warnings and `Missing newline'-type messages to be normal output. Lines that do not match are assumed to be error messages. (defvar ediff-diff-ok-lines-regexp "^\\([0-9,]+[acd][0-9,]+$\\|[<>] \\|---\\|.*Warning *:\\|.*No +newline\\|.*missing +newline\\|^ $\\)" (#$ . 3728)) #@68 Pattern to match lines produced by diff that describe differences. (defvar ediff-match-diff-line (byte-code " İ)" ["\\([0-9]+\\)\\(\\|,\\([0-9]+\\)\\)" x "^" "\\([acd]\\)" "$"] 5) (#$ . 4143)) #@402 value is a function symbol depending on the kind of job is to be done. For 2-way jobs and for ediff-merge, it should be `ediff-setup-diff-regions'. For jobs requiring diff3, it should be `ediff-setup-diff-regions3'. The function should take three mandatory arguments, file-A, file-B, and file-C. It may ignore file C for diff2 jobs. It should also take one optional arguments, diff-number to refine. (defvar ediff-setup-diff-regions-function nil (#$ . 4351)) (byte-code "!#" [make-variable-buffer-local ediff-setup-diff-regions-function put permanent-local t] 4) (defalias 'ediff-setup-diff-regions #[(file-A file-B file-C) "!!!\"! # \"#!" [ediff-diff-buffer get-buffer buffer-name get-buffer-create ediff-unique-buffer-name "*ediff-diff" "*" ediff-make-diff2-buffer file-A file-B ediff-prepare-error-list ediff-diff-ok-lines-regexp ediff-convert-diffs-to-overlays ediff-extract-diffs ediff-word-mode ediff-narrow-bounds] 5]) (defalias 'ediff-make-diff2-buffer #[(diff-buffer file1 file2) " \")W!\"!ʇ  \")W8 !\"!!ʇ! !# &!py!y!!y؎q )=!)" [file1 filename ediff-file-attributes 7 0 message "Can't diff remote files: %s" ediff-abbreviate-file-name sit-for 2 1 file2 "Can't diff remote file: %s" "" "Computing differences between %s and %s ..." file-name-nondirectory ediff-exec-process ediff-diff-program diff-buffer synchronize ediff-diff-options StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) buffer-size this-command ediff-quit error ediff-KILLED-VITAL-BUFFER] 7]) (defalias 'ediff-setup-fine-diff-regions #[(file-A file-B file-C reg-num) "!!!\"!lj \n \f \f57 \fCE\n\fQS TCk#* \n}\f& \"#*\f#\"\fA\"A\"A\"**#*# *#." [ediff-fine-diff-buffer get-buffer buffer-name get-buffer-create ediff-unique-buffer-name "*ediff-fine-diff" "*" nil diff-list ok-regexp diff-options diff-program diff3-job ediff-3way-job ediff-diff3-program ediff-diff-program ediff-diff3-options ediff-diff-options ediff-diff3-ok-lines-regexp ediff-diff-ok-lines-regexp "Refining difference region %d ..." reg-num args string ediff-verbose-p apply message ediff-exec-process synchronize file-A file-B file-C ediff-prepare-error-list "" ediff-extract-diffs3 3way-comparison word-mode ediff-extract-diffs mapcar #[(elt) "II" [elt 0 nil 1] 3] #[(elt) "II" [elt 2 nil 3] 3] #[(elt) "II" [elt 4 nil 5] 3] region-num ediff-set-fine-overlays-in-one-buffer A B C] 9]) (defalias 'ediff-prepare-error-list #[(ok-regexp diff-buff) "!!!\"!p!!!Ȏq p\nZ\n!Z\n!!Zˎ\nq )e =e!)ceb!>{!) =!)p!!!֎q ) =!)U? !!!!!!)\n\"*" [ediff-error-buffer get-buffer buffer-name get-buffer-create ediff-unique-buffer-name "*ediff-errors" "*" StartBuffer ((set-buffer StartBuffer)) erase-buffer diff-buff ((set-buffer StartBuffer)) buffer-string this-command ediff-quit error ediff-KILLED-VITAL-BUFFER delete-matching-lines ok-regexp system-type (vax-vms axp-vms) "^$" ((set-buffer StartBuffer)) buffer-size 0 ediff-control-buffer error-buf ctl-buf ediff-skip-unsuitable-frames switch-to-buffer buf kill-buffer "Errors in diff output. Diff output is in %S"] 5]) (defalias 'ediff-extract-diffs #[(diff-buffer word-mode &optional bounds) " \nÉĉ \n \f #ς$B<@!A@!p k !k !!k֎ qdeeb)w=w!)p\f\f!\f!!ێ\fq eb)=!)  ! !!p  ! !!܎ qeb)=!)p!!!ގqeb #ÔÕ{!#%&B&%{!D#*'{){!+%&m&%{!o+*-./012345)-T-#T#')'T'+T+-'T'-T-8=+2-3#2'3R ! !! !!!#\nZ'#Z+ Z-+Z2Z32Zĉ& ?#\nZ'#Z+ Z-+Zĉ& C'\n- 3p  ! !! q#\nZy`.'#Zy`/'\n)=!)p\f\f!\f!!\fq+ Zy`0-+Zy`1- )=!) < !< !!<p / !/ !!/ q2Zy`432Zy`53);=;!) v !v !!v./0145ĉ8=mn8& ./01ĉ& C. )=!). " [ediff-buffer-A ediff-buffer-B ediff-buffer-C 1 nil shift-B shift-A diff-list c-prev b-prev a-prev C-buffer B-buffer A-buffer word-mode words points bounds ediff-overlay-start StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) this-command ediff-quit error ediff-KILLED-VITAL-BUFFER ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) diff-buffer ((set-buffer StartBuffer)) re-search-forward ediff-match-diff-line t string-to-int a-begin 3 e b a-end 4 diff-type 5 b-begin 7 b-end a-begin-pt a-end-pt b-begin-pt b-end-pt c-begin c-end c-begin-pt c-end-pt "a" "d" ediff-default-variant default-B vector ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) A B] 14]) (defalias 'ediff-convert-diffs-to-overlays #[(diff-list) "\n\"\n\"\f\n\"\n\"+\nA\"!\f!" [ediff-set-diff-overlays-in-one-buffer A diff-list B ediff-3way-job C ediff-merge-with-ancestor-job Ancestor ediff-merge-job vconcat mapcar #[(elt) "HH\f\f\" \"*" [elt 9 10 state-of-ancestor state-of-merge vector format "%S"] 4] ediff-state-of-merge message "Processing difference regions ... done"] 4]) (defalias 'ediff-set-diff-overlays-in-one-buffer #[(buf-type diff-list) "\n=\f\f*\n=*\n=\"*\n=*\n \f@ \n=>@U\n=KA@U\n=U8!\n=e@|\n=rA@|\n=|8!\fA\fGp  ! !! q)!=$!)\fo T\f@\n=\n=Ђ\n=H\n=$\n=$\n=#$HH\n=Y\n=Y>Y\nE\"\"@\"\\ =p  ! !! qb)!=$!)T \" #VVp  ! !! q`)!=$!) #8# # =;=<=\n >@>\"=4A7B\n\"!*\"C D\"UVEF\n $Gԉ$C\fA\fH\n\"!I!L. " [-1 current-diff buf-type A ediff-buffer-A B ediff-buffer-B C ediff-buffer-C Ancestor ediff-ancestor-buffer buff diff-list diff-list-type ediff-overlay-start ediff-narrow-bounds 2 shift ediff-overlay-end limit nil diff-overlay-list list-element total-diffs begin end pt-saved overlay state-of-diff StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) this-command ediff-quit error ediff-KILLED-VITAL-BUFFER 0 4 6 1 3 5 7 8 (A B C) delq format "=diff(%S)" words ((set-buffer StartBuffer)) ediff-goto-word ((set-buffer StartBuffer)) ediff-make-bullet-proof-overlay ediff-overlay-put priority ediff-shadow-overlay-priority ediff-diff-num ediff-has-face-support-p ediff-use-faces ediff-highlight-all-diffs ediff-set-overlay-face dif-num intern logand "ediff-even-diff-face-%S" "ediff-odd-diff-face-%S" mod 10 message "Buffer %S: Processing difference region %d of %d" vector "ediff-difference-vector-%S" vconcat] 8]) (defalias 'ediff-make-fine-diffs #[(&optional n flag) " \nW !\nW\nY !\"\"\"\"\"\" !=\"!JHH\"!JHHT\"E\"GVA!+#-T҂ӂ?D/010/#*T҂ӂD/010/#*111\"!JHI\"!JHI=y\"!JHH\n>T!D/01u0/#*##=!>%!@ # ##A!>%!B#C##D!>%!E# CF$8CF $8C,,F $8F $\"!JHHG\"!JHHG\\j+j\"!JHHGk\\}}C=\"!JHITC/010/#*= \"!JHIGTHIJD/010/#*\"!JHIK!. " [n ediff-current-difference ediff-number-of-differences 1 error ediff-NO-DIFFERENCES ediff-word-mode skip flag nix ediff-auto-refine 0 get-buffer-create ediff-tmp-buffer ediff-temp-file-A ediff-temp-file-B ediff-temp-file-C ediff-empty-diff-region-p A B C ediff-whitespace-diff-region-p nil cumulative-fine-diff-length whitespace-C whitespace-B whitespace-A empty-C empty-B empty-A file-C file-B file-A tmp-buffer noforce intern format "ediff-difference-vector-%S" 2 message "Only white-space differences in region %d" delq ediff-looks-like-combined-merge ediff-merge-job ediff-set-fine-overlays-in-one-buffer ediff-3way-comparison-job "Region %d is empty in all buffers but %S" args string ediff-verbose-p apply "Region %d in buffer %S is empty" t (off nix) "Region %d exceeds auto-refine limit. Type `%s' to refine" substitute-command-keys "\\[ediff-make-or-kill-fine-diffs]" ediff-wordify ediff-get-diff-posn beg end ediff-buffer-A ediff-control-buffer ediff-make-temp-file "fineDiffA" ediff-buffer-B "fineDiffB" ediff-3way-job ediff-buffer-C "fineDiffC" ediff-setup-fine-diff-regions "Only white-space differences in region %d %s" "in buffers B & C" "in buffers A & C" "in buffers A & B" ediff-set-fine-diff-properties] 12]) (defalias 'ediff-install-fine-diff-if-necessary #[(n) "=6\n##ZV0\n##ZV0\"\"=A\"" [ediff-auto-refine on ediff-auto-refine-limit ediff-get-diff-posn A end n beg B ediff-make-fine-diffs noforce skip off] 6]) (defalias 'ediff-set-fine-diff-properties #[(n &optional default) " ?+ W+ Y+ # #+ #" [ediff-has-face-support-p n 0 ediff-number-of-differences ediff-set-fine-diff-properties-in-one-buffer A default B ediff-3way-job C] 4]) (defalias 'ediff-set-fine-diff-properties-in-one-buffer #[(buf-type n &optional default) " \"!J\fHHƂ \"!!%ɂ4 \"!J\"3T\f \"+" [intern format "ediff-difference-vector-%S" buf-type n 1 default face-name "ediff-fine-diff-face-%S" 0 ediff-overlay-get "ediff-current-diff-overlay-%S" priority face fine-diff-vector mapcar #[(overl) " \n\" \f#" [ediff-set-overlay-face overl face ediff-overlay-put priority] 4]] 7]) (defalias 'ediff-set-fine-overlays-for-combined-merge #[(diff-list reg-num) " @ A@# 8 8# 8 8#\"!JH \n #I+" [nil overlay3 overlay2 overlay1 ediff-make-bullet-proof-overlay diff-list ediff-buffer-C 2 3 4 5 intern format "ediff-difference-vector-%S" C reg-num 1 vector] 6]) (defalias 'ediff-set-fine-overlays-in-one-buffer #[(buf-type diff-list region-num) " # =2 =\n2 =*\f2 =2  \"!JHcH\") \"!JHI*Ap !!!qb)$='!)( = ! \"M> T@ = =H =ނ =H5T\"##CA \"!J H!I. " [-1 current-diff ediff-get-diff-posn buf-type beg region-num reg-start A ediff-buffer-A B ediff-buffer-B C ediff-buffer-C Ancestor ediff-ancestor-buffer buff nil combined-merge-diff-list diff-overlay-list list-element begin end overlay n intern format "ediff-difference-vector-%S" diff-record mapcar ediff-delete-overlay 1 diff-list StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) this-command ediff-quit error ediff-KILLED-VITAL-BUFFER ediff-merge-job ediff-looks-like-combined-merge ediff-set-fine-overlays-for-combined-merge 0 2 4 3 5 ediff-goto-word ediff-make-bullet-proof-overlay vconcat] 6]) (defalias 'ediff-get-diff3-group #[(file) "\nQ!yŔŕ{Ƙ>ǔ-Ĕĕ{!ɔɕ{!TDHĔĕ{!\nT)DHĔĕ{!TD)" [re-search-forward "^" file ":\\([0-9]+\\)\\(,\\([0-9]+\\)\\)?\\([ac]\\)$" 1 4 "c" 2 string-to-int 3 x] 5]) (defalias 'ediff-extract-diffs3 #[(diff-buffer word-mode three-way-comp &optional bounds) " \n ĉʼn \n \f -ӂ. B T@!A@!R8!p!!!܎q|}eb)= !)p!!!qeb)= !) p!!!qeb)\f=\f !)T!T!!TpG!G!!Gqeb)S=S !)p$$!$!!$qeb'#yĔĕ{))ꘄ!@-!A@.!@0!A@1!@2!A@3)옃)67>;)옃))ꘅ=>?@ABCDEFGH23U>:2?3@V6I=N0?1@V-?.@ J- Z.-Z0\fZ10Z? Z@?Zʼn& C . 1\f@ p!!!Kq- Zy`A.-Zy`B. )= !)p!!!Lq0\fZy`C10Zy`D1\f))=) !)pf!f!!fMq? Zy`E@?Zy`F@ )r=r !)!!!p!!!Nq2\nZy`G32Zy`H3\n)= !) JABCDEFʼn=ʼn& CJABCDEFGH;7>& C .)u)(=( !) .\f" [ediff-buffer-A ediff-buffer-B ediff-buffer-C ediff-ancestor-buffer 1 nil shift-C shift-B shift-A diff-list anc-prev c-prev b-prev a-prev anc-buffer C-buffer B-buffer A-buffer word-mode words points bounds ediff-overlay-start three-way-comp 2 StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) this-command ediff-quit error ediff-KILLED-VITAL-BUFFER ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) diff-buffer ((set-buffer StartBuffer)) re-search-forward ediff-match-diff3-line t agreement "3" ediff-get-diff3-group "1" a-begin a-end "2" b-begin b-end c-or-anc-begin c-or-anc-end prefer-A prefer-B ediff-default-variant state-of-merge (default-A prefer-A) B A state-of-diff-merge C state-of-diff-comparison state-of-ancestor c-begin c-end a-begin-pt a-end-pt b-begin-pt b-end-pt c-begin-pt c-end-pt anc-begin-pt anc-end-pt default-B vector ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) ((set-buffer StartBuffer))] 14]) (defalias 'ediff-setup-diff-regions3 #[(file-A file-B file-C) "!!!\"!!\n\f &\"$!" [ediff-diff-buffer get-buffer buffer-name get-buffer-create ediff-unique-buffer-name "*ediff-diff" "*" message "Computing differences ..." ediff-exec-process ediff-diff3-program synchronize ediff-diff3-options file-A file-B file-C ediff-prepare-error-list ediff-diff3-ok-lines-regexp ediff-convert-diffs-to-overlays ediff-extract-diffs3 ediff-word-mode ediff-3way-comparison-job ediff-narrow-bounds] 8]) (defalias 'ediff-exec-process #[(program buffer synch &rest args) " \f@\"\fA\f\"\f#!ˎ\f q \f><J\f&r! Y !\f%  \" \"-" [match-data data string-match "^[ ]*$" args delq nil ediff-split-string mapconcat identity " " ((store-match-data data)) default-directory proc directory buffer erase-buffer system-type (emx ms-dos windows-nt windows-95) synch apply call-process program get-buffer-process kill-process start-process "Custom Diff" (":%s") mode-line-process set-process-sentinel ediff-process-sentinel set-process-filter ediff-process-filter] 8]) (defalias 'ediff-process-filter #[(proc string) "p\n! !! ʎ q`dU `db\f!." [obuf process-buffer proc buffer nil opoint get-buffer-window window window-start pos ((byte-code " \n\" \f b\fq" [set-window-start window pos opoint obuf] 3)) insert-before-markers string] 2]) (defalias 'ediff-process-sentinel #[(process signal) " !> !! !q) !" [process-status process (exit signal) buffer-name process-buffer nil mode-line-process delete-process] 3]) #@106 *Function to call to move to the next word. Used for splitting difference regions into individual words. (defvar ediff-forward-word-function (quote ediff-forward-word) (#$ . -20249)) #@113 *Characters constituting white space. These characters are ignored when differing regions are split into words. (defvar ediff-whitespace " \n \f" (#$ . -20439)) #@159 *Characters that constitute words of type 1. More precisely, [ediff-word-1] is a regexp that matches type 1 words. See `ediff-forward-word' for more details. (defvar ediff-word-1 "a-zA-Z---_" (#$ . -20607)) #@159 *Characters that constitute words of type 2. More precisely, [ediff-word-2] is a regexp that matches type 2 words. See `ediff-forward-word' for more details. (defvar ediff-word-2 "0-9.," (#$ . -20821)) #@159 *Characters that constitute words of type 3. More precisely, [ediff-word-3] is a regexp that matches type 3 words. See `ediff-forward-word' for more details. (defvar ediff-word-3 "`'?!:;\"{}[]()" (#$ . -21030)) #@159 *Characters that constitute words of type 4. More precisely, [ediff-word-4] is a regexp that matches type 4 words. See `ediff-forward-word' for more details. (defvar ediff-word-4 (concat "^" ediff-word-1 ediff-word-2 ediff-word-3 ediff-whitespace) (#$ . -21248)) #@265 Move point one word forward. There are four types of words, each of which consists entirely of characters in `ediff-word-1', `ediff-word-2', `ediff-word-3', or `ediff-word-4'. Words are recognized by passing these in turn as the argument to `skip-chars-forward'. (defalias 'ediff-forward-word #[nil "wV wV\fwV wV" [ediff-word-1 nil 0 ediff-word-2 ediff-word-3 ediff-word-4] 2 (#$ . 21518)]) (defalias 'ediff-wordify #[(beg end in-buffer out-buffer &optional control-buf) " q\f {q cebwe`|m?v ap\n P !P !!P͎ q)[=[!) e `w\n`|c\"+" [nil string sv-point in-buffer beg end out-buffer erase-buffer ediff-whitespace control-buf StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) ediff-forward-word-function this-command ediff-quit error ediff-KILLED-VITAL-BUFFER "\n"] 3]) (defalias 'ediff-copy-to-buffer #[(beg end in-buffer out-buffer) "\nq \f{ q ceb*" [nil string in-buffer beg end out-buffer erase-buffer] 2]) (defalias 'ediff-goto-word #[(n buf &optional flag) "p L !L !!LƎ qw V8 w S \" G VG `)W =W!*" [ediff-forward-word-function fwd-word-fun StartBuffer buf get-buffer buffer-name ((set-buffer StartBuffer)) ediff-whitespace nil n 1 flag 0 this-command ediff-quit error ediff-KILLED-VITAL-BUFFER] 4]) (provide (quote ediff-diff))