;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Thu Jun 8 22:23:25 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/ediff-diff.el ;;; emacs version 19.29.0. ;;; 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.28.90"))) (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 "=‡>ćŇ" [system-type emx "cmd" (vax-vms axp-vms) "*dcl*" "sh"] 2) (#$ . -509)) #@67 *Program to use for generating the differential of the two files. (defvar ediff-diff-program "diff" (#$ . -1003)) #@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 "" (#$ . -1124)) #@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 (#$ . -1447)) #@50 *Options to pass to `ediff-custom-diff-program'. (defvar ediff-custom-diff-options "-c" (#$ . -1640)) #@69 Pattern to match lines produced by diff3 that describe differences. (defvar ediff-match-diff3-line "^====\\(.?\\)$" (#$ . 1748)) #@105 *Program to be used for three-way comparison. Must produce output compatible with Unix's diff3 program. (defvar ediff-diff3-program "diff3" (#$ . -1884)) #@44 *Options to pass to `ediff-diff3-program'. (defvar ediff-diff3-options "" (#$ . -2044)) #@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\\)" (#$ . -2139)) #@2  (defvar ediff-diff-status "" (#$ . 2399)) (byte-code "!#" [make-variable-buffer-local ediff-diff-status put permanent-local t] 4) #@44 *Name of the program that applies patches. (defvar ediff-patch-program "patch" (#$ . -2544)) #@42 *Options to pass to ediff-patch-program. (defvar ediff-patch-options "" (#$ . -2643)) (byte-code "! B! B‡" [boundp ediff-patch-buf nil current-load-list ediff-patch-diagnostics] 2) #@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 " \f !\"  !>\"ŇƇ" [ediff-emacs-p window-system device-type selected-device (tty stream) on nix] 2) (#$ . 2850)) (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 (#$ . -3449)) (byte-code "!#" [make-variable-buffer-local ediff-ignore-similar-regions put permanent-local t] 4) #@76 Auto-refine only those regions that are smaller than this number of bytes. (defvar ediff-auto-refine-limit 700 (#$ . 3817)) (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\\)" (#$ . 4050)) #@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) (#$ . 4457)) #@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 (#$ . 4665)) (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) "  ! !!\"!\n4\n!4\n!!<\"!\np\f ! !!͎ q !s!!s!!)!!!!%\"* =!)!!' U)'=+,!!%\n\"*. \"!! 12#33\"3\"73\"!)" [ediff-xemacs-p t synchronize-minibuffers ediff-diff-buffer get-buffer buffer-name get-buffer-create ediff-unique-buffer-name "*ediff-diff" "*" ediff-custom-diff-buffer "*ediff-custom-diff" StartBuffer ((set-buffer StartBuffer)) erase-buffer "*Shell Command Output*" buf kill-buffer ediff-shell shell-file-name message "Computing differences ..." sit-for 0 shell-command format "%s %s %s %s" ediff-diff-program ediff-diff-options ediff-protect-metachars file-A file-B this-command ediff-quit error "You've killed an essential Ediff buffer---Please quit Ediff" string-to-char substitute-command-keys "\\[ediff-update-diffs]" recomp-diff-key buffer-size last-command-char ediff-shell-command ediff-custom-diff-program ediff-custom-diff-options ediff-prepare-error-list ediff-diff-ok-lines-regexp "Computing differences ... done" ediff-extract-diffs ediff-word-mode ediff-narrow-bounds diff-list ediff-set-diff-overlays-in-one-buffer A B ediff-3way-job C "Processing difference regions ... done"] 8]) (defalias 'ediff-setup-fine-diff-regions #[(file-A file-B file-C reg-num) "!!!\"!lj \n \f \f57 \n\fFH p!!!Ԏq !!!!!)T\" \n!!!#!##!!!\f$$!#!&\"*&=!) \"T\"\f#\"\f1!A\"1#%A\"1$1A\"44#4# U4#." [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-ok-lines-regexp ediff-diff-ok-lines-regexp StartBuffer ((set-buffer StartBuffer)) erase-buffer "*Shell Command Output*" buf kill-buffer ediff-shell shell-file-name message "Refining difference region %d ..." reg-num shell-command format "%s %s %s %s %s" file-A ediff-protect-metachars file-B file-C t this-command ediff-quit error "You've killed an essential Ediff buffer---Please quit Ediff" ediff-prepare-error-list "Refining difference region %d ... done" 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] 10]) (defalias 'ediff-prepare-error-list #[(ok-regexp diff-buff) "p 5 !5 !!5Ď q ! !\n>1!)@ =@!)p ` !` !!`ю q )j =j!)U?  !!!!!!)\"*" [StartBuffer ediff-error-buffer get-buffer buffer-name ((set-buffer StartBuffer)) erase-buffer insert-buffer diff-buff delete-matching-lines ok-regexp system-type (vax-vms axp-vms) "^$" this-command ediff-quit error "You've killed an essential Ediff buffer---Please quit Ediff" ((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"] 4]) (defalias 'ediff-extract-diffs #[(diff-buffer word-mode &optional bounds) " \nÉĉ \n \f #ς$Bl@!JF!J!)A@!jf!j!)p  ! !!ڎ qeb)=!)p\f\f!\f!!ߎ\fq eb)=!) & !& !!&p  ! !! qeb)%=%!)p!!!!!!!qeb$#ÔÕ{!')*o*){!q'*+{-{!/)**){!/*123456789-1T1'T'+-+T+/T/1+T+1T1<=/617 '6+7y K !K !!K'\nZ+'Z/ Z1/Z6Z76Zĉ&f'\nZ+'Z/ Z1/Zĉ&C+\n1 7p  ! !! q'\nZy`2+'Zy`3+\n)=!)p\f\f!\f!!@\fq/ Zy`41/Zy`51 )=!) d !d !!dp X !X !!XA q6Zy`876Zy`97)c=c!)  ! !!234589<=BC<&2345ĉ&C. G)=!). " [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 overl ediff-overlayp ediff-emacs-p overlay-start extent-start-position StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) this-command ediff-quit error "You've killed an essential Ediff buffer---Please quit Ediff" ((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] 11]) (defalias 'ediff-set-diff-overlays-in-one-buffer #[(buf-type diff-list) "\n=\f\f\n=\n= \n@ \n=2\f@I\n=?\fA@I\n=I\f8!b^!b!)\n=q\f@\n=~\fA@\n=\f8!!!) \nA\nGp!  ! !! q)%=!)\n T\n@\n=\n=͂H\n=,7\n=67HHH \n=>\nE\"\"@\"4 \n= \"   =p!  ! !! qb)%=!)T \" #VVp!  ! !! q`)%=!) #=# #@#GAOBC !\\AdBC !D>EF \"=GH\n\"!GI\n\"!#J K\"ULM\n $N׉ %C\nA\nGO\n\"!PN\"L." [-1 current-diff buf-type A ediff-buffer-A B ediff-buffer-B C ediff-buffer-C buff diff-list diff-list-type ediff-narrow-bounds 2 overl ediff-overlayp ediff-emacs-p overlay-start extent-start-position shift overlay-end extent-end-position limit nil diff-overlay-list list-element total-diffs begin end pt-saved overlay state-of-diff state-of-merge StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) this-command ediff-quit error "You've killed an essential Ediff buffer---Please quit Ediff" 0 4 1 3 5 6 7 (A B C) delq format "=diff(%S)" ediff-merge-job "%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 insert-in-front-hooks (ediff-insert-in-front) window-system device-type selected-device (tty stream) face logand intern "ediff-odd-diff-face-%S-var" "ediff-even-diff-face-%S-var" mod 10 message "Buffer %S: Processing difference region %d of %d" vector "ediff-difference-vector-%S" apply] 8]) (defalias 'ediff-make-fine-diffs #[(&optional n flag) " \nW!\nW~\nY~ !\"\"\"\"\"\" !=\"!JHH\"!JHHw'wT\"wE\"GV+!,#'.T҂ӂ?#T҂ӂ#\"!JHIw\"!JHIw=X\"!JHHw\n>w'wT!#w##:!;%p<!!!!!!!q@A \" )BC=āD!)##E!;%p<!!!!!!F!q@G\")BC=āD!)HQ##I!;%p<!A!!A!!!AJ!q@K\")PBC=PāD!) HuuL$HL $H,!L $L $\"!JHHG\"!JHHG\"!JHHG\\\\--H-=-\"!JHIT\"w=j\"!JHIMTRNe]OeeP#w\"!JHIQ!. " [n ediff-current-difference ediff-number-of-differences 1 error "No differences found" 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 ediff-verbose-p 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" "Region %d in buffer %S is empty" t (off nix) "Region %d exceeds auto-refine limit. `%s' force-refines" substitute-command-keys "\\[ediff-make-or-kill-fine-diffs]" ediff-wordify ediff-get-diff-posn beg end ediff-buffer-A ediff-control-buffer StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) ediff-make-temp-file "fineDiffA" this-command ediff-quit "You've killed an essential Ediff buffer---Please quit Ediff" ediff-buffer-B ((set-buffer StartBuffer)) "fineDiffB" ediff-3way-job ediff-buffer-C ((set-buffer StartBuffer)) "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) " \f !  !>??H WH YH \n# \n#\fH \n#" [ediff-emacs-p window-system device-type selected-device (tty stream) 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# #" [ediff-overlay-put overl face 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) " # =' =\n' ='\f   \"!JHXH\") \"!JHI*Ap  ! !! qb)\"=!)& = ! \"B2 T@ = =H =܂ =H)T \" # #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 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 "You've killed an essential Ediff buffer---Please quit Ediff" 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 apply vector] 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 \f &Ђ'B@!MI!M!)A@!mi!m!)8!!!)p!!!ݎqeb)=!)p  ! !! qeb) = !)p\f7\f!7\f!!7\fq 0 1eb)B=B!)p$$!$!!$qeb'#yÔÕ{))ꘄ~!@-!A@.!@0!A@1)옃)45>9)옃))ꘅ;<=>?@ABC!@.-Zy`?. )=!)p  ! !!G q0\nZy`@10Zy`A1\n)=!)p\f8\f!8\f!!8H\fq< Zy`B=?@ABC;&CyE>?@ABC95&C.)d)=!).\n" [ediff-buffer-A ediff-buffer-B ediff-buffer-C 1 nil shift-C shift-B shift-A diff-list c-prev b-prev a-prev C-buffer B-buffer A-buffer word-mode words points bounds overl ediff-overlayp ediff-emacs-p overlay-start extent-start-position three-way-comp 2 StartBuffer get-buffer buffer-name ((set-buffer StartBuffer)) this-command ediff-quit error "You've killed an essential Ediff buffer---Please quit Ediff" ((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 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 c-begin c-end a-begin-pt a-end-pt b-begin-pt b-end-pt c-begin-pt c-end-pt default-B vector ((set-buffer StartBuffer)) ((set-buffer StartBuffer)) ((set-buffer StartBuffer))] 11]) (defalias 'ediff-setup-diff-regions3 #[(file-A file-B file-C) "  ! !!\"!p\n  ! !!ˎ q !V!!V!!)!!!!!&\"*=!)$ \"!! '()$**\"*\".*\"!)" [ediff-xemacs-p t synchronize-minibuffers ediff-diff-buffer get-buffer buffer-name get-buffer-create ediff-unique-buffer-name "*ediff-diff" "*" StartBuffer ((set-buffer StartBuffer)) erase-buffer "*Shell Command Output*" buf kill-buffer ediff-shell shell-file-name message "Computing differences ..." sit-for 0 shell-command format "%s %s %s %s %s" ediff-diff3-program ediff-diff3-options ediff-protect-metachars file-A file-B file-C this-command ediff-quit error "You've killed an essential Ediff buffer---Please quit Ediff" ediff-prepare-error-list ediff-diff3-ok-lines-regexp "Computing differences ... done" ediff-extract-diffs3 ediff-word-mode ediff-3way-comparison-job ediff-narrow-bounds diff-list ediff-set-diff-overlays-in-one-buffer A B ediff-3way-job C "Processing difference regions ... done"] 9]) (defalias 'ediff-shell-command #[(command buffer) " Ž ! !q  % \" \"-" [match-data data ((store-match-data data)) default-directory nil proc directory get-buffer-process buffer kill-process erase-buffer start-process "Shell" shell-file-name "-c" command (":%s") mode-line-process set-process-sentinel ediff-shell-command-sentinel set-process-filter ediff-shell-command-filter] 7]) (defalias 'ediff-shell-command-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-shell-command-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) (#$ . -21352)) #@113 *Characters constituting white space. These characters are ignored when differing regions are split into words. (defvar ediff-whitespace " \n \f" (#$ . -21542)) #@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---_" (#$ . -21710)) #@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.," (#$ . -21924)) #@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 "`'?!:;\"{}[]()" (#$ . -22133)) #@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) (#$ . -22351)) #@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 (#$ . 22621)]) (defalias 'ediff-wordify #[(beg end in-buffer out-buffer &optional control-buf) " q\f {q cebwe`|m?u `p\n P !P !!P͎ q)Z=Z!) d `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 "You've killed an essential Ediff buffer---Please quit Ediff" "\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 `)V =V!*" [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 "You've killed an essential Ediff buffer---Please quit Ediff"] 4]) (provide (quote ediff-diff))