;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307\306\310\311\312\311\313& \207" [require comint custom-declare-group hippie-expand nil "Expand text trying various ways to find its expansion." :link (custom-manual "(autotype)Hippie Expand") (emacs-commentary-link "hippie-exp") :group abbrev convenience] 12) (defvar he-num -1) (defvar he-string-beg (make-marker)) (defvar he-string-end (make-marker)) (defvar he-search-string nil) (defvar he-expand-list nil) (defvar he-tried-table nil) (defvar he-search-loc (make-marker)) (defvar he-search-loc2 nil) (defvar he-search-bw nil) (defvar he-search-bufs nil) (defvar he-searched-n-bufs nil) (defvar he-search-window nil) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\306\307&\210\300\314\315\316\306\307\304\313&\210\300\317\311\320\306\307\304\313&\210\300\321\311\322\306\307\304\313&\210\300\323\315\324\304\325\306\307&\210\300\326\327\330\304\331\306\307&\210\300\332\315\333\304\334\306\307&\207" [custom-declare-variable hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "The list of expansion functions tried in order by `hippie-expand'.\nTo change the behavior of `hippie-expand', remove, change the order of,\nor insert functions in this list." :type (repeat function) :group hippie-expand hippie-expand-verbose t "Non-nil makes `hippie-expand' output which function it is trying." boolean hippie-expand-dabbrev-skip-space nil "Non-nil means tolerate trailing spaces in the abbreviation to expand." hippie-expand-dabbrev-as-symbol "Non-nil means expand as symbols, i.e. syntax `_' is considered a letter." hippie-expand-no-restriction "Non-nil means that narrowed buffers are widened during search." hippie-expand-max-buffers "The maximum number of buffers (apart from the current) searched.\nIf nil, all buffers are searched." (choice (const :tag "All" nil) integer) hippie-expand-ignore-buffers '("^ \\*.*\\*$" dired-mode) "A list specifying which buffers not to search (if not current).\nCan contain both regexps matching buffer names (as strings) and major modes\n(as atoms)." (repeat (choice regexp (symbol :tag "Major Mode"))) hippie-expand-only-buffers "A list specifying the only buffers to search (in addition to current).\nCan contain both regexps matching buffer names (as strings) and major modes\n(as atoms). If non-nil, this variable overrides the variable\n`hippie-expand-ignore-buffers'." (repeat (choice regexp (symbol :tag "Major Mode")))] 8) #@427 Try to expand text before point, using multiple methods. The expansion functions in `hippie-expand-try-functions-list' are tried in order, until a possible expansion is found. Repeated application of `hippie-expand' inserts successively possible expansions. With a positive numeric argument, jumps directly to the ARG next function in this list. With a negative argument or just \[universal-argument], undoes the expansion. (defalias 'hippie-expand #[(arg) "\203\250\203\217\306V\203\217 \307U\206\n \232?\211\203\"\307\310\2030\f\2042\311 \210\2022\306 \\\306]\211GY\204Y\3128 UC\"\204YT\211\202:) GY\203{\307\f\203r\313\314!\210\202v\313\315!\210\316 \202\215\205\215\317 ?\205\215\313\320 8\")\207 \306Y\205\261\321!p=\205\261\307\311 \210\205\261\317 ?\205\261\313\322!\207" [arg he-num this-command last-command first he-tried-table 0 -1 nil he-reset-string apply message "No expansion found" "No further expansions found" ding window-minibuffer-p "Using %s" marker-buffer "Undoing expansions" i hippie-expand-try-functions-list hippie-expand-verbose he-string-beg] 5 (#$ . 3101) "P"]) (defalias 'he-init-string #[(beg end) " \305\223\210\n \305\223\210\306 \"\211\207" [he-string-beg beg he-string-end end he-search-string nil buffer-substring-no-properties] 3]) (defalias 'he-reset-string #[nil "\304  b\210\nc\210` |\210b)\207" [newpos he-string-beg he-search-string he-string-end point-marker] 2]) (defalias 'he-substitute-string #[(str &optional trans-case) "\205 \205 \n\306 \307 b\210\203\310 \n\"\202!\n\211 B c\210`\f|\210\fb+\207" [trans-case case-replace case-fold-search subst newpos he-string-beg point-marker nil he-transfer-case he-search-string str he-tried-table he-string-end] 4]) (defalias 'he-capitalize-first #[(str) "\304 \305\216\306\307 \"\203 \227\310\224\211\n \nH\226I\210 *\202 *\207" [save-match-data-internal str no res match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match "\\Sw*\\(\\sw\\).*" 1] 5]) (defalias 'he-ordinary-case-p #[(str) "\211\227\230\206\211\226\230\206\301!\230\206\302!\230\207" [str capitalize he-capitalize-first] 3]) (defalias 'he-transfer-case #[(from-str to-str) "\302 \303G G^#\230\203 \207\304 !\204 \207\211\227\230\203\" \227\207\211\226\230\203, \226\207\305!\230\2038\305 !\207\306!\230\203D\306 !\207 \207" [from-str to-str substring 0 he-ordinary-case-p he-capitalize-first capitalize] 6]) (defalias 'he-string-member #[(str lst &optional trans-case) "\205 \203\n\203 \203\306\f\"\202 \235\207" [str trans-case case-replace case-fold-search he-search-string lst he-transfer-case] 3]) (defalias 'he-buffer-member #[(lst) " >\206! \203 @;\203\302 @\303 \"\204 A\211\204\n \207" [major-mode lst string-match buffer-name] 4]) #@172 Construct a function similar to `hippie-expand'. Make it use the expansion functions in TRY-LIST. An optional second argument VERBOSE non-nil makes the function verbose. (defalias 'make-hippie-expand-function '(macro . #[(try-list &optional verbose) "\302\303\304\305\306\307\310!\311#P\312\313\314D\315 DD\316BB\257D\207" [try-list verbose function lambda (arg) "Try to expand text before point, using the following functions: \n" mapconcat prin1-to-string eval ", " (interactive "P") let hippie-expand-try-functions-list hippie-expand-verbose ((hippie-expand arg))] 9 (#$ . 5993)])) #@243 Try to complete text as a file name. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-complete-file-name #[(old) "\204=\306\307 `\"\210\310 !\311\312 !\206\313!\314 \f\"\204# \fB \313\232\204:\315\n!\203:\316\317 \n\"\320\"\202<\321* \203P\314 @\f\"\203P A\211\204A \204]\203[\322 \210\321\207\323\312 ! @\"\324!\210 @\fAB A)\325\207" [old he-search-string dir-part name-part he-tried-table he-expand-list he-init-string he-file-name-beg file-name-nondirectory expand-file-name file-name-directory "" he-string-member file-directory-p sort file-name-all-completions string-lessp nil he-reset-string he-concat-directory-file-name he-substitute-string t filename] 5 (#$ . 6589)]) #@213 Try to complete text as a file name, as many characters as unique. The argument OLD has to be nil the first call of this function. It returns t if a unique, possibly partial, completion is found, nil otherwise. (defalias 'try-complete-file-name-partially #[(old) "\306 \204A\307\310 `\"\210\311\n!\312\313\n!\206\314!\n\314\232\204+\315 !\203+\316\f \"\317=\204>\f\230\204>\320 \"\203@\306*\204P \203L\321 \210\306\202d\322\313\n!\"\323!\210 AB)\317)\207" [expansion old he-search-string dir-part name-part he-tried-table nil he-init-string he-file-name-beg file-name-nondirectory expand-file-name file-name-directory "" file-directory-p file-name-completion t he-string-member he-reset-string he-concat-directory-file-name he-substitute-string filename] 4 (#$ . 7471)]) #@65 Characters that are considered part of the file name to expand. (defvar he-file-name-chars (byte-code "\301>\203\302\207\303\207" [system-type (ms-dos windows-nt cygwin) "-a-zA-Z0-9_/.,~^#$+=:\\\\" "-a-zA-Z0-9_/.,~^#$+="] 2) (#$ . 8276)) (defalias 'he-file-name-beg #[nil "`\212 \302x\210\303\304!\305V\203\202`*\207" [op he-file-name-chars nil skip-syntax-backward "w" 0] 2]) #@77 Try to slam together two parts of a file specification, system dependently. (defalias 'he-concat-directory-file-name #[(dir-part name-part) "\204 \207\n\303=\203/\304\305\"\203+\304\306\"\204+ \211GSH\307U\203+ \211GS\310I\210 P\207 P\207" [dir-part name-part system-type ms-dos string-match "\\\\" "/" 47 92] 3 (#$ . 8668)]) #@252 Try to complete word as an Emacs Lisp symbol. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-complete-lisp-symbol #[(old) "\204%\305\306 `\"\210\307 \n\"\204 \nB \310\232?\205$\311\312 \313#\314\"\f\2038\307\f@\n\"\2038\fA\211\204)\f\204E\203C\315 \210\316\207\317\f@!\210\fA\320\207" [old he-search-string he-tried-table obarray he-expand-list he-init-string he-lisp-symbol-beg he-string-member "" sort all-completions #[(sym) "\301!\206\302!\206\303!\207" [sym boundp fboundp symbol-plist] 2] string-lessp he-reset-string nil he-substitute-string t] 6 (#$ . 9012)]) #@217 Try to complete as an Emacs Lisp symbol, as many characters as unique. The argument OLD has to be nil the first call of this function. It returns t if a unique, possibly partial, completion is found, nil otherwise. (defalias 'try-complete-lisp-symbol-partially #[(old) "\305 \204-\306\307 `\"\210\n\310\230\204\311\n \312#\313=\204+\n\230\204+\314\f\"\203-\305\204< \2038\315 \210\305\202A\316!\210\313)\207" [expansion old he-search-string obarray he-tried-table nil he-init-string he-lisp-symbol-beg "" try-completion #[(sym) "\301!\206\302!\206\303!\207" [sym boundp fboundp symbol-plist] 2] t he-string-member he-reset-string he-substitute-string] 4 (#$ . 9783)]) (defalias 'he-lisp-symbol-beg #[nil "\212\300\301!\210`)\207" [skip-syntax-backward "w_"] 2]) #@272 Try to complete the current line to an entire line in the buffer. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-expand-line #[(old) "\306\307p!\205\f\205\f \f\204\"\310\311\n!`\"\210 \306\223\210\312\313\232\204g\212\214\2032~\210\203S b\210\314\n\312# `\306\223\210 \204S \306\223\210\306 \204f b\210\314\n\306# `\306\223\210* \204v\f\203r\315 \210\306\202|\316 \312\"\210\312*\207" [comint-use-prompt-regexp comint-prompt-regexp strip-prompt expansion old he-search-loc nil get-buffer-process he-init-string he-line-beg t "" he-line-search he-reset-string he-substitute-string he-string-beg he-search-bw he-search-string hippie-expand-no-restriction he-string-end] 4 (#$ . 10577)]) #@269 Try to complete the current line, searching all other buffers. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-expand-line-all-buffers #[(old) "\301\302\303#\207" [old he--all-buffers #[nil "\302\303p!\205\f\205\f !\207" [comint-use-prompt-regexp comint-prompt-regexp he-line-beg get-buffer-process] 3] #[(string) "\303\304p!\205 \205 \n\305#\207" [string comint-use-prompt-regexp comint-prompt-regexp he-line-search get-buffer-process nil] 4]] 4 (#$ . 11476)]) (defalias 'he--all-buffers #[(old beg-function search-function) "\306p \n\204'\307 `\"\210\310 \311\312@\223\210\313\232\204\252\203\252\204\252\203EW\203\252@q\210p=\204\232 \203[\314 !\202_\314\f!?\203\232\212\214\203k~\210b\210 !)`\306\223\210\204\226AT\312@\223\210*\202.A\312@\223\210\202.q\210\204\277\203\273\315 \210\306\202\306\316\317\"\210\317-\207" [hippie-expand-only-buffers hippie-expand-ignore-buffers case-fold-search orig-case-fold-search ignore-buffers only-buffers nil he-init-string buffer-list 0 1 "" he-buffer-member he-reset-string he-substitute-string t buf expansion old beg-function he-search-bufs he-searched-n-bufs he-search-loc he-search-string hippie-expand-max-buffers hippie-expand-no-restriction search-function] 5]) (defalias 'he-line-search #[(str strip-prompt reverse) "\305\2045 \203\306\307\n \"\305\310#\202\311\307\n \"\305\310#\2035\312\313\225\314\225\"\315\f\310#\203\305\211\203)\207" [result reverse str strip-prompt he-tried-table nil re-search-backward he-line-search-regexp t re-search-forward buffer-substring-no-properties 1 0 he-string-member] 5]) (defalias 'he-line-beg #[(strip-prompt) "\212\301\302\303\"\304 \305#\203\306\224\202`)\207" [strip-prompt re-search-backward he-line-search-regexp "" line-beginning-position t 2] 4]) (defalias 'he-line-search-regexp #[(pat strip-prompt) "\203\303 \304\305\n!\306\260\207\307\305\n!\306Q\207" [strip-prompt comint-prompt-regexp pat "\\(" "\\|^\\s-*\\)\\(?2:" regexp-quote "[^\n]*[^ \n]\\)" "^\\(\\s-*\\)\\("] 5]) #@255 Try to complete the current beginning of a list. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-expand-list #[(old) "\306 \204\307\310 `\"\210\n \306\223\210\311 \312\232\204Q\212\214\203\"~\210\f\203?\nb\210\313 \311\"\n`\306\223\210\204?\n\306\223\210\306\204P\nb\210\313 \306\"\n`\306\223\210*\204` \203\\\314 \210\306\202f\315\311\"\210\311)\207" [expansion old he-search-loc he-string-beg he-search-bw he-search-string nil he-init-string he-list-beg t "" he-list-search he-reset-string he-substitute-string hippie-expand-no-restriction he-string-end] 3 (#$ . 13760)]) #@269 Try to complete the current list, searching all other buffers. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-expand-list-all-buffers #[(old) "\301\302\303#\207" [old he--all-buffers he-list-beg he-list-search] 4 (#$ . 14536)]) (defalias 'he-list-search #[(str &optional reverse) "\306\211\211\211 \204a\f\203\307 \306\310#\202\311 \306\310#\203a`\312\224\211b\210\306\31315\314\315!0\2029\210\310\211\210\f\203G`V\203G\310\204[\316\n`\"\317 \310#\203[\306 b\210\202 ,\207" [err pos beg result reverse str nil search-backward t search-forward 0 (error) forward-list 1 buffer-substring-no-properties he-string-member he-string-beg he-tried-table] 5]) (defalias 'he-list-beg #[nil "\212\3001\f\301\302!0\202\210\202\210`)\207" [(error) backward-up-list 1] 2]) #@268 Try to expand word before point according to all abbrev tables. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible expansions of the same string). It returns t if a new expansion is found, nil otherwise. (defalias 'try-expand-all-abbrevs #[(old) "\204\305\306 `\"\210 \307\232?\205\310\311\312\313\n\"\" \2032 @\203+\314 @\f\315#\2032 A\211\204 \204?\203=\316 \210\317\207\320 @\315\"\210 A\315\207" [old he-search-string abbrev-table-name-list he-expand-list he-tried-table he-init-string he-dabbrev-beg "" mapcar #[(sym) "\302!\205\303\304!!\205\305 \227\304!\"\207" [sym he-search-string boundp vectorp eval abbrev-expansion] 4] append (local-abbrev-table global-abbrev-table) he-string-member t he-reset-string nil he-substitute-string] 6 (#$ . 15510)]) #@268 Try to expand word "dynamically", searching the current buffer. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible expansions of the same string). It returns t if a new expansion is found, nil otherwise. (defalias 'try-expand-dabbrev #[(old) "\306 \204\307\310 `\"\210\n \306\223\210\311 \312\232\204Q\212\214\203\"~\210\f\203?\nb\210\313 \311\"\n`\306\223\210\204?\n\306\223\210\306\204P\nb\210\313 \306\"\n`\306\223\210*\204` \203\\\314 \210\306\202f\315\311\"\210\311)\207" [expansion old he-search-loc he-string-beg he-search-bw he-search-string nil he-init-string he-dabbrev-beg t "" he-dabbrev-search he-reset-string he-substitute-string hippie-expand-no-restriction he-string-end] 3 (#$ . 16361)]) #@267 Try to expand word "dynamically", searching all other buffers. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible expansions of the same string). It returns t if a new expansion is found, nil otherwise. (defalias 'try-expand-dabbrev-all-buffers #[(old) "\301\302\303#\207" [old he--all-buffers he-dabbrev-beg he-dabbrev-search] 4 (#$ . 17159)]) #@270 Try to expand word "dynamically", searching visible window parts. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible expansions of the same string). It returns t if a new expansion is found, nil otherwise. (defalias 'try-expand-dabbrev-visible #[(old) "\306\307\310 !\203\f\311\202 \312\n\204%\313\314 `\"\210\315 \f\316 !\317 !\223\210 \320\232\204\221\321\f!\203\221 \204\221r\322\f!q\210\212\fb\210\323 \306\324 !#\211\203f\322!p=\203f\321!\325\224=\203f\323 \306\324 !#\f`p\223\210* \204%\326 \306#\211\315 =\203\205\f\306\211\223\210\202%\f\316 !\317 !\223\210\202% \204\240\n\203\234\327 \210\306\202\246\330 \312\"\210\312*\207" [flag expansion old he-search-window he-search-loc he-search-string nil frame-visible-p window-frame visible t he-init-string he-dabbrev-beg selected-window window-start window-buffer "" marker-position marker-buffer he-dabbrev-search window-end 0 next-window he-reset-string he-substitute-string he-string-beg] 6 (#$ . 17575)]) (defalias 'he-dabbrev-search #[(pattern &optional reverse limit) "\306\204\307\310 !\311Q\202% \312Hz\313=\203\310 !\314P\202%\307\310 !\314Q \204j\f\2037\315\n \316#\202<\317\n \316#\203j\320\312\224\312\225\"\203[\312\224eV\203[\312\224Sfz\321>\204d\322 \316#\203'\306\211\203+ *\207" [hippie-expand-dabbrev-as-symbol pattern regpat result reverse limit nil "\\<" regexp-quote "\\sw+" 0 95 "\\(\\sw\\|\\s_\\)+" re-search-backward t re-search-forward buffer-substring-no-properties (95 119) he-string-member he-tried-table] 5]) (defalias 'he-dabbrev-beg #[nil "`\212 \203 \303\304!\210\303\n\203\305\202\306!\307U\203\202 `*\207" [op hippie-expand-dabbrev-skip-space hippie-expand-dabbrev-as-symbol skip-syntax-backward ". " "w_" "w" 0] 2]) #@265 Try to expand word "dynamically", searching the kill ring. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-expand-dabbrev-from-kill #[(old) "\306 \204\307\310 `\"\210\n\311\232?\205 \312\n\311\232\204!\313\n!\2040 \203,\314 \210\306\2026\315\316\"\210\316)\207" [expansion old he-search-string kill-ring he-expand-list he-search-loc2 nil he-init-string he-dabbrev-beg "" 0 he-dabbrev-kill-search he-reset-string he-substitute-string t] 3 (#$ . 19412)]) (defalias 'he-dabbrev-kill-search #[(pattern) "\306\204\307\310 !\311Q\202% \312Hz\313=\203\310 !\314P\202%\307\310 !\314Q\n@ \204\215\n\203\215 \204y\315\f #\203y\316 \312\224\312\225#\317\312 G\306 $\210\312\224T\203j\312\224\312V\203j \312\224SHz\320>\204s\321 \322#\2032\306\211\2036 \204*\n\203*\nA\211@\312\202* +\207" [hippie-expand-dabbrev-as-symbol pattern he-expand-list killstr regpat result nil "\\<" regexp-quote "\\sw+" 0 95 "\\(\\sw\\|\\s_\\)+" string-match substring set-text-properties (95 119) he-string-member t he-search-loc2 he-tried-table] 6]) #@262 Try to complete text with something from the kill ring. The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise. (defalias 'try-expand-whole-kill #[(old) "\306 \204#\307\310 `\"\210\311\n \"\204\n B\n\312\232?\205\f\306\n\312\232\204-\313\n!\204< \2038\314 \210\306\202A\315!\210\316)\207" [expansion old he-search-string he-tried-table kill-ring he-expand-list nil he-init-string he-kill-beg he-string-member "" he-whole-kill-search he-reset-string he-substitute-string t he-search-loc2] 3 (#$ . 20659)]) (defalias 'he-whole-kill-search #[(str) "\306\211\307! @\310\f\204\231 \203\231\204.\311 \nT#\211\203.\nB\202\f\204\206\203\206@A\212b\210`\nZeY\203s`\nZf \312H=\203s\313\314 \312\n#`\nZ\315#\203s\314 \n\"\316\312\fG\306\f$\210)\f\203.\317\f\"\203.\306\211\2032\f\204 \203 A\211@\310\202 \f-\207" [str he-expand-list pos killstr result case-fold-search nil regexp-quote -1 string-match 0 search-backward substring t set-text-properties he-string-member he-search-loc2 he-string-beg he-tried-table] 6]) (defalias 'he-kill-beg #[nil "`\212\301\302!\210\301\303!\304U\203\202`*\207" [op skip-syntax-backward "^w_" "w_" 0] 2]) (provide 'hippie-exp)