Files
emacsd/elpa/helm-20191004.1946/helm-mode.elc

341 lines
47 KiB
Plaintext
Raw Normal View History

2019-10-09 20:36:55 +02:00
;ELC
;;; Compiled
;;; in Emacs version 26.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\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\302%\210\312\313\314\315\316DD\317\311\306\320\321&\210\312\322\314\315\323DD\324\311\306\320\325&\210\312\326\314\315\327DD\330\311\306\320\331&\210\312\332\314\315\333DD\334\311\306\320\331&\210\312\335\314\315\336DD\337\311\306\320\331&\210\312\340\314\315\341DD\342\311\306\320\331&\210\312\343\314\315\344DD\345\311\306\320\315&\210\312\346\314\315\347DD\350\311\306\320\331&\210\312\351\314\315\352DD\353\311\306\320\354&\210\312\355\314\315\356DD\357\311\306\320\331&\210\360\361\362\363\311\306%\207" [require cl-lib helm helm-lib helm-files custom-declare-group helm-mode nil "Enable helm completion." :group custom-declare-variable helm-completing-read-handlers-alist funcall function #[0 "\300\207" [((describe-function . helm-completing-read-symbols) (describe-variable . helm-completing-read-symbols) (describe-symbol . helm-completing-read-symbols) (debug-on-entry . helm-completing-read-symbols) (find-function . helm-completing-read-symbols) (disassemble . helm-completing-read-symbols) (trace-function . helm-completing-read-symbols) (trace-function-foreground . helm-completing-read-symbols) (trace-function-background . helm-completing-read-symbols) (find-tag . helm-completing-read-default-find-tag) (xref-find-definitions . helm-completing-read-default-find-tag) (xref-find-references . helm-completing-read-default-find-tag) (ffap-alternate-file) (tmm-menubar) (find-file) (find-file-at-point . helm-completing-read-sync-default-handler) (ffap . helm-completing-read-sync-default-handler) (execute-extended-command) (dired-do-rename . helm-read-file-name-handler-1) (dired-do-copy . helm-read-file-name-handler-1) (dired-do-symlink . helm-read-file-name-handler-1) (dired-do-relsymlink . helm-read-file-name-handler-1) (dired-do-hardlink . helm-read-file-name-handler-1) (basic-save-buffer . helm-read-file-name-handler-1) (write-file . helm-read-file-name-handler-1) (write-region . helm-read-file-name-handler-1))] 1] "Completing read functions for specific Emacs commands.\n\nBy default `helm-mode' use `helm-completing-read-default-handler' to\nprovide helm completion in each `completing-read' or `read-file-name'\nfound, but other functions can be specified here for specific\ncommands. This also allow disabling helm completion for some commands\nwhen needed.\n\nEach entry is a cons cell like (EMACS_COMMAND . COMPLETING-READ_HANDLER)\nwhere key and value are symbols.\n\nEach key is an Emacs command that use originaly `completing-read'.\n\nEach value maybe a helm function that takes same arguments as\n`completing-read' plus NAME and BUFFER, where NAME is the name of the new\nhelm source and BUFFER the name of the buffer we will use, but it can\nbe also a function not using helm, in this case the function should\ntake same args as `completing-read' and not be prefixed by \"helm-\".\n\n`helm' will use the name of the command calling `completing-read' as\nNAME and BUFFER will be computed as well with NAME but prefixed with\n\"*helm-mode-\".\n\nThis function prefix name must start by \"helm-\" when it uses helm,\notherwise `helm' assumes the function is not a helm function and\nexpects same args as `completing-read', this allow you to define a\nhandler not using helm completion.\n\nExample:\n\n (defun foo/test ()\n (interactive)\n (message \"%S\" (completing-read \"test: \" '(a b c d e))))\n\n (defun helm-foo/test-completing-read-handler (prompt collection\n predicate require-match\n initial-input hist def\n inherit-input-method\n name buffer)\n (helm-comp-read prompt collection :marked-candidates t\n :name name\n :buffer buffer))\n\n (add-to-list 'helm-completing-read-handlers-alist\n '(foo/test . helm-foo/test-completing-read-handle
#@30 Keymap for `helm-comp-read'.
(defvar helm-comp-read-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\305#\210\303\307\310#\210\211\207" [helm-map make-sparse-keymap set-keymap-parent define-key [C-return] helm-cr-empty-string [134217741] "" helm-mode-delete-char-backward-maybe] 5) (#$ . 8260))
#@22 Return empty string.
(defalias 'helm-cr-empty-string #[0 "\203\301\302!\207\303\304!\207" [helm-alive-p helm-exit-and-execute-action #[257 "\300\207" [""] 2 "\n\n(fn CANDIDATE)"] error "Running helm command outside of context"] 2 (#$ . 8575) nil])
(put 'helm-cr-empty-string 'helm-only t)
(defalias 'helm-mode--keyboard-quit #[0 "\301\302\303\301\")\207" [debug-on-quit nil signal quit] 3])
#@1644 Convert COLLECTION to list removing elements that don't match TEST.
See `helm-comp-read' about supported COLLECTION arguments.
SORT-FN is a predicate to sort COLLECTION.
ALISTP when non--nil will not use `all-completions' to collect
candidates because it doesn't handle alists correctly for helm.
i.e In `all-completions' the car of each pair is used as value.
In helm we want to use the cdr instead like (display . real),
so we return the alist as it is with no transformation by
`all-completions'.
e.g
(setq A '((a . 1) (b . 2) (c . 3)))
==>((a . 1) (b . 2) (c . 3))
(helm-comp-read "test: " A :alistp nil
:exec-when-only-one t
:initial-input "a")
==>"a" Which is not what we expect.
(helm-comp-read "test: " A :alistp t
:exec-when-only-one t
:initial-input "1")
==>"1"
See docstring of `all-completions' for more info.
INPUT is the string you want to complete against, defaulting to
`helm-pattern' which is the value of what you enter in minibuffer.
Note that when using a function as COLLECTION this value will be
available with the input argument of the function only when using a
sync source from `helm-comp-read', i.e not using
`:candidates-in-buffer', otherwise the function is called only once
with an empty string as value for `helm-pattern' because
`helm-pattern' is not yet computed, which is what we want otherwise
data would not be fully collected at init time.
If COLLECTION is an `obarray', a TEST should be needed. See `obarray'.
(fn COLLECTION &optional TEST SORT-FN ALISTP (INPUT helm-pattern))
(defalias 'helm-comp-read-get-candidates #[1153 "\211\203 \211A\262\242\202\203\304\305\306\307G\\D\"\210r\310 !\203' \206*p\211q\210\311!\203=\312#\2029\203S\313!\203SJ9\203S\314\2029\203|\313!\203|\203|\315\316\317\320\321 !\322\"\307\323%\312J#\262\2029\203\221\313!\203\221\312J\"\202\324!\203\341\211\325\230\204\341\n\203\341\326#\314\211:\203\332@\262\327\235\204\323\330 \"\203\310B\262\202\323\331\332!!PB\262A\262\202\252\211\237\266\203\202\324!\203\361\326#\202\203\375\204\375\202\312#\203\333\"\202\211\262)\207" [helm-pattern helm-current-buffer minibuffer-completing-file-name helm--url-regexp signal wrong-number-of-arguments helm-comp-read-get-candidates 5 buffer-live-p vectorp all-completions boundp nil make-byte-code 257 "\3011\300\302=\203\300\303!!\202\300!0\207\300\303!!\207" vconcat vector [(wrong-type-argument) commandp intern] "\n\n(fn ELM)" functionp "" t ("./" "../") string-match file-name-as-directory helm-basedir sort] 12 (#$ . 8978)])
#@19
(fn CANDIDATES)
(defalias 'helm-cr--pattern-in-candidates-p #[257 "\301\"\206 \302!\236\206 \235\206 \227\235\206 \226\235\207" [helm-pattern assoc intern] 4 (#$ . 11725)])
#@81 Default filter candidate function for `helm-comp-read'.
(fn CANDIDATES SOURCE)
(defalias 'helm-cr-default-transformer #[514 "\301\302\"\303\304=\204!\305\230\204!\306!\204!\307C\"\262\304\262\303\211\211\211:\203\220@\262;\203=\310\311\305#\202>\262\310\311\305#\262\232\204S\232\203l\203l\211\312\313\314\312\315\316\317##PBC\244\262\202\211\211;\203\204\320\321\"\203\204\310\321\322#B\202\205C\244\262A\262\202&\323\324\325#\266\205\207" [helm-pattern helm-attr must-match nil t "" helm-cr--pattern-in-candidates-p append replace-regexp-in-string "\\s\\" propertize " " display "[?]" face helm-ff-prefix string-match "\n" "->" helm-fast-remove-dups :test equal] 17 (#$ . 11920)])
(defalias 'helm-comp-read--move-to-first-real-candidate #[0 "\300\301\302\"\211\205\303\304\305#\306\230\205\307 \207" [helm-get-selection nil withprop get-text-property 0 display "[?]" helm-next-line] 5])
#@22
(fn DEFAULT CANDS)
(defalias 'helm-cr-default #[514 "\300\301;\203\302\230\204\303\"B\202H:\203G\304\301\211:\203>@\262\2040\2023\305!B\262A\262\202\211\237\266\203\"\202H\"\207" [delq nil "" delete append helm-stringify] 10 (#$ . 12872)])
#@4066 Read a string in the minibuffer, with helm completion.
It is helm `completing-read' equivalent.
- PROMPT is the prompt name to use.
- COLLECTION can be a list, vector, obarray or hash-table.
It can be also a function that receives three arguments:
the values string, predicate and t. See `all-completions' for more details.
Keys description:
- TEST: A predicate called with one arg i.e candidate.
- INITIAL-INPUT: Same as input arg in `helm'.
- PRESELECT: See preselect arg of `helm'.
- DEFAULT: This option is used only for compatibility with regular
Emacs `completing-read' (Same as DEFAULT arg of `completing-read').
- BUFFER: Name of helm-buffer.
- MUST-MATCH: Candidate selected must be one of COLLECTION.
- FUZZY: Enable fuzzy matching.
- REVERSE-HISTORY: When non--nil display history source after current
source completion.
- REQUIRES-PATTERN: Same as helm attribute, default is 0.
- HISTORY: A list containing specific history, default is nil.
When it is non--nil, all elements of HISTORY are displayed in
a special source before COLLECTION.
- INPUT-HISTORY: A symbol. the minibuffer input history will be
stored there, if nil or not provided, `minibuffer-history'
will be used instead.
- CASE-FOLD: Same as `helm-case-fold-search'.
- DEL-INPUT: Boolean, when non--nil (default) remove the partial
minibuffer input from HISTORY is present.
- PERSISTENT-ACTION: A function called with one arg i.e candidate.
- PERSISTENT-HELP: A string to document PERSISTENT-ACTION.
- MODE-LINE: A string or list to display in mode line.
Default is `helm-comp-read-mode-line'.
- KEYMAP: A keymap to use in this `helm-comp-read'.
(the keymap will be shared with history source)
- NAME: The name related to this local source.
- HEADER-NAME: A function to alter NAME, see `helm'.
- EXEC-WHEN-ONLY-ONE: Bound `helm-execute-action-at-once-if-one'
to non--nil. (possibles values are t or nil).
- VOLATILE: Use volatile attribute.
- SORT: A predicate to give to `sort' e.g `string-lessp'
Use this only on small data as it is ineficient.
If you want to sort faster add a sort function to
FC-TRANSFORMER.
Note that FUZZY when enabled is already providing a sort function.
- FC-TRANSFORMER: A `filtered-candidate-transformer' function
or a list of functions.
- HIST-FC-TRANSFORMER: A `filtered-candidate-transformer'
function for the history source.
- MARKED-CANDIDATES: If non--nil return candidate or marked candidates as a list.
- NOMARK: When non--nil don't allow marking candidates.
- ALISTP: (default is non--nil) See `helm-comp-read-get-candidates'.
- CANDIDATES-IN-BUFFER: when non--nil use a source build with
`helm-source-in-buffer' which is much faster.
Argument VOLATILE have no effect when CANDIDATES-IN-BUFFER is non--nil.
- MATCH-PART: Allow matching only one part of candidate.
See match-part documentation in `helm-source'.
- ALLOW-NEST: Allow nesting this `helm-comp-read' in a helm session.
See `helm'.
- MULTILINE: See multiline in `helm-source'.
- GROUP: See group in `helm-source'.
Any prefix args passed during `helm-comp-read' invocation will be recorded
in `helm-current-prefix-arg', otherwise if prefix args were given before
`helm-comp-read' invocation, the value of `current-prefix-arg' will be used.
That's mean you can pass prefix args before or after calling a command
that use `helm-comp-read' See `helm-M-x' for example.
(fn PROMPT COLLECTION &key TEST INITIAL-INPUT DEFAULT PRESELECT (BUFFER "*Helm Completions*") MUST-MATCH FUZZY REVERSE-HISTORY (REQUIRES-PATTERN 0) HISTORY INPUT-HISTORY (CASE-FOLD helm-comp-read-case-fold-search) (DEL-INPUT t) (PERSISTENT-ACTION nil) (PERSISTENT-HELP "DoNothing") (MODE-LINE helm-comp-read-mode-line) HELP-MESSAGE (KEYMAP helm-comp-read-map) (NAME "Helm Completions") HEADER-NAME CANDIDATES-IN-BUFFER MATCH-PART EXEC-WHEN-ONLY-ONE QUIT-WHEN-NO-CAND (VOLATILE t) SORT FC-TRANSFORMER HIST-FC-TRANSFORMER MARKED-CANDIDATES NOMARK (ALISTP t) (CANDIDATE-NUMBER-LIMIT helm-candidate-number-limit) MULTILINE ALLOW-NEST (GROUP \='helm))
(defalias 'helm-comp-read #[642 "\306\307\"A@\306\310\"A@\306\311\"A@\306\312\"A@\306\313\"\206 \314A@\306\315\"A@\306\316\"A@\306\317\"A@\306 \320\"\206@\321A@\306\n\322\"A@\306 \323\"A@\306\f\324\"\206[\325DA@\306 \326\"\206f\327A@\306\330\"A@\306\331\"\206x\332A@\306\333\"\206\205\325 DA@\306\334\"A@\306\335\"\206\231\325\nDA@\306\336\"\206\244\337A@\306\340\"A@\306\341\"A@\306\342\"A@\306\343\"A@\306\344\"A@\306\345\"\206\322\346A@\306\347\"A@\306\350\"A@\306\351\"A@\306\352\"A@\306\353\"A@\306\354\"\206\355A@\306 \356\"\206 \325 DA@\306!\357\"A@\306\"\360\"A@\306#\361\"\206&\362A@#\211\203U\211@\363>\203=\211AA\262\202*\364%>A@\203L\325\262\202*\365\366@\"\210\202*\210\367\f!\203`\370\f!\210\371\372\373\374\n\375BBFC\376=\203u\377\262\205\220\201F \201G\201H\201I#\210\211\262\211\203\243\201J\206\237@\"\202\252\206\252@%A'B\201K\201L\201MC#C\201N\201O\201P\201Q\201R,+*%\201S\"\201T$\201N\201O\201U\201Q\201R+*$$\201V\"\201T$\201W\201X\201Y\"\201Z\201[\201\\'\357\342\201]\201^\201_\2054\201`!\"\330(\331)\335\361\333.\334/\201a&\201W\201Z\201[\342\357\340\201]\201^\201`!\201b\"\320.\330+\331,\201\\6\335\361\3333\3344\201a#\3450& \201W\201c\201d\342\357\340 \201]\201^\201`!\201e\"\320/\330,\201\\5\335\361\3313\3334\3345\201a$&\201f'B\203\357\202\360BDDE\325\203\"\325\211:\203@\262\201gBB\262A\262\202\211\237\266\203\262%\203+\237\262\201h\201i\201j\"\210\201k\216\201l\201m\201n/\3110\3121\201o9\201p\201q\335\360\356\201r5\32289\205n8\313@&\262)\211\203\264#\203\264 \203\264#9\203\240#J9\204\240#J\211\203\234\211\240\210\210\202\264#:\203\256#\240\210\202\264#CL\210\211\206\274\201s .\266\211\262\207" [helm-comp-read-case-fold-search helm-comp-read-mode-line helm-comp-read-map helm-candidate-number-limit helm-action-buffer minibuffer-completion-confirm plist-member :test :initial-input :default :preselect :buffer (nil "*Helm Completions*") :must-match :fuzzy :reverse-history :requires-pattern (nil 0) :history :input-history :case-fold nil :del-input (nil t) :persistent-action :persistent-help (nil "DoNothing") :mode-line :help-message :keymap :name (nil "Helm Completions") :header-name :candidates-in-buffer :match-part :exec-when-only-one :quit-when-no-cand :volatile (nil t) :sort :fc-transformer :hist-fc-transformer :marked-candidates :nomark :alistp (nil t) :candidate-number-limit :multiline :allow-nest :group (nil helm) (:test :initial-input :default :preselect :buffer :must-match :fuzzy :reverse-history :requires-pattern :history :input-history :case-fold :del-input :persistent-action :persistent-help :mode-line :help-message :keymap :name :header-name :candidates-in-buffer :match-part :exec-when-only-one :quit-when-no-cand :volatile :sort :fc-transformer :hist-fc-transformer :marked-candidates :nomark :alistp :candidate-number-limit :multiline :allow-nest :group :allow-other-keys) :allow-other-keys error "Keyword argument %s not one of (:test :initial-input :default :preselect :buffer :must-match :fuzzy :reverse-history :requires-pattern :history :input-history :case-fold :del-input :persistent-action :persistent-help :mode-line :help-message :keymap :name :header-name :candidates-in-buffer :match-part :exec-when-only-one :quit-when-no-cand :volatile :sort :fc-transformer :hist-fc-transformer :marked-candidates :nomark :alistp :candidate-number-limit :multiline :allow-nest :group)" get-buffer kill-buffer "Sole action (Identity)" lambda (candidate) if ((helm-marked-candidates) (identity candidate)) confirm-after-completion confirm helm-map minibuffer-completion-predicate minibuffer-completion-table helm-read-file-name-mode-line-string helm-execute-action-at-once-if-one helm-quit-if-no-candidate make-sparse-keymap define-key " " helm-confirm-and-exit-minibuffer make-composed-keymap repla
(defvar helm-completion-mode-string " Helm")
(defvar helm-completion-mode-quit-message "Helm completion disabled")
(defvar helm-completion-mode-start-message "Helm completion enabled")
#@160 Specialized function for fast symbols completion in `helm-mode'.
(fn PROMPT COLLECTION TEST REQUIRE-MATCH INIT HIST DEFAULT INHERIT-INPUT-METHOD NAME BUFFER)
(defalias 'helm-completing-read-symbols #[2570 "\301\302!\210\303\304\305\306\307\310\311\312\313\314\"\315\"\316$\317\320\321\322\323\324\310\325\326\313\314!\327\"\330\331%\332\333 &\334 \335\336 \337\340\341\342\206F\343&\206M\344 \207" [helm-mode-fuzzy-match require helm-elisp helm :sources helm-make-source helm-source-in-buffer :init make-byte-code 0 "\302\303\304\305\306\307\300!\310\"\311\312%\301\242\206\301\"\207" vconcat vector [helm-apropos-init make-byte-code 257 "\300!\205\n\301!?\207" vconcat vector [keywordp] 3 "\n\n(fn X)"] 7 :filtered-candidate-transformer helm-apropos-default-sort-fn :help-message helm-comp-read-help-message :fuzzy-match :persistent-action 257 "\301\300\"\207" [helm-lisp-completion-persistent-action] 4 "\n\n(fn CANDIDATE)" :persistent-help helm-lisp-completion-persistent-help :prompt :buffer :input :history :resume noresume :default "" helm-mode--keyboard-quit] 30 (#$ . 22511)])
#@363 Call `helm-comp-read' with same args as `completing-read'.
Extra optional arg CANDS-IN-BUFFER mean use `candidates-in-buffer'
method which is faster.
It should be used when candidate list don't need to rebuild dynamically.
(fn PROMPT COLLECTION TEST REQUIRE-MATCH INIT HIST DEFAULT INHERIT-INPUT-METHOD NAME BUFFER &optional CANDS-IN-BUFFER EXEC-WHEN-ONLY-ONE)
(defalias 'helm-completing-read-default-1 #[3082 "\242\206;\203\202):\203(@ A\211\262\266\202\202)\303\211\2058\2035\211\2028\304!\262\305\306\307\310 \311 \312\313\303\314\315\316\317;\203t\320\230\203t\321=\204p\322=\203t\323\202u\324\325\326\327\n\330 \331%\206\207\320\332 & \207" [minibuffer-completing-file-name helm-mode-reverse-history helm-mode-fuzzy-match nil regexp-quote helm-comp-read :test :history :reverse-history :input-history :must-match :alistp :help-message helm-comp-read-help-message :name :requires-pattern "" confirm confirm-after-completion 1 0 :candidates-in-buffer :exec-when-only-one :fuzzy :buffer :default :initial-input] 47 (#$ . 23630)])
#@143 Specialized `helm-mode' handler for `find-tag'.
(fn PROMPT COLLECTION TEST REQUIRE-MATCH INIT HIST DEFAULT INHERIT-INPUT-METHOD NAME BUFFER)
(defalias 'helm-completing-read-default-find-tag #[2570 "\300  \301\211$\302         \303& \207" [helm-comp-read-get-candidates nil helm-completing-read-default-1 t] 23 (#$ . 24732)])
#@145 `helm-mode' handler using sync source as backend.
(fn PROMPT COLLECTION TEST REQUIRE-MATCH INIT HIST DEFAULT INHERIT-INPUT-METHOD NAME BUFFER)
(defalias 'helm-completing-read-sync-default-handler #[2570 "\300\n\n\n\n\n\n\n\n\n\n&\n\207" [helm-completing-read-default-1] 21 (#$ . 25077)])
#@150 Default `helm-mode' handler for all `completing-read'.
(fn PROMPT COLLECTION TEST REQUIRE-MATCH INIT HIST DEFAULT INHERIT-INPUT-METHOD NAME BUFFER)
(defalias 'helm-completing-read-default-handler #[2570 "\301\n\n\n\n\n\n\n\n\n\n?& \207" [helm-completing-read-dynamic-complete helm-completing-read-default-1] 22 (#$ . 25383)])
#@140 The `read-buffer-function' for `helm-mode'.
Affects `switch-to-buffer' and related.
(fn PROMPT &optional DEFAULT REQUIRE-MATCH PREDICATE)
(defalias 'helm--generic-read-buffer #[1025 "\300 \301\302\211\n&\207" [helm-buffer-list helm--completing-read-default nil] 13 (#$ . 25728)])
#@358 An helm replacement of `completing-read'.
This function should be used only as a `completing-read-function'.
Don't use it directly, use instead `helm-comp-read' in your programs.
See documentation of `completing-read' and `all-completions' for details.
(fn PROMPT COLLECTION &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF INHERIT-INPUT-METHOD)
(defalias 'helm--completing-read-default #[2050 "\3062\307 \206\n\310!\311\312\" \236\211\243\211\205\310!        \257\313D\"\314\211\f\314\211:\203d@\262:\204]\315!\204] >\204]B\262A\262\202>\211\237\266\203\314$\316!\203w\317\202x\320\321=\203\201\322\262\203\232\204\232\323\306\324\216\325\326!\210\327%\")\"\210\330=\204\254;\203\260\331\332\"\204\260\325\326!\210\333\334\335\336\337 !\340\"\341$\216\203\315\203\315\327\"\202 \203\353\322=\203\353>\342\343#\240\210\327\"\202 \203\366\327\"\202 \211&\n-\266\2110\207" [this-command helm-completing-read-handlers-alist helm-completion-mode-start-message helm-completion-mode-quit-message minibuffer-setup-hook helm-mode-minibuffer-setup-hook-black-list --cl-block-helm--completing-read-default-- helm-this-command helm-symbol-name format "*helm-mode-%s*" append nil byte-code-function-p functionp helm-completing-read-sync-default-handler helm-completing-read-default-handler ido ido-completing-read throw #[0 "\300\301!\207" [helm-mode 1] 2] helm-mode -1 apply completing-read string-match "^helm" make-byte-code 0 "\302\303!\210\300\211\207" vconcat vector [this-command helm-mode 1] 2 all-completions "" unread-command-events completing-read-function] 29 (#$ . 26023)])
#@1644 Read a file name with helm completion.
It is helm `read-file-name' emulation.
Argument PROMPT is the default prompt to use.
Keys description:
- NAME: Source name, default to "Read File Name".
- INITIAL-INPUT: Where to start read file name, default to `default-directory'.
- BUFFER: `helm-buffer' name default to "*Helm Completions*".
- TEST: A predicate called with one arg 'candidate'.
- NORET: Allow disabling helm-ff-RET (have no effect if helm-ff-RET
isn't bound to RET).
- CASE-FOLD: Same as `helm-case-fold-search'.
- PRESELECT: helm preselection.
- HISTORY: Display HISTORY in a special source.
- MUST-MATCH: Can be 'confirm, nil, or t.
- FUZZY: Enable fuzzy matching when non-nil (Enabled by default).
- MARKED-CANDIDATES: When non--nil return a list of marked candidates.
- NOMARK: When non--nil don't allow marking candidates.
- ALISTP: Don't use `all-completions' in history (take effect only on history).
- PERSISTENT-ACTION-IF: a persistent if action function.
- PERSISTENT-HELP: persistent help message.
- MODE-LINE: A mode line message, default is `helm-read-file-name-mode-line-string'.
(fn PROMPT &key (NAME "Read File Name") (INITIAL-INPUT default-directory) (BUFFER "*Helm file completions*") TEST NORET (CASE-FOLD helm-file-name-case-fold-search) PRESELECT HISTORY MUST-MATCH (FUZZY t) DEFAULT MARKED-CANDIDATES (CANDIDATE-NUMBER-LIMIT helm-ff-candidate-number-limit) NOMARK (ALISTP t) (PERSISTENT-ACTION-IF \='helm-find-files-persistent-action-if) (PERSISTENT-HELP "Hit1 Expand Candidate, Hit2 or (C-u) Find file") (MODE-LINE helm-read-file-name-mode-line-string))
(defalias 'helm-read-file-name #[385 "\306\307\"\206\310A@\306\311\"\206\312DA@\306\313\"\206\314A@\306\315\"A@\306\316\"A@\306\317\"\2067\312 DA@\306\320\"A@\306\321\"A@\306 \322\"A@C\306\n\323\"\206X\324A@\306 \325\"A@\306\f\326\"A@\306 \327\"\206s\312\nDA@\306\330\"A@\306\331\"\206\205\332A@\306\333\"\206\220\334A@\306\335\"\206\233\336A@\306\337\"\206\250\312 DA@\211\203\327\211@\340>\203\277\211AA\262\202\254\341>A@\203\316\312\262\202\254\342\343@\"\210\202\254\210\344\345!\210\346\f!\203\346\347\f!\210 \242\350=\203\363 \351\240\210\352\353\354\"\210\355\356\357\360\n\361BBFC \205\f\362\363 !?\312@ \205A\364>?B \205)\365\f\312\211$ \242CD \242\205Y\366 \367\370\371E\370\"\211\372=\203QD\204Q\373\202R\374\262#\210\211\262\211\203e\375E\"\202gEF\376\211GH\377\201J\201K #\201L\201M\201N\"\201O\201P\201Q\337\n\201R\n\201S\376\201T\333\335\201U\330\201V&\201L\201O\201P\201W\201X\201Y\337 \201Z\201[\201S\376\201R\201\\\201]\201^\201_\201`&\"\"\201a\"\201b$\201c\201d\201e\201f\333\335\201g\376\201U\201h\201i\330'\201V$& D\201j\201kI\2035\201l!\2026\201m\201n!\201o\327\201p\201q\201r\325\313$\201s\312\320$&\211\203x\211;\203x\211\201t\230\203x\201t\202\335\211\203\241\211;\203\241\201u\"\203\241 \203\241 <\203\234 @\202\326 \202\326\211\203\265\211<\203\265\201v\201n\"\202\326\211\203\315\201w!\203\315\201x\201n!!\202\326\211\203\331\201n!\206\335\201y . \266\206\207" [default-directory helm-file-name-case-fold-search helm-ff-candidate-number-limit helm-read-file-name-mode-line-string helm-action-buffer helm-ff-auto-update-initial-value plist-member :name (nil "Read File Name") :initial-input nil :buffer (nil "*Helm file completions*") :test :noret :case-fold :preselect :history :must-match :fuzzy (nil t) :default :marked-candidates :candidate-number-limit :nomark :alistp (nil t) :persistent-action-if (nil helm-find-files-persistent-action-if) :persistent-help (nil "Hit1 Expand Candidate, Hit2 or (C-u) Find file") :mode-line (:name :initial-input :buffer :test :noret :case-fold :preselect :history :must-match :fuzzy :default :marked-candidates :candidate-number-limit :nomark :alistp :persistent-action-if :persistent-help :mode-line :allow-other-keys) :allow-other-keys error "Keyword argument %s not one of (:name :initial-input :buffer :test :noret :case-fold :preselect :history :must-match :fuzzy :default :marked-candidates :candidate-number-limit :nomark :alistp :persistent-action-if :persistent-help :mode-line)" require tramp get-buffer kill-buffer confirm-after-completion confirm mapc #[257 "\300\301\"\207" [add-hook helm-after-update-hook] 4 "\n\n(fn HOOK)"] (helm-ff-move-to-first-real-candidate helm-ff-update-when-only-one-matched helm-ff-auto-expand-to-home-or-root) "Sole action (Identity)" lambda (candidate) if ((helm-marked-candidates :with-wildcard t) (identity candidate)) minibuffer-window-active-p minibuffer-window (multi1 multi3p) helm-comp-read-get-candidates make-sparse-keymap define-key " " lookup-key helm-ff-RET helm-ff-RET-must-match helm-confirm-and-exit-minibuffer make-composed-keymap t replace-regexp-in-string helm-follow-mode-persistent helm-mm-matching-method helm-ff-fuzzy-matching minibuffer-completion-confirm helm-ff--RET-disabled helm-read-file-map minibuffer-completion-predicate minibuffer-completing-file-name helm--completing-file-name helm-mode-reverse-history "helm-maybe-exit-minibuffer" "helm-confirm-and-exit-minibuffer" helm-make-source format "%s History" helm-source-sync :header-name #[257 "\211\301!P\207" [helm-find-files-doc-header substitute-command-keys] 4 "\n\n(fn NAME)"] :candidates :nohighlight :fuzzy-match :keymap :action #[257 "\211\301!P\207" [helm-find-files-doc-header substitute-command-keys] 4 "\n\n(fn NAME)"] :init #[0 "\211\211\207" [helm-ff-auto-update-initial-value helm-ff-auto-update-flag helm-ff--auto-update-state] 3] :help-message he
#@26
(fn FNAME DIR INITIAL)
(defalias 'helm-mode--default-filename #[771 "\204\262\302!\204\303!\262\204):\204)\303\206% \206%\"\262\203V:\203V\304\211:\203N@\262\303\"B\262A\262\2025\211\237\266\203\211\262\207\302!\203^\207\303\"\207" [default-directory buffer-file-name file-name-absolute-p expand-file-name nil] 9 (#$ . 34202)])
#@194 Generic helm replacement of `read-file-name'.
Don't use it directly, use instead `helm-read-file-name' in your programs.
(fn PROMPT &optional DIR DEFAULT-FILENAME MUSTMATCH INITIAL PREDICATE)
(defalias 'helm--generic-read-file-name #[1537 "\3062-\206 \206 \307 \206 \310!\211\311\n\"B\312\313\" \236\211\243\211\205-\310!\f\f\f\f\f\f\257\314D\" \315=\316\211\316\317#\262\320=\203_\321\262\203p\322!G\323V\203p\324\262\203\212\204\212\325\306\326\216\327\330!\210\3312\")\"\210\332=\204\243\321=\204\243;\203\247\333\334\"\204\247\327\330!\210\335\336\337\340\341!\342\"\343$\216\203\321\203\321\321=\204\321\324=\204\321\331\"\202\203\347\321=\203\347\344\345!\210\331\"\202\332=\203\365\331\"\202\346\347 \350\f\351\352\353\"\354\316\355\356\357&\262)\203(\211\360\230\204(\361!\202)\211+\266\2130\207" [default-directory this-command helm--file-completion-sources helm-completing-read-handlers-alist helm-completion-mode-start-message helm-completion-mode-quit-message --cl-block-helm--generic-read-file-name-- helm-this-command helm-symbol-name remove format "*helm-mode-%s*" append file-directory-p nil helm-mode--default-filename ido ido-read-file-name help-function-arglist 8 incompatible throw #[0 "\300\301!\207" [helm-mode 1] 2] helm-mode -1 apply read-file-name string-match "^helm" make-byte-code 0 " \203\301\303!\210\304\305!\210\300\211\207" vconcat vector [ido-mode this-command -1 helm-mode 1] 2 ido-mode 1 helm-read-file-name :name :buffer :default :initial-input expand-file-name :alistp :must-match :test :noret "" file-name-as-directory read-file-name-function] 36 (#$ . 34582)])
#@308 A `read-file-name' handler with history.
Can be added to `helm-completing-read-handlers-alist' for functions
that need a `read-file-name' function with directory history.
The `helm-find-files' history `helm-ff-history' is used here.
(fn PROMPT DIR DEFAULT-FILENAME MUSTMATCH INITIAL PREDICATE NAME BUFFER)
(defalias 'helm-read-file-name-handler-1 #[2056 "\306\307=\203 \310\202\f\311\211\206\n\206 \312 \313 \314 \315\f\316\317\320\f\"\321\311\322\323&,\207" [helm-split-window-default-side default-directory helm-reuse-last-window-split-state helm-split-window-inside-p helm-always-two-windows helm-ff-history t same below nil helm-read-file-name :name :history :buffer :default :initial-input expand-file-name :alistp :must-match :test] 31 (#$ . 36312)])
#@27
(fn OLD--FN &rest ARGS)
(defalias 'helm-mode--advice-lisp--local-variables #[385 "\3001\n\301\"0\207\210\302\207" [(error) apply nil] 5 (#$ . 37108)])
#@73 Default sort function for completion-in-region.
(fn CANDIDATES SOURCE)
(defalias 'helm-completion-in-region-sort-fn #[514 "\300\301\"\207" [sort helm-generic-sort-fn] 5 (#$ . 37270)])
#@12
(fn STR)
(defalias 'helm-mode--completion-in-region-initial-input #[257 "\300\301\302\303\304\305\302&\207" [propertize read-only t face helm-mode-prefix rear-nonsticky] 9 (#$ . 37462)])
(defalias 'helm-mode-delete-char-backward-1 #[0 "\3001 \301\302!0\207\303\304 !r\305\306\307\310\311!\312\"\313$\216\314@\315\"\210\316 \317\230*?\262\2031\320\321!\2026\322\323@\"\207" [(text-read-only) call-interactively delete-backward-char internal--before-with-selected-window minibuffer-window make-byte-code 0 "\301\300!\207" vconcat vector [internal--after-with-selected-window] 2 select-window norecord minibuffer-contents "" message "Trying to delete prefix completion, next hit will quit" user-error "%s"] 8 nil nil])
(put 'helm-mode-delete-char-backward-1 'helm-only t)
(defalias 'helm-mode-delete-char-backward-2 #[0 "\3011 \302\303!0\207\304\305 !r\306\307\310\311\312!\313\"\314$\216\315@\316\"\210\317 \320\230*\262?\205Dr\321!\2036\2069p\211q\210\322\323\324\325#\210)\326 \207" [helm-current-buffer (text-read-only) call-interactively delete-backward-char internal--before-with-selected-window minibuffer-window make-byte-code 0 "\301\300!\207" vconcat vector [internal--after-with-selected-window] 2 select-window norecord minibuffer-contents "" buffer-live-p run-with-timer 0.1 nil #[0 "\300\301!\207" [call-interactively delete-backward-char] 2] helm-keyboard-quit] 8 nil nil])
(byte-code "\300\301\302\303#\210\304\305\306\307\310\"\311#\207" [put helm-mode-delete-char-backward-2 helm-only t defalias helm-mode-delete-char-backward-maybe helm-make-multi-command (helm-mode-delete-char-backward-1 helm-mode-delete-char-backward-2) 1 "Delete char backward when text is not the prefix helm is completing against.\nFirst call warn user about deleting prefix completion.\nSecond call delete backward char in current-buffer and quit helm completion,\nletting user starting a new completion with a new prefix.\n\n"] 5)
#@151 Helm replacement of `completion--in-region'.
Can be used as value for `completion-in-region-function'.
(fn START END COLLECTION &optional PREDICATE)
(defalias 'helm--completion-in-region #[1027 " >\203 \n$\207\306\307\310\311#\210\312\216\313\314\"\315 \206!\f\211\316=\317!\320\321\"\322\305!\2035 \206>@\206>\322\323!?\324A\325\"\326\314 `\"  #\327  {\n\n`Z%\330!\330!A\211\203r\211\331\241\210\202s\332\262B\206\206\333\334 \"\206\206 \335\230?\205\213\334\336\337\"\340=\206\241\341 \206\241?\205\241 ?;\203\252\202e\342\322\323!\203\266\206\267\343\203\342\331\211:\203\333@\262\344\345\"\204\324B\262A\262\202\277\211\237\266\203\202\375\203\373\346\347\350\351\352\353!\354\"\355\356%\"\202\375\357\f\360B\361?\362\363\f\203$\344\364\"\204$\365\366!!P\202G\344\364\"\2030\331\202G \2039 ;\203@\365!\202G\365!P\367\370\371\372B\206UC??\205\\CC\"\373\313\374\375\376 &\211;\203{\377p\\DD$\202\265\211:\203\264\\\201F\212b\210\201GE`S\"\203\235\201H\332!\262)D\201I\201J##\266\202\202\265\331*\266\215)\207" [major-mode helm-mode-no-completion-in-region-in-modes helm--old-completion-in-region-function enable-recursive-minibuffers this-command require-match advice-add lisp--local-variables :around helm-mode--advice-lisp--local-variables #[0 "\300\301\302\"\207" [advice-remove lisp--local-variables helm-mode--advice-lisp--local-variables] 3] t buffer-substring-no-properties helm-this-command crm-complete helm-symbol-name format "*helm-mode-%s*" boundp prompt plist-get :annotation-function completion-metadata completion-all-completions last nil 0 string-suffix-p " " "" completion-metadata-get category file helm-mode--in-file-completion-p helm-comp-read "Pattern: " string-match "\\`\\.\\{1,2\\}/\\'" mapcar make-byte-code 257 "\300!\211\203\301\302\303\301\304\305##PB\202\207" vconcat vector [propertize " " display face completions-annotations] 10 "\n\n(fn S)" :name :fuzzy :nomark :marked-candidates :initial-input "/\\'" helm-mode--completion-in-region-initial-input helm-basename :buffer :fc-transformer append (helm-cr-default-transformer) :exec-when-only-one :quit-when-no-cand #[0 "\300\301\302\303#\210\304\207" [run-with-timer 0.01 nil #[0 "\300\301!\207" [message "[No matches]"] 2] t] 4] :must-match choose-completion-string minibuffer-completion-confirm completion-extra-properties helm-completion-in-region-fuzzy-match helm-completion-in-region-default-sort-fn completion-list-insert-choice-function crm-separator "," looking-back match-string mapconcat identity] 39 (#$ . 39412)])
(defalias 'helm-mode--in-file-completion-p #[0 "r\301!\203 \206p\211q\210\302\303!)\207" [helm-current-buffer buffer-live-p run-hook-with-args-until-success file-name-at-point-functions] 2])
(byte-code "\301\300!\203\n\302!\210\301\207" [completion-in-region-function boundp (lambda (#1=#:def-tmp-var) (defconst helm--old-completion-in-region-function #1#))] 2)
#@28
(fn &optional FROM-HOOK)
(defalias 'helm-mode--disable-ido-maybe #[256 "\301\300!\205?\205?\302\303\304!\305\"\211\303\304!=\204\306\304\"\210\210\302\303\307!\310\"\211\303\307!=\2041\306\307\"\210\210\311\211\203<\312\313!\207\312\314!\207" [ido-everywhere boundp advice--remove-function default-value read-file-name-function ido-read-file-name set-default read-buffer-function ido-read-buffer nil user-error "Unable to turn on Ido-everywhere while Helm-mode is enabled" "Helm-mode enabled (Ido-everywhere is incompatible with Helm-mode, disabling it)"] 5 (#$ . 42457)])
(defalias 'helm-mode--ido-everywhere-hook #[0 "\205\301\302!\207" [helm-mode helm-mode--disable-ido-maybe t] 2])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\301\313\314& \207" [custom-declare-variable helm-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Helm mode is enabled.\nSee the `helm-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `helm-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group :type boolean] 12)
#@1044 Toggle generic helm completion.
All functions in Emacs that use `completing-read'
or `read-file-name' and friends will use helm interface
when this mode is turned on.
However you can modify this behavior for functions of your choice
with `helm-completing-read-handlers-alist'.
Also commands using `completion-in-region' will be helmized when
`helm-mode-handle-completion-in-region' is non nil, you can modify
this behavior with `helm-mode-no-completion-in-region-in-modes'.
Called with a positive arg, turn on unconditionally, with a
negative arg turn off.
You can turn it on with `helm-mode'.
Some crap emacs functions may not be supported,
e.g `ffap-alternate-file' and maybe others
You can add such functions to `helm-completing-read-handlers-alist'
with a nil value.
About `ido-mode':
When you are using `helm-mode', DO NOT use `ido-mode', instead if you
want some commands use `ido', add these commands to
`helm-completing-read-handlers-alist' with `ido' as value.
Note: This mode is incompatible with Emacs23.
(fn &optional ARG)
(defalias 'helm-mode #[256 "\306 \307\300\310=\203\311\300!?\202\312!\313V\"\210\314\302!\204%\315\316\317\320\211$\210\203|\321\322!\203b\323\324\325\326B\327\320$\210\323\324\330\331B\332\320$\210\323\324\333\334B\335\320$\210 \203W\323\324\336\337B\340\320$\210\341 \210\342\343\344\"\210\202\327\332\335\314\305!\203t \203t\340\3459!\210\202\321\346!\203\332\347\311\302!\327\"\211\311\302!=\204\225\307\302\"\210\210\347\311\303!\332\"\211\311\303!=\204\251\307\303\"\210\210\347\311\304!\335\"\211\311\304!=\204\275\307\304\"\210\210\347\311\305!\340\"\211\311\305!=\204\321\307\305\"\210\210\350\343\344\"\210\202\321\351!\205\341\351\321\352!\205\351\352\321\353!\205\361\353\314\305!\203\314\354!\203,\345:!\210\355\356\311\300!\203\357\202\360\"\210\361\362!\203=\363\300!\210\306 \203+\211\306 \232\203=\364\345\365\311\300!\2038\366\2029\367#\266\210\370 \210\311\300!\207" [helm-mode helm-mode-handle-completion-in-region completing-read-function read-file-name-function read-buffer-function completion-in-region-function current-message set-default toggle default-value prefix-numeric-value 0 boundp cl--assertion-failed (boundp 'completing-read-function) "`helm-mode' not available, upgrade to Emacs-24" nil fboundp add-function advice--add-function :override #[0 "\300\301!\207" [default-value completing-read-function] 2] #[257 "\300\301\"\207" [set-default completing-read-function] 4 "\n\n(fn GV--VAL)"] helm--completing-read-default #[0 "\300\301!\207" [default-value read-file-name-function] 2] #[257 "\300\301\"\207" [set-default read-file-name-function] 4 "\n\n(fn GV--VAL)"] helm--generic-read-file-name #[0 "\300\301!\207" [default-value read-buffer-function] 2] #[257 "\300\301\"\207" [set-default read-buffer-function] 4 "\n\n(fn GV--VAL)"] helm--generic-read-buffer #[0 "\300\301!\207" [default-value completion-in-region-function] 2] #[257 "\300\301\"\207" [set-default completion-in-region-function] 4 "\n\n(fn GV--VAL)"] helm--completion-in-region helm-mode--disable-ido-maybe add-hook ido-everywhere-hook helm-mode--ido-everywhere-hook message remove-function advice--remove-function remove-hook completing-read-default read-file-name-default read-buffer helm--old-completion-in-region-function run-hooks helm-mode-hook helm-mode-on-hook helm-mode-off-hook called-interactively-p any customize-mark-as-set "" "Helm mode %sabled%s" "en" "dis" force-mode-line-update helm-completion-mode-start-message helm-completion-mode-quit-message] 7 (#$ . 43665) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)])
(defvar helm-mode-hook nil)
(byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\311\211%\210\312\306!\207" [helm-mode-map helm-mode-hook variable-documentation put "Hook run after entering or leaving `helm-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode helm-mode helm-completion-mode-string boundp nil provide] 6)