;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (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\321\326\312\307&\210\300\327\310\330#\203j\331\310\211:\203h@\262\211A\262\242\262\332!\204a\333\"\210A\262\202E\266\310\207" [require cl-lib helm helm-help eldoc edebug custom-declare-group helm-eval nil "Eval related Applications and libraries for Helm." :group custom-declare-variable helm-eldoc-in-minibuffer-show-fn funcall function #[0 "\300\207" [helm-show-info-in-mode-line] 1] "A function to display eldoc info.\nShould take one arg: the string to display." :type symbol helm-show-info-in-mode-line-delay #[0 "\300\207" [12] 1] "Eldoc will show info in mode-line during this delay if user is idle." integer elisp-mode t ((eldoc-current-symbol . elisp--current-symbol) (eldoc-fnsym-in-current-sexp . elisp--fnsym-in-current-sexp) (eldoc-get-fnsym-args-string . elisp-get-fnsym-args-string) (eldoc-get-var-docstring . elisp-get-var-docstring)) fboundp defalias] 8) (defvar helm-eldoc-active-minibuffers-list nil) (defvar helm-eval-expression-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\313#\210\303\317\315#\210\303\320\321#\210\303\322\323#\210\207" [helm-map make-sparse-keymap set-keymap-parent define-key [C-return] helm-eval-new-line-and-indent [M-tab] lisp-indent-line [C-tab] helm-lisp-completion-at-point "" previous-line "" next-line [up] [down] [right] forward-char [left] backward-char] 5)) (defalias 'helm-build-evaluation-result-source #[0 "\301\302\303\304\305\306\307\310\311\312\305\313\314\315&\207" [helm-eval-expression-map helm-make-source "Evaluation Result" helm-source-dummy :multiline t :mode-line "C-RET: nl-and-indent, M-tab: reindent, C-tab:complete, C-p/n: next/prec-line." :filtered-candidate-transformer #[514 "\3031,r\304!\203\206p\211q\210\305 \203!\306\307\n!!\202&\310\307\n!!!)0\202.\210\311C\207" [helm-current-buffer edebug-active helm-pattern (error) buffer-live-p pp-to-string edebug-eval-expression read eval "Error"] 6 "\n\n(fn CANDIDATES SOURCE)"] :nohighlight :keymap :action (("Copy result to kill-ring" lambda (candidate) (kill-new (replace-regexp-in-string "\n" "" candidate)) (message "Result copied to kill-ring")) ("copy sexp to kill-ring" lambda (_candidate) (kill-new helm-input) (message "Sexp copied to kill-ring")))] 15]) (defalias 'helm-eval-new-line-and-indent #[0 "\300 \210\301 \207" [newline lisp-indent-line] 1 nil nil]) #@71 Store minibuffer buffer name in `helm-eldoc-active-minibuffers-list'. (defalias 'helm-eldoc-store-minibuffer #[0 "\301\302 !r\303\304\"\216\305@\306\"\210pB\211*\207" [helm-eldoc-active-minibuffers-list internal--before-with-selected-window minibuffer-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord] 4 (#$ . 2680)]) #@57 Return eldoc in mode-line for current minibuffer input. (defalias 'helm-eldoc-show-in-eval #[0 "\302\303 !\3041<\211\235\205:r\211q\210\212\305\306`S\"\204\307u\210\310 )\311 \312!\2060\313@A@\"\211\2057 !\266\203)0\207\314\315\"\210\316\207" [helm-eldoc-active-minibuffers-list helm-eldoc-in-minibuffer-show-fn window-buffer active-minibuffer-window (error) looking-back ")\\|\"" -1 eldoc-current-symbol eldoc-fnsym-in-current-sexp eldoc-get-var-docstring eldoc-get-fnsym-args-string message "Eldoc in minibuffer error: %S" nil] 6 (#$ . 3067)]) #@44 Display string STR in mode-line. (fn STR) (defalias 'helm-show-info-in-mode-line #[257 "\303 r\304\305\"\216rq\210\306P\307 \210\310\n!\210)\307 +\207" [helm-buffer mode-line-format helm-show-info-in-mode-line-delay internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] " " force-mode-line-update sit-for] 5 (#$ . 3631)]) (defvar helm-source-calculation-result (helm-make-source "Calculation Result" 'helm-source-dummy :filtered-candidate-transformer #[514 "\3011\302!\211<\203\303\304@A@#\202\211\2620\202\"\211A\262C\207" [helm-pattern (error) calc-eval error "At pos %s: %s"] 7 "\n\n(fn CANDIDATES SOURCE)"] :nohighlight t :action '(("Copy result to kill-ring" lambda (candidate) (kill-new candidate) (message "Result \"%s\" copied to kill-ring" candidate)) ("Copy operation to kill-ring" lambda (_candidate) (kill-new helm-input) (message "Calculation copied to kill-ring"))))) #@69 Preconfigured `helm' for `helm-source-evaluation-result'. (fn ARG) (defalias 'helm-eval-expression #[257 "\300\301\302 \303\205\f\304\305!\306\307\310\311\312\313&\n\207" [helm :sources helm-build-evaluation-result-source :input thing-at-point sexp :buffer "*helm eval*" :echo-input-in-header-line nil :history read-expression-history] 12 (#$ . 4598) "P"]) #@80 Preconfigured `helm' for `helm-source-evaluation-result' with `eldoc' support. (defalias 'helm-eval-expression-with-eldoc #[0 "\301\302\303#\304\305\"\216\306\307\310!\211\304\311#M\210\304\312\"\216\313\314\"\210\315\316!)\266\202)\207" [eldoc-idle-delay run-with-idle-timer repeat helm-eldoc-show-in-eval make-closure #[0 "\300\203\302\300!\210 A\211\207" [V0 helm-eldoc-active-minibuffers-list cancel-timer] 2] helm-eldoc-store-minibuffer make-symbol "minibuffer-setup" #[0 "\302\303\301\"\210\300 \207" [V0 V1 remove-hook minibuffer-setup-hook] 3] #[0 "\301\302\300\"\207" [V0 remove-hook minibuffer-setup-hook] 3] add-hook minibuffer-setup-hook call-interactively helm-eval-expression] 8 (#$ . 4964) nil]) #@60 Preconfigured `helm' for `helm-source-calculation-result'. (defalias 'helm-calcul-expression #[0 "\300\301\302\303\304$\207" [helm :sources helm-source-calculation-result :buffer "*helm calcul*"] 5 (#$ . 5690) nil]) (provide 'helm-eval)