;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:37 2007 ;;; from file /home/cyd/emacs/lisp/diff-mode.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (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-mode.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'diff-mode nil "Major mode for viewing/editing diffs." :version "21.1" :group 'tools :group 'diff) #@61 If non-nil, `diff-mode' buffers default to being read-only. (custom-declare-variable 'diff-default-read-only 'nil '(#$ . 686) :type 'boolean :group 'diff-mode) #@90 *Non-nil means `diff-goto-source' jumps to the old file. Else, it jumps to the new file. (custom-declare-variable 'diff-jump-to-old-file 'nil '(#$ . -852) :type 'boolean :group 'diff-mode) #@341 *Non-nil means hunk headers are kept up-to-date on-the-fly. When editing a diff file, the line numbers in the hunk headers need to be kept consistent with the actual diff. This can either be done on the fly (but this sometimes interacts poorly with the undo mechanism) or whenever the file is written (can be slow when editing big diffs). (custom-declare-variable 'diff-update-on-the-fly 't '(#$ . -1048) :type 'boolean :group 'diff-mode) #@77 *Non-nil means `diff-apply-hunk' will move to the next hunk after applying. (custom-declare-variable 'diff-advance-after-apply-hunk 't '(#$ . -1494) :type 'boolean :group 'diff-mode) #@50 Run after setting up the `diff-mode' major mode. (custom-declare-variable 'diff-mode-hook 'nil '(#$ . 1683) :type 'hook :options '(diff-delete-empty-files diff-make-unified) :group 'diff-mode) (byte-code "\301B\302\301!\204\303\301\304\"\210\301\207" [current-load-list diff-outline-regexp default-boundp set-default "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)"] 3) #@61 Basic keymap for `diff-mode', bound to various prefix keys. (defconst diff-mode-shared-map (byte-code "\301\302\303\304\300!\205\n\303$\207" [diff-mode-shared-map easy-mmode-define-keymap (("n" . diff-hunk-next) ("N" . diff-file-next) ("p" . diff-hunk-prev) ("P" . diff-file-prev) ("k" . diff-hunk-kill) ("K" . diff-file-kill) ("}" . diff-file-next) ("{" . diff-file-prev) (" " . diff-goto-source) ([mouse-2] . diff-goto-source) ("o" . diff-goto-source) ("q" . quit-window)) nil boundp] 5) (#$ . 2084)) #@59 Keymap for `diff-mode'. See also `diff-mode-shared-map'. (defconst diff-mode-map (byte-code "\302\303B\304B\305\306\301!\205 \305$\207" [diff-mode-shared-map diff-mode-map easy-mmode-define-keymap "" (("" . diff-goto-source) ("" . diff-apply-hunk) ("" . diff-ediff-patch) ("" . diff-restrict-view) ("" . diff-reverse-direction) ("" . diff-split-hunk) ("" . diff-test-hunk) ("" . diff-context->unified) ("" . diff-unified->context) ("" . diff-refine-hunk) ("" . next-error-follow-minor-mode)) nil boundp] 5) (#$ . 2595)) #@23 Menu for `diff-mode'. (defvar diff-mode-menu nil (#$ . 3148)) (easy-menu-do-define 'diff-mode-menu diff-mode-map "Menu for `diff-mode'." '("Diff" ["Jump to Source" diff-goto-source t] ["Apply hunk" diff-apply-hunk t] ["Apply diff with Ediff" diff-ediff-patch t] ["-----" nil nil] ["Reverse direction" diff-reverse-direction t] ["Context -> Unified" diff-context->unified t] ["Unified -> Context" diff-unified->context t])) #@44 Prefix key for `diff-minor-mode' commands. (custom-declare-variable 'diff-minor-mode-prefix '"=" '(#$ . 3577) :type '(choice (string "") (string "C-c=") string) :group 'diff-mode) #@65 Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'. (defconst diff-minor-mode-map (byte-code "\303 BC\304\305\302!\205 \n\304$\207" [diff-minor-mode-prefix diff-mode-shared-map diff-minor-mode-map easy-mmode-define-keymap nil boundp] 5) (#$ . 3765)) (byte-code "\301\302\303\304\305\306%\210\307\310\311\302#\210\310B\312\310!\204\313\310\302\"\210\301\314\315\316\305\306%\210\307\317\311\314#\210\317B\312\317!\204:\313\317\314\"\210\301\320\321\322\305\306%\210\307\323\311\320#\210\323B\312\323!\204W\313\323\320\"\210\301\324\325\326\305\306%\210\307\327\311\324#\210\327B\312\327!\204t\313\327\324\"\210\301\330\331\332\305\306%\210\307\333\311\330#\210\333B\312\333!\204\221\313\333\330\"\210\301\334\335\336\305\306%\210\307\337\311\334#\210\337B\312\337!\204\256\313\337\334\"\210\301\340\341\342\305\306%\210\307\343\311\340#\210\343B\312\343!\204\313\313\343\340\"\210\301\344\345\346\305\306\347\350&\210\351B\312\351!\204\345\313\351\344\"\210\301\352\353\354\305\306\347\350&\210\355B\312\355!\204\377\313\355\352\"\210\301\356\357\360\305\306\347\350&\210\361B\312\361!\204\313\361\356\"\210\301\362\363\364\305\306%\210\307\365\311\362#\210\365B\312\365!\2046\313\365\362\"\210\301\366\367\370\305\306%\210\307\371\311\366#\210\371B\312\371!\204S\313\371\366\"\210\301\372\373\374\305\306%\210\307\375\311\372#\210\375B\312\375!\204p\313\375\372\"\210\376B\377\201@!\207" [current-load-list custom-declare-face diff-header ((((class color) (min-colors 88) (background light)) :background "grey85") (((class color) (min-colors 88) (background dark)) :background "grey45") (((class color) (background light)) :foreground "blue1" :weight bold) (((class color) (background dark)) :foreground "green" :weight bold) (t :weight bold)) "`diff-mode' face inherited by hunk and index header faces." :group diff-mode put diff-header-face face-alias default-boundp set-default diff-file-header ((((class color) (min-colors 88) (background light)) :background "grey70" :weight bold) (((class color) (min-colors 88) (background dark)) :background "grey60" :weight bold) (((class color) (background light)) :foreground "green" :weight bold) (((class color) (background dark)) :foreground "cyan" :weight bold) (t :weight bold)) "`diff-mode' face used to highlight file header lines." diff-file-header-face diff-index ((t :inherit diff-file-header)) "`diff-mode' face used to highlight index header lines." diff-index-face diff-hunk-header ((t :inherit diff-header)) "`diff-mode' face used to highlight hunk header lines." diff-hunk-header-face diff-removed ((t :inherit diff-changed)) "`diff-mode' face used to highlight removed lines." diff-removed-face diff-added ((t :inherit diff-changed)) "`diff-mode' face used to highlight added lines." diff-added-face diff-changed ((((type tty pc) (class color) (background light)) :foreground "magenta" :weight bold :slant italic) (((type tty pc) (class color) (background dark)) :foreground "yellow" :weight bold :slant italic)) "`diff-mode' face used to highlight changed lines." diff-changed-face diff-indicator-removed ((t :inherit diff-removed)) "`diff-mode' face used to highlight indicator of removed lines (-, <)." :version "22.1" diff-indicator-removed-face diff-indicator-added ((t :inherit diff-added)) "`diff-mode' face used to highlight indicator of added lines (+, >)." diff-indicator-added-face diff-indicator-changed ((t :inherit diff-changed)) "`diff-mode' face used to highlight indicator of changed lines." diff-indicator-changed-face diff-function ((t :inherit diff-header)) "`diff-mode' face used to highlight function names produced by \"diff -p\"." diff-function-face diff-context ((((class color grayscale) (min-colors 88)) :inherit shadow)) "`diff-mode' face used to highlight context and other side-information." diff-context-face diff-nonexistent ((t :inherit diff-file-header)) "`diff-mode' face used to highlight nonexistent files in recursive diffs." diff-nonexistent-face diff-yank-handler (lambda (#1=#:defconst-tmp-var) (defconst diff-yank-handler #1#)) (diff-yank-function)] 8) (defalias 'diff-yank-function #[(text) "\304\305\306#`c\210\n\206\307\310!?\205G\311 \210\212\312\313 \314#\2031\315f\316=\203-\317\2022\320\2022\321)\212\312 \314#\205F\322\323\314\211#\210\2025**\207" [text start mixed re next-single-property-change 0 yank-handler derived-mode-p diff-mode undo-boundary re-search-backward "^[>][ ]" "^[ <>!+-]" replace-match ""] 4]) (byte-code "\302B\303\302!\204\304\302\305\"\210\306B\307\310!\210\311B\303\311!\204&\304\311\312\"\210\301B\313\314!\210\315B\316\317 \320\321OP!\210\322B\303\322!\204J\304\322\321\"\210\321\207" [current-load-list diff-hunk-header-re diff-font-lock-keywords default-boundp set-default (("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" (1 diff-hunk-header-face) (2 diff-function-face)) ("^\\(\\*\\{15\\}\\)\\(.*\\)$" (1 diff-hunk-header-face) (2 diff-function-face)) ("^\\*\\*\\* .+ \\*\\*\\*\\*" . diff-hunk-header-face) ("^--- .+ ----$" . diff-hunk-header-face) ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ("^---$" . diff-hunk-header-face) ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n" (0 diff-header-face) (2 diff-file-header-face prepend)) ("^\\([-<]\\)\\(.*\n\\)" (1 diff-indicator-removed-face) (2 diff-removed-face)) ("^\\([+>]\\)\\(.*\n\\)" (1 diff-indicator-added-face) (2 diff-added-face)) ("^\\(!\\)\\(.*\n\\)" (1 diff-indicator-changed-face) (2 diff-changed-face)) ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend)) ("^Only in .*\n" . diff-nonexistent-face) ("^\\(#\\)\\(.*\\)" (1 font-lock-comment-delimiter-face) (2 font-lock-comment-face)) ("^[^-=+*!<>#].*\n" (0 diff-context-face))) diff-font-lock-defaults (lambda (#1=#:defconst-tmp-var) (defconst diff-font-lock-defaults #1#)) (diff-font-lock-keywords t nil nil nil (font-lock-multiline)) diff-imenu-generic-expression ((nil "\\+\\+\\+\\ \\([^ \n]+\\)[ \n]" 1) (nil "^--- \\([^ \n]+\\) .*\n\\*" 1)) (lambda (#2=#:defconst-tmp-var) (defconst diff-hunk-header-re #2#)) "^\\(@@ -[0-9,]+ \\+[0-9,]+ @@.*\\|\\*\\{15\\}.*\n\\*\\*\\* .+ \\*\\*\\*\\*\\|[0-9]+\\(,[0-9]+\\)?[acd][0-9]+\\(,[0-9]+\\)?\\)$" diff-file-header-re (lambda (#3=#:defconst-tmp-var) (defconst diff-file-header-re #3#)) "^\\(--- .+\n\\+\\+\\+ \\|\\*\\*\\* .+\n--- \\|[^-+!<>0-9@* ]\\).+\n" 1 nil diff-narrowed-to] 5) (defalias 'diff-end-of-hunk #[(&optional style) "\304!\203 \204\305f\306\236A\307\225b\210\310 \311=\203!\312\nP\2026 \313=\203+\314\2026 \315=\2035\316\2026\317\305\320#\205>\307\224\211\206Ddb)\207" [diff-hunk-header-re style diff-file-header-re end looking-at nil ((64 . unified) (42 . context)) 0 re-search-forward unified "^[^-+# \\]\\|" context "^[^-+#! \\]" normal "^[^<>#\\]" "^[^-+#!<> \\]" t] 5]) (defalias 'diff-beginning-of-hunk #[nil "\301 \210\302!?\205\303y\210\304\305\306\217\207" [diff-hunk-header-re beginning-of-line looking-at 1 nil (re-search-backward diff-hunk-header-re) ((error (error "Can't find the beginning of the hunk")))] 3]) (defalias 'diff-beginning-of-file #[nil "\301 \210\302!?\205\303y\210\304\305\306\217\207" [diff-file-header-re beginning-of-line looking-at 2 nil (re-search-backward diff-file-header-re) ((error (error "Can't find the beginning of the file")))] 3]) (defalias 'diff-end-of-file #[nil "\301\302\303\304#\210\301\305P\303\306#\210\307\224\203\307\224b\207\310 \207" [diff-file-header-re re-search-forward "^[-+#!<>0-9@* \\]" nil t "^[^-+#!<>0-9@* \\]\\|" move 1 beginning-of-line] 4]) (add-to-list 'debug-ignored-errors "^No \\(previous\\|next\\) hunk") #@31 Go to the next COUNT'th hunk. (defalias 'diff-hunk-next #[(&optional count) "\204\304\305W\203\306[!\207\307 !\203T\310deZ\311 W~\210\312 \310\313$\204G\307 !\203?\314 \206:db\210\202n\315\316\317\"\210\202n\305\224b\210p\320\321 !=\203nt\203n\212\314 )\206`d\322 \310\313#\204m\323\324!\210)\n\205t\325 )\207" [count diff-hunk-header-re was-narrowed endpt 1 0 diff-hunk-prev looking-at nil buffer-size re-search-forward t diff-end-of-hunk error "No next %s" "hunk" window-buffer selected-window pos-visible-in-window-p recenter (0) diff-restrict-view] 5 (#$ . 11453) "p"]) (put 'diff-hunk-next 'definition-name 'diff-hunk) #@34 Go to the previous COUNT'th hunk (defalias 'diff-hunk-prev #[(&optional count) "\204\303\304W\203\305[!\207\306deZ\307 W~\210\310\n\306\311$\204*\312\313\314\"\210 \2050\315 )\207" [count was-narrowed diff-hunk-header-re 1 0 diff-hunk-next nil buffer-size re-search-backward t error "No previous %s" "hunk" diff-restrict-view] 5 (#$ . 12109) "p"]) (byte-code "\300\301\302\303#\210\304\305\306\"\207" [put diff-hunk-prev definition-name diff-hunk add-to-list debug-ignored-errors "^No \\(previous\\|next\\) file"] 4) #@31 Go to the next COUNT'th file. (defalias 'diff-file-next #[(&optional count) "\204\304\305W\203\306[!\207\307 !\203T\310\311 \310\312$\204>\307 !\2036\313 \2061db\210\202e\314\315\316\"\210\202e\305\224b\210p\317\320 !=\203et\203e\212\313 )\206Wd\321 \310\312#\204d\322\323!\210))\310\207" [count diff-file-header-re was-narrowed endpt 1 0 diff-file-prev looking-at nil re-search-forward t diff-end-of-hunk error "No next %s" "file" window-buffer selected-window pos-visible-in-window-p recenter (0)] 5 (#$ . 12645) "p"]) (put 'diff-file-next 'definition-name 'diff-file) #@34 Go to the previous COUNT'th file (defalias 'diff-file-prev #[(&optional count) "\204\303\304W\203\305[!\207\306\307\n\306\310$\204!\311\312\313\"\210)\306\207" [count was-narrowed diff-file-header-re 1 0 diff-file-next nil re-search-backward t error "No previous %s" "file"] 5 (#$ . 13246) "p"]) (put 'diff-file-prev 'definition-name 'diff-file) #@115 Restrict the view to the current hunk. If the prefix ARG is given, restrict the view to the current file instead. (defalias 'diff-restrict-view #[(&optional arg) "\212\203 \302 \210\202\303 \210`\203\304 \210\202\305 \210`}\210\306\301!\210\203+\307\202,\310\211)\207" [arg diff-narrowed-to diff-beginning-of-file diff-beginning-of-hunk diff-end-of-file diff-end-of-hunk make-local-variable file hunk] 2 (#$ . 13610) "P"]) #@20 Kill current hunk. (defalias 'diff-hunk-kill #[nil "\306 \210`\307 \310\311#\205\312\224\310\313\314\217\310\315\316\217\311b\210 \203< U\203<\n\2037\f\203<\n\fV\203<\317 \202C\320 \210\321`\"-\207" [start diff-hunk-header-re nexthunk firsthunk nextfile inhibit-read-only diff-beginning-of-hunk re-search-forward nil t 0 (byte-code "b\210\301 \210\302 \210`\207" [start diff-beginning-of-file diff-hunk-next] 1) ((error)) (byte-code "\300 \210`\207" [diff-file-next] 1) ((error)) diff-file-kill diff-end-of-hunk kill-region] 4 (#$ . 14052) nil]) #@28 Kill current file's hunks. (defalias 'diff-file-kill #[nil "\304 \210`\212\305\306\307\217)\212\310\311 \312#)\312\n\203\n\313 \210\314\315!\203(\316u\210\317`\",\207" [start prevhunk index inhibit-read-only diff-beginning-of-file nil (byte-code "\300 \210`\207" [diff-hunk-prev] 1) ((error)) re-search-backward "^Index: " t diff-end-of-file looking-at "^\n" 1 kill-region] 4 (#$ . 14621) nil]) #@28 Kill spurious empty diffs. (defalias 'diff-kill-junk #[nil "\212\302eb\210\303\304\305\306 \307\260\310\302#\205*\311\225\203\312\224\202 \313\225\314\224|\210\315 \210\202*\207" [inhibit-read-only diff-file-header-re t re-search-forward "^\\(Index: .*\n\\)" "\\([^-+!* <>].*\n\\)*?" "\\(\\(Index:\\) \\|" "\\)" nil 4 0 1 3 beginning-of-line] 6 (#$ . 15031) nil]) (defalias 'diff-count-matches #[(re start end) "\212\304 b\210\305\n \306#\203T\202*\207" [n start re end 0 re-search-forward t] 4]) #@64 Split the current (unified diff) hunk at point into two hunks. (defalias 'diff-split-hunk #[nil "\306 \210`\307 \210`\310\311!\204\312\313!\210\314y\210\315\316\314!!\315\316\317!!\n\320\321` #\\ \320\322` #\\\323 b\210\324\325\f!\326\325 !\327\261\210\330 \".\207" [start pos start1 start2 newstart1 newstart2 beginning-of-line diff-beginning-of-hunk looking-at "@@ -\\([0-9]+\\),[0-9]+ \\+\\([0-9]+\\),[0-9]+ @@" error "diff-split-hunk only works on unified context diffs" 1 string-to-number match-string 2 diff-count-matches "^[- ]" "^[+ ]" t "@@ -" number-to-string ",1 +" ",1 @@\n" diff-fixup-modifs inhibit-read-only] 5 (#$ . 15550) nil]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list diff-remembered-files-alist default-boundp set-default nil] 3) (defalias 'diff-filename-drop-dir #[(file) "\301\302\"\205\f\303\225\304O\207" [file string-match "/" 0 nil] 3]) #@355 Merge the diff between ANCESTOR and FROM into TO. Returns the merged string if successful or nil otherwise. The strings are assumed not to contain any "\n" (i.e. end of line). If ANCESTOR = FROM, returns TO. If ANCESTOR = TO, returns FROM. The heuristic is simplistic and only really works for cases like (diff-merge-strings "b/foo" "b/bar" "/a/c/foo"). (defalias 'diff-merge-strings #[(ancestor from to) "\304 \304\n\260\305\306 \"\205)\n\307\310 \"\232\205) \310\224\311\224O\307\312 \" \311\225\310\225OQ)\207" [ancestor from to str "\n" string-match "\\`\\(.*?\\)\\(.*\\)\\(.*\\)\n\\1\\(.*\\)\\3\n\\(.*\\(\\2\\).*\\)\\'" match-string 5 6 4] 5 (#$ . 16477)]) #@133 Tell Emacs where the find the source file of the current hunk. If the OLD prefix arg is passed, tell the file NAME of the old file. (defalias 'diff-tell-file-name #[(old name) "\304!\211\204\f\305\306!\210 \nB B\211)\207" [old fs name diff-remembered-files-alist diff-hunk-file-names error "No file name to look for"] 3 (#$ . 17151) (let* ((old current-prefix-arg) (fs (diff-hunk-file-names current-prefix-arg))) (unless fs (error "No file name to look for")) (list old (read-file-name (format "File for %s: " (car fs)) nil (diff-find-file-name old) t)))]) #@71 Give the list of file names textually mentioned for the current hunk. (defalias 'diff-hunk-file-names #[(&optional old) "\212\304!\204\305\306\307\217\204\310\305\311#\210\212\305\312\313\217)\304\314!\203> \203*\315\316!\202-\315\317! \2037\315\317!\202:\315\316!D\202B\316y\210\305\320\305\321 ?\205Z\212\322\323 \311#)\205Z\315\316!C\n\322\324\305\311#\205~ \203m\315\325!\202p\315\326! \203z\315\326!\202}\315\325!D#\"+\207" [diff-file-header-re old header-files limit looking-at nil (diff-beginning-of-file) ((error)) re-search-forward t (byte-code "\300 \210`\207" [diff-hunk-prev] 1) ((error (point-min))) "[-*][-*][-*] \\(\\S-+\\)\\(\\s-.*\\)?\n[-+][-+][-+] \\(\\S-+\\)" match-string 1 3 delq append re-search-backward "^Index: \\(.+\\)" "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" 2 4] 9 (#$ . 17718)]) #@144 Return the file corresponding to the current patch. Non-nil OLD means that we want the old file. PREFIX is only used internally: don't use it. (defalias 'diff-find-file-name #[(&optional old prefix) "\212\306!\204\307\310\311\217\204\312\307\313#\210\314 ! \203!\315\316\n\"\317\n\f\"A\206\321\320\321\215\206\321\n\307# \203k \211@\211#\203T\322#!\204T A\211@\211#\204B#*\211#\204k\323\307\315\324 \"\"\307#\2024#*\206\321\325\326$\206y\327\"\203\222$\330\211\224O#\322#!\205\216#)\206\321 \204\260\331\332!\203\260\212\333\307\313#)\203\260\334 \335\336!\"\206\321\337\340\341\n@\206\271\327\"\307\n@\313\n@%#\342\304!\210\n#B\fB#)*\207" [diff-file-header-re old fs prefix diff-remembered-files-alist files looking-at nil (diff-beginning-of-file) ((error)) re-search-forward t diff-hunk-file-names mapcar #[(f) " P\207" [prefix f] 2] assoc --cl-block-nil-- (byte-code "\306\211\203/\n@\307 \211@@)\f@ A#\211\203'\310 !\203'\311\312 \"\210)\nA\211\204*\306\207" [diff-remembered-files-alist rf #1=#:--cl-dolist-temp-- x fs newfile nil diff-merge-strings file-exists-p throw --cl-block-nil--] 5) file-exists-p delq diff-filename-drop-dir string-match "\\.rej\\'" "" 0 boundp cvs-pcl-cvs-dirchange-re re-search-backward diff-find-file-name match-string 1 read-file-name format "Use file %s: " make-local-variable file buffer-file-name] 6 (#$ . 18569)]) #@48 Call `ediff-patch-file' on the current buffer. (defalias 'diff-ediff-patch #[nil "\300\301\302\217\207" [err (byte-code "\300\301p\"\207" [ediff-patch-file nil] 3) ((wrong-number-of-arguments (ediff-patch-file)))] 3 (#$ . 19990) nil]) #@146 Convert unified diffs to context diffs. START and END are either taken from the region (if a prefix arg is given) or else cover the whole bufer. (defalias 'diff-unified->context #[(start end) "\306!\204 \307\310\"\310\212\nb\210\311\312\313\310#\205\275`W\205\275\314\216\310\315\224\203;\316\317\310\211\313\320%\210\316\321\310\211\313\315%\210\202\271\322\323!\322\324!\322\325!\322\326!./\316\327/\330\331\332/!\332.!\\\333\\!\334\260!\210\335y\210\214`\336\337!\210`}\210\340 0eb\210\212\311\341\313\310#)\204\210`d|\210\202db\210\313\21112`1\333y\342U\203\313f\343=\203\256\344c\210\3132\333u\210\202\221\313f\345=\203\300`1|\210\3102\202\221\313f\346=\203\3422\204\325\335u\210\344c\210\202\334\347\335!\210\350c\210\351u\210\202\221\313f\352=\203\212\333y\210\313f\345U)\203\221`1|\210\3102\202\221\3132\202\221*db\210\212\353 \330\331\332 !\332\f!\\\333\\!\3540\261\210)\335y\210\212\311\355\313\310#)\2044`d|\210\202\267\313\21132m\204\266\313f\343=\203Q\344c\210\3132\333u\210\202\237\313f\346=\203a\310\21132\202\237\313f\345=\203\2032\204v\335u\210\344c\210\202}\347\335!\210\350c\210\351u\210\202\237\313f\352=\203\234\212\335y\210m)\204\237\310\21132\202\237\3132`1\335y\2103\203\2621`|\210\3133)\202:*.*\202*\207" [end inhibit-read-only start combine-after-change-calls lines2 line2 markerp copy-marker t re-search-forward "^\\(\\(---\\) .+\n\\(\\+\\+\\+\\) .+\\|@@ -\\([0-9]+\\),\\([0-9]+\\) \\+\\([0-9]+\\),\\([0-9]+\\) @@.*\\)$" nil ((combine-after-change-execute)) 2 replace-match "---" 3 "***" match-string 4 5 6 7 "***************\n*** " "," number-to-string string-to-number -1 " ****" 1 diff-end-of-hunk unified buffer-string "^-" 0 32 " " 43 45 delete-char "! " -2 92 "--- " " ----\n" "^+" lines1 line1 hunk last-pt modif delete] 9 (#$ . 20232) (byte-code "\204\f \203\n\203\303 \304 D\207edD\207" [current-prefix-arg transient-mark-mode mark-active region-beginning region-end] 2)]) #@211 Convert context diffs to unified diffs. START and END are either taken from the region (when it is highlighted) or else cover the whole buffer. With a prefix argument, convert unified format to context format. (defalias 'diff-context->unified #[(start end &optional to-context) "\203 \306 \n\"\207\307\n!\204\310\n\311\"\311\212 b\210\312\313\314\311#\205X`\nW\205X\315\216\311\316\224\203D\317\320\311\211\314\321%\210\317\322\311\211\314\316%\210\202T\323\324!\323\325!\326\22401\317\327!\210\312\330\314\311#\204a\331\332!\210\323\333!\323\316!\334 \210`\333y\210`|\210\335 234 b\210\333y\210`2W\203\336\314f\337\"\203\233\340\316!\210\341c\210\333y\210\202\314f\342=\203\376\2122b\210\333y\210`)52f6\3366\343\"\203\317\3442\316\\5{25|\210\261\210\202\3726\342=\203\34625|\210\340\333!\210\333y\210\202\3726\345=\203\363\333y\210\202\372\340\333!\210\333y\210*\202\333y\210\202\346\347!\203(\314f\350U\204\333u\210\202\340\333!\210\344c\210\340\333!\210\333y\210\202\212 b\210\3511\352\353\3540!\3541!Z\355Z!\3564\352\353\3543!\3544!Z\355Z!\357\261 \210.*\202*\207" [to-context start end inhibit-read-only combine-after-change-calls pt1 diff-unified->context markerp copy-marker t re-search-forward "^\\(\\(\\*\\*\\*\\) .+\n\\(---\\) .+\\|\\*\\{15\\}.*\n\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]+\\) \\*\\*\\*\\*\\)$" nil ((combine-after-change-execute)) 2 replace-match "+++" 3 "---" match-string 4 5 0 "" "^--- \\([0-9]+\\),\\(-?[0-9]+\\) ----$" error "Can't find matching `--- n1,n2 ----' line" 1 beginning-of-line point-marker memql (33 45) delete-char "-" 32 (33 43) "+" 92 looking-at "[+! ] " 33 "@@ -" "," number-to-string string-to-number -1 " +" " @@" line1e line1s pt2 line2e line2s endline2 c] 11 (#$ . 22236) (byte-code "\203 \203\303 \304 \nE\207ed\nE\207" [transient-mark-mode mark-active current-prefix-arg region-beginning region-end] 3)]) #@142 Reverse the direction of the diffs. START and END are either taken from the region (if a prefix arg is given) or else cover the whole bufer. (defalias 'diff-reverse-direction #[(start end) "\306!\204 \307\310\"\310\212\nb\210\311\312\313\310#\205]`W\205]\314\216\310\315\224\2030\316\317\313\"\210\202Y\320\224\203\315\320\224\321\320!\316\322\313\211\211\320%\210\323y\210`%\324\325!\203d\313f\326U\203^\327\323!\210\330c\210\323y\210\202J\331%`\"&\324\332!\204y&c\210\333\334!\210\321\323!'\316\f\313\211\211\323%\210\323y\210`(\324\335!\203\246\313f\336U\203\240\327\323!\210\337c\210\323y\210\202\214\331(`\")&\206\263\322c\210%b\210)\206\277\322c\210* b\210'c\210-\202Y\340\224\203Y\316\341\313\"\210\323y\210\313f\313\211*+,\313f\211,\211-\326=\203+\206\367`+\327\323!\210\330c\210\310\202N-\336=\203*\206`*\327\323!\210\337c\210\310\202N\342-\343\"\203*\310\202N+\203D*\203D+*W\203D\331+*\"c\210\313\211+*,\344\232)\203X\323y\210\202\344+*\202*\207" [end inhibit-read-only start combine-after-change-calls lines1 pt-lines1 markerp copy-marker t re-search-forward "^\\(\\([-*][-*][-*] \\)\\(.+\\)\n\\([-+][-+][-+] \\)\\(.+\\)\\|\\*\\{15\\}.*\n\\*\\*\\* \\(.+\\) \\*\\*\\*\\*\\|@@ -\\([0-9,]+\\) \\+\\([0-9,]+\\) @@.*\\)$" nil ((combine-after-change-execute)) 2 replace-match "\\2\\5\n\\4\\3" 6 match-string "" 1 looking-at "[-! \\][ ]\\|#" 45 delete-char "+" delete-and-extract-region "^--- \\([0-9]+,-?[0-9]+\\) ----$" error "Can't find matching `--- n1,n2 ----' line" "[!+ \\][ ]\\|#" 43 "-" 7 "@@ -\\8 +\\7 @@" memql (92 35) 32 half1s half1 str1 half2s half2 last first c #1=#:--cl-var--] 7 (#$ . 24164) (byte-code "\204\f \203\n\203\303 \304 D\207edD\207" [current-prefix-arg transient-mark-mode mark-active region-beginning region-end] 2)]) #@164 Fixup the hunk headers (in case the buffer was modified). START and END are either taken from the region (if a prefix arg is given) or else cover the whole bufer. (defalias 'diff-fixup-modifs #[(start end) "\306\212 b\210\307 \210\310\211\211\211\311y\310U\2056`X\2056\312\313!\204l\314f\315=\2032 T\202\314f\316=\203? T\202\314f\317=\203L\fT\202\314f\320=\203Y\nT\202\321\314f\322\"\204\310\211\310\211\202\312\323!\203\257\324\325! \324\326!!\327 \f\\!\"\327 \\!\211#!\230\204\232\330#\306\211\314\326%\210\" \230\204\253\330\"\306\211\314\325%\210,\202+\312\331!\203\355 \n\\ \\\310V\203+\324\325! \324\326!!\327 \n\\ \\\332 !\\\311\\!\211$!\230\204\351\330$\306\211\314\326%\210+\202+\312\333!\203+ \n\\\f\\\310V\203+\324\325!%\334\335\327%G!\336Q \n\\\f\\\332%!\\\311\\\"\211$%\230\204*\330$\306\211\314\326%\210*\310\211\310\211\202.\207" [inhibit-read-only end bang space minus plus t diff-end-of-hunk 0 -1 looking-at "@@ -[0-9,]+ \\+[0-9,]+ @@\\|[-*][-*][-*] [0-9,]+ [-*][-*][-*][-*]$\\|--- .+\n\\+\\+\\+ " nil 32 43 45 33 memql (92 35) "@@ -[0-9]+,\\([0-9]*\\) \\+[0-9]+,\\([0-9]*\\) @@.*$" match-string 1 2 number-to-string replace-match "--- \\([0-9]+\\),\\([0-9]*\\) ----$" string-to-number "\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]*\\) \\*\\*\\*\\*$" format "%0" "d" start old1 old2 new1 new2 new old] 7 (#$ . 26006) (byte-code "\204\f \203\n\203\303 \304 D\207edD\207" [current-prefix-arg transient-mark-mode mark-active region-beginning region-end] 2)]) #@34 Fixup hunk headers if necessary. (defalias 'diff-write-contents-hooks #[nil "\300 \203\n\301ed\"\210\302\207" [buffer-modified-p diff-fixup-modifs nil] 3 (#$ . 27554)]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list diff-unhandled-changes default-boundp set-default nil] 3) #@102 Remember to fixup the hunk header. See `after-change-functions' for the meaning of BEG, END and LEN. (defalias 'diff-after-change-function #[(beg end len) "?\205 ?\205\n\203 \n@^\f\nA]B\211\207 \fB\211\207" [undo-in-progress inhibit-read-only diff-unhandled-changes beg end] 3 (#$ . 27870)]) #@34 Fixup hunk headers if necessary. (defalias 'diff-post-command-hook #[nil ":\205 \301\302\303\217\210\301\211\207" [diff-unhandled-changes nil (byte-code "\212@b\210n\203o\204\301u\210\302 \210\212\303 \210`AY)\203%\304`A\"\210)\301\207" [diff-unhandled-changes -1 diff-beginning-of-hunk diff-end-of-hunk diff-fixup-modifs] 3) ((error))] 3 (#$ . 28177)]) (defalias 'diff-next-error #[(arg reset) "\302p!\210\203 eb\210\303 !\210\304 \207" [reset arg pop-to-buffer diff-hunk-next diff-goto-source] 2]) (byte-code "\302\303N\204\f\304\302\303\305#\210\306\307!\204\304\307\310\311#\210\307B\312\307!\204(\313\307\314 \"\210\306\315!\2044\304\315\310\311#\210\315B\312\315!\204D\313\315\316 \"\210\304\301\310\311#\210\301B\312\301!\204^\313\301\317\301\320\"\210 \"\210\304\311\321\320#\207" [current-load-list diff-mode-abbrev-table diff-mode-hook variable-documentation put "Hook run when entering Diff mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp diff-mode-map definition-name diff-mode default-boundp set-default make-sparse-keymap diff-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent] 5) #@611 Major mode for viewing/editing context diffs. Supports unified and context diffs as well as (to a lesser extent) normal diffs. When the buffer is read-only, the ESC prefix is not necessary. If you edit the buffer manually, diff-mode will try to update the hunk headers for you on-the-fly. You can also switch between context diff and unified diff with \[diff-context->unified], or vice versa with \[diff-unified->context] and you can also reverse the direction of a diff with \[diff-reverse-direction]. \{diff-mode-map} This mode runs the hook `diff-mode-hook', as the final step during initialization. (defalias 'diff-mode #[nil "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 /\306\315!\2100 \306\316!\2101\306\317!\2102\306\320!\210\32134\204J\322\323\324\325\307$\210\202\\\306\326!\210\322\327\330\325\307$\210\322\331\332\325\307$\210\333\334!\2115\3356BL\210\336\3375J\"\210\322\340\341\342\343\344\3455D\346FE\325\307$\210)\306\347!\210\350'\306\351!\210\352))\353\354!\203\232\354\355!\207\356\355!\207" [delay-mode-hooks major-mode mode-name diff-mode-map diff-mode-syntax-table diff-mode-abbrev-table make-local-variable t kill-all-local-variables diff-mode "Diff" use-local-map set-syntax-table font-lock-defaults outline-regexp imenu-generic-expression next-error-function diff-next-error add-hook write-contents-functions diff-write-contents-hooks nil diff-unhandled-changes after-change-functions diff-after-change-function post-command-hook diff-post-command-hook make-symbol "--ro-bind--" buffer-read-only add-to-list minor-mode-overriding-map-alist view-mode-hook lambda (&rest --cl-rest--) apply #[(#1=#:G78200) "\302J \"\211\207" [#1# minor-mode-overriding-map-alist delq] 3] quote --cl-rest-- add-log-current-defun-function diff-current-defun add-log-buffer-file-name-function diff-find-file-name fboundp run-mode-hooks diff-mode-hook run-hooks local-abbrev-table diff-font-lock-defaults diff-outline-regexp diff-imenu-generic-expression diff-default-read-only diff-update-on-the-fly #2=#:--cl-ro-bind-- diff-mode-shared-map] 9 (#$ . 29428) nil]) #@99 Non-nil if Diff minor mode is enabled. Use the command `diff-minor-mode' to change this variable. (defvar diff-minor-mode nil (#$ . 31547)) (make-variable-buffer-local 'diff-minor-mode) #@70 Minor mode for viewing/editing context diffs. \{diff-minor-mode-map} (defalias 'diff-minor-mode #[(&optional arg) "\303=\203 ?\202%\203\304!\305V\202% \204\306\202%\307\310\301\"\210\311\n\2044\312\313\314\311\306$\210\202F\315\316!\210\312\317\320\311\306$\210\312\321\322\311\306$\210\323\324 \203P\325\202Q\326\"\210\327 \203e\307\330 \203b\331\202c\332\"\210\333 \210 \207" [arg diff-minor-mode diff-update-on-the-fly toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil add-hook write-contents-functions diff-write-contents-hooks make-local-variable diff-unhandled-changes after-change-functions diff-after-change-function post-command-hook diff-post-command-hook run-hooks diff-minor-mode-hook diff-minor-mode-on-hook diff-minor-mode-off-hook called-interactively-p "Diff minor mode %sabled" "en" "dis" force-mode-line-update] 5 (#$ . 31739) (list (or current-prefix-arg 'toggle))]) (byte-code "\300\301\302\303\304!\205 \304J#\207" [add-minor-mode diff-minor-mode " Diff" boundp diff-minor-mode-map] 5) (defalias 'diff-delete-if-empty #[nil "\205\301\302!8\303=\205\304!\207" [buffer-file-name 7 file-attributes 0 delete-file] 3]) #@45 Arrange for empty diff files to be removed. (defalias 'diff-delete-empty-files #[nil "\300\301\302\303\304$\207" [add-hook after-save-hook diff-delete-if-empty nil t] 5 (#$ . 32955)]) #@54 Turn context diffs into unified diffs if applicable. (defalias 'diff-make-unified #[nil "\212eb\210\302!\205\303f\304=)\205\305 \306\216\307ed\"*\207" [diff-hunk-header-re mod looking-at nil 42 buffer-modified-p ((restore-buffer-modified-p mod)) diff-context->unified] 3 (#$ . 33145)]) #@133 Jump to the next "complex" hunk. "Complex" is approximated by "the hunk changes the number of lines". Only works for unified diffs. (defalias 'diff-next-complex-hunk #[nil "\300\301\302\303#\205\304\305!\304\306!\232\205\202\207" [re-search-forward "^@@ [-0-9]+,\\([0-9]+\\) [+0-9]+,\\([0-9]+\\) @@" nil t match-string 1 2] 4 (#$ . 33444) nil]) (defalias 'diff-sanity-check-context-hunk-half #[(lines) "\302f\303>\203`Tf\304>\203 S\202\201\305 !\204# U\203'\302\202\207\302f\306>\203N`Tf\307=\203<\310\311!\204B\312\313!\202~\314u\210\315c\210\316y\210\202\201\317W\203Z\312\313!\202~\310\320!\204f\312\321!\202~l\203s\322c\210\316y\210\202\201\315c\210`\323Z`S|\210\324\205\207\302y\210\202)\207" [lines count nil (32 33 43 45) (32 9) zerop (33 43 45) 10 y-or-n-p "Try to auto-fix whitespace loss damage? " error "End of hunk ambiguously marked" 1 " " -1 0 "Try to auto-fix whitespace loss and word-wrap damage? " "Abort!" " " 2 t] 2]) (defalias 'diff-sanity-check-hunk #[nil "\304\212\305 !\204\306\307!\202\310f\311=\203T\305\312!\204\"\306\313!\202\314y\210\315\316\317\314!!\316\317\320!!ZT!\210\305\321!\204@\306\322!\202\310y\210\315\316\317\314!!\316\317\320!!ZT!\202\310f\323=\203\305\324!\204g\306\325!\202\316\317\320!!\316\317\314!!\310y\210\310f\326=\203\206 S\nS\202\371\310f\327=\203\223 S\202\371\310f\330=\203\240\nS\202\371\331 !\203\260\331\n!\203\260\310\202\377 \332W\204\274\n\332W\203\322\306\331 !\204\311\331\n!\203\315\333\202\316\334!\202\366\335\336!\204\336\306\337!\202\366l\203\353\340c\210\341y\210\202\371\340c\210`\314Z`S|\210\304\205\377\310y\210\202v*\202\304*\207" [inhibit-read-only diff-hunk-header-re after before t looking-at error "Not recognizable hunk header" nil 42 "\\*\\{15\\}\\(?: .*\\)?\n\\*\\*\\* \\([0-9]+\\),\\([0-9]+\\) \\*\\*\\*\\*" "Unrecognized context diff first hunk header format" 2 diff-sanity-check-context-hunk-half string-to-number match-string 1 "--- \\([0-9]+\\),\\([0-9]+\\) ----$" "Unrecognized context diff second hunk header format" 64 "@@ -[0-9]+,\\([0-9]+\\) \\+[0-9]+,\\([0-9]+\\) @@" "Unrecognized unified diff hunk header format" 32 45 43 zerop 0 "End of hunk ambiguously marked" "Hunk seriously messed up" y-or-n-p "Try to auto-fix whitespace loss and word-wrap damage? " "Abort!" " " -1] 5]) #@222 Return the literal source text from HUNK as (TEXT . OFFSET). If DESTP is nil, TEXT is the source, otherwise the destination text. CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding char-offset in TEXT. (defalias 'diff-hunk-text #[(hunk destp char-offset) "\306\307!\310\216rq\210 c\210eb\210\311\211\211\312\313\314!\203*\315\211y\210``\202\206\313\316!\203H\312y\210`\317\320\311\321#\210\322y\210`\315y\210`\202\206\313\323!\203V\315y\210`\202\206\313\324!\203d\315y\210`\202\206\313\325!\203\202\315y\210`\317\326\311\321#\210\322y\210`\315y\210`\202\206\327\330!\210\203\220\f?\202\222 ?\203\242 \203\236\331\202)\332\202) \232\203\255\f\202\265\fd\232\203\265  \203\300e \\b\210\212\203\312\f\202\313 ! \203\334 !V\203\334 d|\210e!|\210)\203\353\333\202\354\334\"eb\210m\204\311f\"=\203`\315y\210`|\210\202\361\335\n!\210\315y\210\202\361*\336ed\"# \203&#`eZB\202(#).\207" [#1=#:temp-buffer hunk num-pfx-chars divider-pos dst-pos src-pos generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) nil 2 looking-at "^@@" 1 "^\\*\\*" re-search-forward "^--- " t 0 "^[0-9]+a[0-9,]+$" "^[0-9,]+d[0-9]+$" "^[0-9,]+c[0-9,]+$" "^---$" error "Unknown diff hunk type" ("" . 0) "" 45 43 delete-char buffer-substring-no-properties destp char-offset keep kill-char text] 5 (#$ . 35801)]) #@113 Return the buffer position (BEG . END) of the nearest occurrence of TEXT. If TEXT isn't found, nil is returned. (defalias 'diff-find-text #[(text) "`\304 \305\306#\205\307\224\307\225B G\\b\205%\310 \305\306#\205%\307\224\307\225B\n\203B \203B\n@Z @ZV\203> \202G\n\202G \206G\n+\207" [orig text forw back search-forward nil t 0 search-backward] 4 (#$ . 37232)]) #@111 Return the buffer position (BEG . END) of the nearest occurrence of TEXT. Whitespace differences are ignored. (defalias 'diff-find-approx-text #[(text) "`\305\306\307\310 !\311#\312Q\313\n\314\315#\205\316\224\316\225B G\\b\2050\317\n\314\315#\2050\316\224\316\225B \203M\f\203M @Z\f@ZV\203I\f\202R \202R\f\206R ,\207" [orig text re forw back "^[ \n\f]*" mapconcat regexp-quote split-string "[ \n\f]+" "[ \n\f]*\n" re-search-forward nil t 0 re-search-backward] 5 (#$ . 37617)]) (defalias 'diff-xor #[(a b) "\203 ?\207 \207" [a b] 1]) (put 'diff-xor 'byte-optimizer 'byte-compile-inline-expand) #@485 Find out (BUF LINE-OFFSET POS SRC DST SWITCHED). BUF is the buffer corresponding to the source file. LINE-OFFSET is the offset between the expected and actual positions of the text of the hunk or nil if the text was not found. POS is a pair (BEG . END) indicating the position of the text in the buffer. SRC and DST are the two variants of text as returned by `diff-hunk-text'. SRC is the variant that was found in the buffer. SWITCHED is non-nil if the patch is already applied. (defalias 'diff-find-source-location #[(&optional other-file reverse) "\212 \211\203\n?\202\n*`\306 \210`Z\307 #`\212\310 \210`){$\311$% #&\311$%? #'\312\313!\204E\314\315!\202i\f\203O\316\317!\202i\320\225\203Z\316\320!\202i\321\322\323\324#\204f\314\325!\210\316\317!(\326\f!\206t\314\327!)\330)!*\331!\332V\203\206\fr*q\210\333\334(!!\210`+\323,\335&@!\206\303\324,\335'@!\206\303\323\211,\336\337\217\206\303\324,\323\340\341\217\206\303\323\211,-*C-\203\332\342+-@\"-D\202\345\323+\211&@G\\BD\244,\203\364'&\324E\202\371&'D\244.\207" [other-file diff-jump-to-old-file b a other char-offset diff-beginning-of-hunk diff-sanity-check-hunk diff-end-of-hunk diff-hunk-text looking-at "\\(?:\\*\\{15\\}.*\n\\)?[-@* ]*\\([0-9,]+\\)\\([ acd+]+\\([0-9,]+\\)\\)?" error "Can't find the hunk header" match-string 1 3 re-search-forward "^--- \\([0-9,]+\\)" nil t "Can't find the hunk separator" diff-find-file-name "Can't find the file" find-file-noselect prefix-numeric-value 8 goto-line string-to-number diff-find-text (byte-code "\301@!\207" [old diff-find-approx-text] 2) ((invalid-regexp)) (byte-code "\301@!\207" [new diff-find-approx-text] 2) ((invalid-regexp)) count-lines _ hunk reverse old new line file buf orig-pos switched pos] 6 (#$ . 38241)]) (defalias 'diff-hunk-status-msg #[(line-offset reversed dry-run) "\203 \203\f\304\202\305\202 \203\306\202\307\310 \204#\311\2028 \312U\203-\313\2028 \314U\2037\315\2028\316\n #)\207" [dry-run reversed msg line-offset "already applied" "not yet applied" "undone" "applied" message "Hunk text not found" 0 "Hunk %s" 1 "Hunk %s at offset %d line" "Hunk %s at offset %d lines"] 4]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list diff-apply-hunk-to-backup-file default-boundp set-default nil] 3) #@375 Apply the current hunk to the source file and go to the next. By default, the new source file is patched, but if the variable `diff-jump-to-old-file' is non-nil, then the old source file is patched instead (some commands, such as `diff-goto-source' can change the value of this variable when given an appropriate prefix argument). With a prefix argument, REVERSE the hunk. (defalias 'diff-apply-hunk #[(&optional reverse) "\306?\"\211AAAA\203 \211A@\202\307\310\311 GD\" \211A@ \211A@ \211A@ \211A@ \211A@ \203L\307\310\311 G\312\\D\"\210 \204V\313\314!\202\342r\nq\210!\205}\315!!\205}?\205}\316\317!\210\320\321\322\323!!\"!\211?)\203\222\313\324\325\321\326?\205\214\327\"!\"\202\342 \203\242\330\213\204\242\331\332!\202\342r\nq\210\f@b\210\f@\fA|\210@c\210)\333\334\n!\f@A\\\"\210\335  \"\211#\203\325\"?\202\327\"*\311#\210$\205\342\336 .\207" [reverse #1=#:--cl-rest-- buf line-offset pos old diff-find-source-location signal wrong-number-of-arguments nil 6 error "Can't find the text to patch" backup-file-name-p make-local-variable diff-apply-hunk-to-backup-file yes-or-no-p format "Really apply this hunk to %s? " file-name-nondirectory "%s" substitute-command-keys "Use %s\\[diff-apply-hunk] to apply it to the other file" "\\[universal-argument] " ((byte-code "\304!\210 @\nA\\b\210\305 \203\306\202\307!\207" [buf pos old reverse pop-to-buffer y-or-n-p "Hunk hasn't been applied yet; apply it now? " "Hunk has already been applied; undo it? "] 2)) message "(Nothing done)" set-window-point display-buffer diff-hunk-status-msg diff-hunk-next new switched buffer-file-name b a diff-advance-after-apply-hunk] 7 (#$ . 40594) "P"]) #@103 See whether it's possible to apply the current hunk. With a prefix argument, try to REVERSE the hunk. (defalias 'diff-test-hunk #[(&optional reverse) "\306?\"\211AAAA\203 \211A@\202\307\310\311 GD\" \211A@ \211A@ \211A@ \211A@ \211A@ \203L\307\310\311 G\312\\D\"\210\313\314\n!\f@ A\\\"\210\315 \211\203j?\202l*\316#.\207" [reverse #1=#:--cl-rest-- buf line-offset pos src diff-find-source-location signal wrong-number-of-arguments nil 6 set-window-point display-buffer diff-hunk-status-msg t dst switched b a] 6 (#$ . 42304) "P"]) (defalias 'diff-mouse-goto-source 'diff-goto-source) #@341 Jump to the corresponding source line. `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg is given) determines whether to jump to the old or the new file. If the prefix arg is bigger than 8 (for example with \[universal-argument] \[universal-argument]) then `diff-jump-to-old-file' is also set, for the next invocations. (defalias 'diff-goto-source #[(&optional other-file event) "\203&\306\211:\203\3078:\203\307\202\3108\202#\311 `\312\313F)!\210\212\314 \210\315\316!)?\317\n \"\211AAAA\203E \211A@\202L\320\321\322 GD\" \211A@ \211A@ \211A@ \211A@ \211A@ \203}\320\321\322 G\323\\D\"\210\324\f!\210@A\\b\210\325 \211\203\235?\202\237*\326#.\207" [event rev other-file #1=#:--cl-rest-- buf line-offset posn-set-point 2 1 selected-window (0 . 0) 0 beginning-of-line looking-at "[-<]" diff-find-source-location signal wrong-number-of-arguments nil 6 pop-to-buffer diff-hunk-status-msg t pos src dst switched b a] 6 (#$ . 42932) (list current-prefix-arg last-input-event)]) #@82 Find the name of function at point. For use in `add-log-current-defun-function'. (defalias 'diff-current-defun #[nil "\212\306!\203\307y\210\310\311\312\313#\210\314 \211AAAA\203# \211A@\202*\315\316\312 GD\" \211A@ \211A@ \211A@ \211A@ \211A@ \203Y\315\316\312 G\317\\D\"\210\320 \210\312f\321>\203\227\203m\202n \322\323!\324\216rq\210@c\210r\nq\210) \210eA\\b\210\325 ,\206\245r\nq\210\f@ A\\b\210\325 ).\207" [diff-hunk-header-re #1=#:--cl-rest-- buf line-offset pos src looking-at 1 re-search-forward "^[^ ]" nil t diff-find-source-location signal wrong-number-of-arguments 6 beginning-of-line (60 45) generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) add-log-current-defun dst switched old #2# major-mode] 6 (#$ . 43983)]) #@56 Refine the current hunk by ignoring space differences. (defalias 'diff-refine-hunk #[nil "`\306 \210`Z\307f\310=\203\311\202\307f\312=\203\313\202\314\315\316!\204+\317\320!\2050\321\322\323!!\324`\212\325 \210`)\"\326\nS\327\"\330\331!\330\332!*+,\333-\307\211./\334\216\212\335 \307#.\335 \333#/\336\f.@P\307 \307\337%\210\336\f/@P\307*\307\337%\210\340\341!0\342\216r0q\210\3431\307\333\307 *&\2112\344=\204\3112\323=\203\274eb\210\3453\307\333#\203\311e\344\224|\210\202\311db\210n\204\306\346c\210 c\210\347 2\350>?\205\331\317\3512\".\207" [char-offset opts line-nb hunk lead file1 diff-beginning-of-hunk nil 64 "-bu" 42 "-bc" "-b" looking-at "[^0-9]+\\([0-9]+\\)" error "Can't find line number" string-to-number match-string 1 delete-and-extract-region diff-end-of-hunk make-string 10 make-temp-file "diff1" "diff2" t ((byte-code "c\210\303 !\210\303\n!\207" [hunk file1 file2 delete-file] 2)) diff-hunk-text write-region nomessage generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) call-process 0 re-search-forward "\n" buffer-string (0 1) "Diff returned: %s" file2 buffer-file-coding-system coding-system-for-read inhibit-read-only old new #1# diff-command status diff-hunk-header-re] 9 (#$ . 44833) nil]) (provide 'diff-mode)