Files
emacsd/elpa/helm-20191201.633/helm-command.elc

87 lines
11 KiB
Plaintext
Raw Normal View History

2019-10-09 20:36:55 +02:00
;ELC
;;; Compiled
2019-10-27 19:05:34 +01:00
;;; in Emacs version 26.3
2019-10-09 20:36:55 +02:00
;;; 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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2019-12-01 19:55:19 +01:00
(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312\302%\210\313\314\315\316\317DD\320\312\307\321\322&\210\313\323\315\316\324DD\325\312\307\321\322&\210\313\326\315\316\327DD\330\312\307\321\322&\210\313\331\315\316\332DD\333\312\307\321\322&\210\313\334\315\316\335DD\336\312\307\321\322&\210\313\337\315\316\340DD\341\312\307\321\316&\210\306\342\310\343\344\345\312\307\312\346& \210\347\350\351\352\312\342%\207" [require cl-lib helm helm-help helm-mode helm-elisp custom-declare-group helm-command nil "Emacs command related Applications and libraries for Helm." :group custom-declare-variable helm-M-x-requires-pattern funcall function #[0 "\300\207" [0] 1] "Value of requires-pattern for `helm-M-x'.\nShow all candidates on startup when 0 (default)." :type boolean helm-M-x-always-save-history #[0 "\300\207" [nil] 1] "`helm-M-x' Save command in `extended-command-history' even when it fail." helm-M-x-reverse-history #[0 "\300\207" [nil] 1] "The history source of `helm-M-x' appear in second position when non--nil." helm-M-x-fuzzy-match #[0 "\300\207" [nil] 1] "Enable fuzzy matching in `helm-M-x' when non--nil.\n\nThis have no effect when `helm-M-x-use-completion-styles' is non nil" helm-M-x-use-completion-styles #[0 "\300\207" [t] 1] "Use `completion-styles' in helm-M-x." helm-M-x-default-sort-fn #[0 "\300\207" [helm-M-x-fuzzy-sort-candidates] 1] "Default sort function for `helm-M-x' with fuzzy matching.\n\nIt should sort against REAL value of candidates." helm-command-faces "Customize the appearance of helm-command." :prefix "helm-" helm-faces custom-declare-face helm-M-x-key ((t (:foreground "orange" :underline t))) "Face used in helm-M-x to show keybinding."] 10)
2019-10-09 20:36:55 +02:00
(defvar helm-M-x-input-history nil)
#@44 Prefix argument before calling `helm-M-x'.
2019-12-01 19:55:19 +01:00
(defvar helm-M-x-prefix-argument nil (#$ . 2187))
2019-10-09 20:36:55 +02:00
#@42 Return alist of MODE-MAP.
(fn MODE-MAP)
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x-get-major-mode-command-alist #[257 "\211\205$\300C\300C\300C\301\302\303\304\305\306#\307\"\310\311%\"\210\211\242\237\266\203\207" [nil cl--map-keymap-recursively make-byte-code 514 "\300\303!\240\210\301\304\305\300\242\"\240\210\301\242?\205\302\300\242B\302\242B\240\207" vconcat vector [key-description string-match "<menu-bar>"] 6 "\n\n(fn KEY COM)"] 13 (#$ . 2286)])
2019-10-09 20:36:55 +02:00
#@204 Guess the mode-map name according to MODE.
Some modes don't use conventional mode-map name
so we need to guess mode-map name. e.g python-mode ==> py-mode-map.
Return nil if no mode-map found.
(fn MODE)
2019-12-01 19:55:19 +01:00
(defalias 'helm-get-mode-map-from-mode #[257 "\301\302\303\"!\304!\305\306\307#\211G\310\311\310\204C\312=\203(\310\262\310\211\262\202)\311\203C\312O\262\301\302\303\306P\"!\262S\262\202\203K\202L\211)\207" [mode-name intern-soft format "%s-map" symbol-name replace-regexp-in-string "-mode" "" nil t 0] 13 (#$ . 2740)])
2019-10-09 20:36:55 +02:00
#@48 Return mode-map alist of current `major-mode'.
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x-current-mode-map-alist #[0 "\301!\211\205\302!\205\303J!\207" [major-mode helm-get-mode-map-from-mode boundp helm-M-x-get-major-mode-command-alist] 3 (#$ . 3295)])
2019-10-09 20:36:55 +02:00
#@361 Transformer function to show bindings in emacs commands.
Show global bindings and local bindings according to current `major-mode'.
If SORT is non nil sort list with `helm-generic-sort-fn'.
Note that SORT should not be used when fuzzy matching because
fuzzy matching is running its own sort function with a different algorithm.
(fn CANDIDATES &optional SORT)
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x-transformer-1 #[513 "r\301!\203 \206p\211q\210\302 \303\211\211\211:\203\200@\262\304\"@\262\305\306\307\"!\262\310:\203<@\202=!\311N\204y\211\312\313\"\203]\203]\306\314\315\316\317##\202s\312\313\"\203h\202s\306\314\315\316\317##BC\244\262A\262\202\203\214\320\321\"\202\215\211\266\206)\207" [helm-current-buffer buffer-live-p helm-M-x-current-mode-map-alist nil rassq substitute-command-keys format "\\[%s]" intern helm-only string-match "^M-x" "%s (%s)" propertize face helm-M-x-key sort helm-generic-sort-fn] 16 (#$ . 3540)])
2019-10-09 20:36:55 +02:00
#@73 Transformer function for `helm-M-x' candidates.
(fn CANDIDATES SOURCE)
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x-transformer #[514 "\301?\"\207" [helm--in-fuzzy helm-M-x-transformer-1] 5 (#$ . 4510)])
2019-10-09 20:36:55 +02:00
#@73 Transformer function for `helm-M-x' candidates.
(fn CANDIDATES SOURCE)
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x-transformer-no-sort #[514 "\300!\207" [helm-M-x-transformer-1] 4 (#$ . 4698)])
2019-10-09 20:36:55 +02:00
(defalias 'helm-M-x--notify-prefix-arg #[0 "\205#\301\302 !r\303\304\305\306\307!\310\"\311$\216\312@\313\"\210\314\315 \316\"*\262\207" [prefix-arg internal--before-with-selected-window helm-window make-byte-code 0 "\301\300!\207" vconcat vector [internal--after-with-selected-window] 2 select-window norecord helm-display-mode-line helm-get-current-source force] 7])
(defalias 'helm-cmd--get-current-function-name #[0 "\212\300 \210\301\302\303 \304 \"!A@)\207" [beginning-of-defun split-string buffer-substring-no-properties point-at-bol point-at-eol] 4])
#@22
(fn &optional DIR)
2019-12-01 19:55:19 +01:00
(defalias 'helm-cmd--get-preconfigured-commands #[256 "\211\206 \300\301\302!!\303\304\"\305\306!\203A\307\310!r\211q\210\311\312\313\314\315!\316\"\317$\216\320!\210\321\322\305\323#\203?\324 \325\305OB\262\202+*\210\207" [helm-basedir locate-library "helm" expand-file-name "helm-autoloads.el" nil file-exists-p generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents re-search-forward "Preconfigured" t helm-cmd--get-current-function-name 1] 11 (#$ . 5440)])
2019-10-09 20:36:55 +02:00
(defvar helm-M-x-map (byte-code "\301 \302\"\210\303\304\305#\210\303\304\306#\210\211\207" [helm-comp-read-map make-sparse-keymap set-keymap-parent define-key "" nil helm-M-x-universal-argument] 5))
#@50 Same as `universal-argument' but for `helm-M-x'.
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x-universal-argument #[0 "\2032\303\304\305\306 !r\307\310\311\312\313!\314\"\315$\216\316@\317\"\210\212eb\210\320\321 \322GZ!\210+\210)\323\324!\207\325C\326 \207" [helm-M-x-prefix-argument inhibit-read-only prefix-arg nil t 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 delete-char minibuffer-prompt-width "M-x " message "Initial prefix arg disabled" 4 universal-argument--mode] 7 (#$ . 6230) nil])
2019-10-09 20:36:55 +02:00
(put 'helm-M-x-universal-argument 'helm-only t)
#@26
(fn CANDIDATES SOURCE)
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x-fuzzy-sort-candidates #[514 "\300\301\"\207" [helm-fuzzy-matching-default-sort-fn-1 t] 5 (#$ . 6882)])
#@18
(fn CANDIDATE)
(defalias 'helm-M-x-persistent-action #[257 "\300\301\"\207" [helm-elisp--persistent-help helm-describe-function] 4 (#$ . 7037)])
2019-10-09 20:36:55 +02:00
#@246 Read command name to invoke in `helm-M-x'.
Helm completion is not provided when executing or defining
kbd macros.
Optional arg COLLECTION is to allow using another COLLECTION
than the default which is OBARRAY.
2019-12-01 19:55:19 +01:00
(fn COLLECTION &optional HISTORY)
(defalias 'helm-M-x-read-extended-command #[513 "\204 \203\n\203\306\216\302\307!\210\310 )\207\310 \207 \311\312\313\314\315#\316@B@A\317\211:\203U@\262\203N\320\321!!\203N\322\323G\317$\210B\262A\262\202,\211\237\266\203A\311BC\205\261\324\325\326\327\330\206oA\320\317\211\311%\331\311\332D\333\311\334\335\336\337\340\341\342\311\343\344\345E\346\347&\324\350\326\327\330\320\317\211\311%\331\311\332D\333\311\346\351\334\335\336\337\340\341\342\311\343\344\345E&DF\352=\203\274\353\202\357F:\203\316F@\354=\203\316\355\202\357F:\203\344F@\250\203\344\356\357F@\"\202\357F\250\205\357\356\357F\"\360PG\211\203H\203\211\237\262\361\323\362\363\364!\365\"\366$\216\317I\211\203#\367\370\371G\372\373\374\375&\202v\376G\206,J\377\320\332D\201L\350\372\373\334\201M\336\337\374\206EA\201NH\201O\375\201P\317\340\341\343\344\345E\333\311\201Q\201R\201SK\342\311\201T\311\201U\351\201V\347&*.\207" [defining-kbd-macro executing-kbd-macro helm-mode helm-M-x-default-sort-fn helm-fuzzy-sort-fn helm--mode-line-display-prefarg #[0 "\300\301!\207" [helm-mode 1] 2] -1 read-extended-command t run-at-time 1 0.1 helm-M-x--notify-prefix-arg #[0 "\301\211\207" [current-prefix-arg nil] 2] nil commandp intern set-text-properties 0 helm-make-source "Emacs Commands history" helm-source-sync :candidates helm-dynamic-completion :match-dynamic :requires-pattern :must-match :persistent-action helm-M-x-persistent-action :persistent-help "Describe this command" :help-message helm-M-x-help-message :nomark :group helm-command :keymap :filtered-candidate-transformer helm-M-x-transformer-no-sort "Emacs Commands" helm-M-x-transformer - "- " 4 "C-u " format "%d " "M-x " make-byte-code "\302\300!\210\303\211\207" vconcat vector [helm--mode-line-display-prefarg cancel-timer nil] 2 helm :sources :prompt :buffer "*helm M-x*" :history helm-M-x-input-history helm-comp-read :test helm-move-selection-after-hook extended-command-history minibuffer-completion-confirm helm-M-x-use-completion-styles helm-M-x-requires-pattern helm-M-x-map helm-M-x-prefix-argument prompt helm-M-x-reverse-history current-prefix-arg obarray helm-M-x-fuzzy-match :name #[257 "\300\301\"\207" [helm-elisp--persistent-help helm-describe-function] 4 "\n\n(fn CANDIDATE)"] :reverse-history :input-history :del-input :match-part #[257 "\300!@\207" [split-string] 3 "\n\n(fn C)"] :fuzzy :candidates-in-buffer :fc-transformer :hist-fc-transformer] 47 (#$ . 7192)])
2019-10-09 20:36:55 +02:00
#@458 Preconfigured `helm' for Emacs commands.
It is `helm' replacement of regular `M-x' `execute-extended-command'.
Unlike regular `M-x' emacs vanilla `execute-extended-command' command,
the prefix args if needed, can be passed AFTER starting `helm-M-x'.
When a prefix arg is passed BEFORE starting `helm-M-x', the first `C-u'
while in `helm-M-x' session will disable it.
You can get help on each command by persistent action.
(fn ARG &optional COMMAND-NAME)
2019-12-01 19:55:19 +01:00
(defalias 'helm-M-x #[513 "\211;\205H\211\306\230?\205H\211;\205\307!\211\205F\211\211\n\206! \310\31113\312\313\"\210\211!0\202C \203;!\210\314@A\"\262\262)\262\207" [this-command real-this-command helm-current-prefix-arg helm-M-x-prefix-argument prefix-arg helm-M-x-always-save-history "" intern-soft #[257 "\211\301\"B\211\207" [extended-command-history delete] 5 "\n\n(fn COMMAND)"] (debug error) command-execute record signal] 8 (#$ . 9966) (byte-code "\303\n!D\207" [current-prefix-arg helm-M-x-prefix-argument obarray helm-M-x-read-extended-command] 3)])
2019-10-09 20:36:55 +02:00
(byte-code "\300\301\302\303#\210\304\305!\207" [put helm-M-x interactive-only command-execute provide helm-command] 4)