;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\302%\210\311\312\313\314\315DD\316\317\320\310\305&\210\311\321\313\314\322DD\323\310\305\317\324&\207" [require cl-lib helm helm-help custom-declare-group helm-font nil "Related applications to display fonts in Helm." :group custom-declare-variable helm-ucs-recent-size funcall function #[0 "\300\207" [10] 1] "Number of recent chars to keep." :type integer helm-ucs-actions #[0 "\300\207" [(("Insert character" . helm-ucs-insert-char) ("Insert character name" . helm-ucs-insert-name) ("Insert character code in hex" . helm-ucs-insert-code) ("Kill marked characters" . helm-ucs-kill-char) ("Kill name" . helm-ucs-kill-name) ("Kill code" . helm-ucs-kill-code) ("Describe char" . helm-ucs-describe-char))] 1] "Actions for `helm-source-ucs'." (alist :key-type string :value-type function)] 8) #@24 Keymap for `helm-ucs'. (defvar helm-ucs-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\207" [helm-map make-sparse-keymap set-keymap-parent define-key [C-backspace] helm-ucs-persistent-delete [C-left] helm-ucs-persistent-backward [C-right] helm-ucs-persistent-forward " " helm-ucs-persistent-insert-space] 5) (#$ . 952)) (byte-code "\301\302\303\304\305Y\205 \306\307\"BC\310\311\312%\207" [emacs-major-version custom-declare-face helm-ucs-char ((class color) (background dark)) append 27 (:extend t) (:foreground "Gold") "Face used to display ucs characters." :group helm-font] 6) (defvar helm-xfonts-cache nil) (defvar helm-previous-font nil) (defvar helm-source-xfonts (helm-make-source "X Fonts" 'helm-source-sync :init #[0 "\204\302\303!\304\305 \236A\211\207" [helm-xfonts-cache helm-previous-font x-list-fonts "*" font frame-parameters] 2] :candidates 'helm-xfonts-cache :action '(("Copy font to kill ring" lambda (elm) (kill-new elm)) ("Set font" lambda (elm) (kill-new elm) (set-frame-font elm 'keep-size) (message "Font copied to kill ring"))) :cleanup #[0 "\301\302\"\207" [helm-previous-font set-frame-font keep-size] 3] :persistent-action #[257 "\300\301\"\210\302!\207" [set-frame-font keep-size kill-new] 4 "\n\n(fn NEW-FONT)"] :persistent-help "Preview font and copy to kill-ring")) (defvar helm-ucs--max-len nil) (defvar helm-ucs--names nil) (defvar helm-ucs-history nil) #@39 Ring of recent `helm-ucs' selections. (defvar helm-ucs-recent nil (#$ . 2416)) #@71 Calculate the length of the longest NAMES list candidate. (fn NAMES) (defalias 'helm-calculate-ucs-alist-max-len #[257 "\211\300\211\211\211:\203H@\262\211A\262\242\262\301\302\"G\203%]\202&\211\262\210\303\304\301\305\"!]\203>]\266\202\202A\211\266\202A\262\202B\207" [nil format "#x%x:" 1 string-width "%c"] 11 (#$ . 2501)]) #@77 Calculate the length of the longest NAMES hash table candidate. (fn NAMES) (defalias 'helm-calculate-ucs-hash-table-max-len #[257 "\300C\300C\301\302\303#\"\210\242\242B\207" [nil maphash make-closure #[514 "\302\303\"G\300\211\242\203\300\242]\202\240\266\304\305\302\306\"!]\301\211\242\203+\301\242]\202,\240\207" [V0 V1 format "#x%x:" 1 string-width "%c"] 7 "\n\n(fn N V)"]] 8 (#$ . 2862)]) #@60 Calculate the length of the longest `ucs-names' candidate. (defalias 'helm-calculate-ucs-max-len #[0 "\300 \301!\203\f\302!\207\303!\207" [ucs-names hash-table-p helm-calculate-ucs-hash-table-max-len helm-calculate-ucs-alist-max-len] 3 (#$ . 3282)]) #@54 Collect ucs symbols from the NAMES list. (fn NAMES) (defalias 'helm-ucs-collect-symbols-alist #[257 "\301\302\303G#\304\211\305\304\211\211\211\211\211\211\n:\203\224\n@\262\n \211A\262 \242\262 \306\307 \"\262G\262@Z\262\306\310 \"\262\311\306\312\f\"\313\314#\262\315\230\204\204\316\317\320 !!!\203\204\321\322\"\323\f\260B\262 \304\247\203}@Y\205\202\324#\266\nA\262 T\262\304\262\202\237\207" [helm-ucs--max-len make-progress-reporter "collecting ucs names" 0 nil 1 format "#x%x:" "(#x%x): " propertize "%c" face helm-ucs-char "" fontp char-displayable-p read make-string 32 " " progress-reporter-do-update] 20 (#$ . 3542)]) #@60 Collect ucs symbols from the NAMES hash-table. (fn NAMES) (defalias 'helm-ucs-collect-symbols-hash-table #[257 "\300\301\302\303!#\304C\305C\305C\305C\305C\305C\305C\305\306\307\310         &\n \"\210\242\237\207" [make-progress-reporter "collecting ucs names" 0 hash-table-count 1 nil maphash make-closure #[514 "\302\311\312\"\240\210\303\302\242G\240\210\304@\303\242Z\240\210\305\311\313\"\240\210\306\314\311\315\"\316\317#\240\210\320\230\204d\321\322\323\302\242!!!\203d\307\305\242\324\304\242\325\"\306\242\326\260\307\242B\240\210\300\301\242\327\247\203]@Y\205b\330#\266\301\211\242T\240\210\327\207" [V0 V1 V2 V3 V4 V5 V6 V7 V8 format "#x%x:" "(#x%x): " propertize "%c" face helm-ucs-char "" fontp char-displayable-p read make-string 32 " " nil progress-reporter-do-update helm-ucs--max-len] 9 "\n\n(fn N V)"]] 22 (#$ . 4232)]) #@153 Collect ucs symbols from UCS-STRUCT. Depending on the Emacs version, the variable `ucs-names' can either be an alist or a hash-table. (fn UCS-STRUCT) (defalias 'helm-ucs-collect-symbols #[257 "\300!\203\n\301!\207\302!\207" [hash-table-p helm-ucs-collect-symbols-hash-table helm-ucs-collect-symbols-alist] 3 (#$ . 5113)]) #@78 Initialize a Helm buffer with ucs symbols. Only math* symbols are collected. (defalias 'helm-ucs-init #[0 "\204\302  \206\303\304 !\211\207" [helm-ucs--max-len helm-ucs--names helm-calculate-ucs-max-len helm-ucs-collect-symbols ucs-names] 2 (#$ . 5447)]) #@124 Return the N part of an ucs CANDIDATE. Where N=1 is the ucs code, N=2 the ucs char and N=3 the ucs name. (fn CANDIDATE N) (defalias 'helm-ucs-match #[514 "\300\301\"\205 \302\"\207" [string-match "^(\\(#x[a-f0-9]+\\)): *\\(.\\) *\\([^:]+\\)+" match-string] 5 (#$ . 5716)]) #@18 (fn CANDIDATE) (defalias 'helm-ucs-save-recentest #[257 "\211\302\"B\211G V\203\303\304\"\202\211\211\207" [helm-ucs-recent helm-ucs-recent-size delete nbutlast 1] 5 (#$ . 6000)]) #@51 Insert the N part of CANDIDATE. (fn CANDIDATE N) (defalias 'helm-ucs-insert #[514 "r\301!\203 \206p\211q\210\302!\210\303\"c)\207" [helm-current-buffer buffer-live-p helm-ucs-save-recentest helm-ucs-match] 5 (#$ . 6196)]) #@61 Insert ucs char part of CANDIDATE at point. (fn CANDIDATE) (defalias 'helm-ucs-insert-char #[257 "\300\301\"\207" [helm-ucs-insert 2] 4 (#$ . 6434)]) #@61 Insert ucs code part of CANDIDATE at point. (fn CANDIDATE) (defalias 'helm-ucs-insert-code #[257 "\300\301\"\207" [helm-ucs-insert 1] 4 (#$ . 6592)]) #@61 Insert ucs name part of CANDIDATE at point. (fn CANDIDATE) (defalias 'helm-ucs-insert-name #[257 "\300\301\"\207" [helm-ucs-insert 3] 4 (#$ . 6750)]) #@59 Action that concatenate ucs marked chars. (fn CANDIDATE) (defalias 'helm-ucs-kill-char #[257 "\300 \211\301:\203@\262\302!\210A\262\202\266\303\304\305\306#!\207" [helm-marked-candidates nil helm-ucs-save-recentest kill-new mapconcat #[257 "\300\301\"\207" [helm-ucs-match 2] 4 "\n\n(fn X)"] ""] 7 (#$ . 6908)]) #@18 (fn CANDIDATE) (defalias 'helm-ucs-kill-code #[257 "\300!\210\301\302\303\"!\207" [helm-ucs-save-recentest kill-new helm-ucs-match 1] 5 (#$ . 7240)]) #@18 (fn CANDIDATE) (defalias 'helm-ucs-kill-name #[257 "\300!\210\301\302\303\"!\207" [helm-ucs-save-recentest kill-new helm-ucs-match 3] 5 (#$ . 7400)]) #@42 Describe char CANDIDATE. (fn CANDIDATE) (defalias 'helm-ucs-describe-char #[257 "\300\301\302\"r\211q\210\303\304\"\216\305\306\"c\210\307e!*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] helm-ucs-match 2 describe-char] 5 (#$ . 7560)]) #@18 (fn CANDIDATE) (defalias 'helm-ucs-forward-char #[257 "r\301!\203 \206p\211q\210\302u)\207" [helm-current-buffer buffer-live-p 1] 3 (#$ . 7877)]) #@18 (fn CANDIDATE) (defalias 'helm-ucs-backward-char #[257 "r\301!\203 \206p\211q\210\302u)\207" [helm-current-buffer buffer-live-p -1] 3 (#$ . 8037)]) #@18 (fn CANDIDATE) (defalias 'helm-ucs-delete-backward #[257 "r\301!\203 \206p\211q\210\302\303!)\207" [helm-current-buffer buffer-live-p delete-char -1] 3 (#$ . 8199)]) #@18 (fn CANDIDATE) (defalias 'helm-ucs-insert-space #[257 "r\301!\203 \206p\211q\210\302c)\207" [helm-current-buffer buffer-live-p " "] 3 (#$ . 8379)]) (defalias 'helm-ucs-persistent-forward #[0 "\203 \301\302\303\"\210\304\302!\207\305\306!\207" [helm-alive-p helm-set-attr action-forward helm-ucs-forward-char helm-execute-persistent-action error "Running helm command outside of context"] 3 nil nil]) (put 'helm-ucs-persistent-forward 'helm-only t) (defalias 'helm-ucs-persistent-backward #[0 "\203 \301\302\303\"\210\304\302!\207\305\306!\207" [helm-alive-p helm-set-attr action-back helm-ucs-backward-char helm-execute-persistent-action error "Running helm command outside of context"] 3 nil nil]) (put 'helm-ucs-persistent-backward 'helm-only t) (defalias 'helm-ucs-persistent-delete #[0 "\203 \301\302\303\"\210\304\302!\207\305\306!\207" [helm-alive-p helm-set-attr action-delete helm-ucs-delete-backward helm-execute-persistent-action error "Running helm command outside of context"] 3 nil nil]) (put 'helm-ucs-persistent-delete 'helm-only t) (defalias 'helm-ucs-persistent-insert-space #[0 "\203 \301\302\303\"\210\304\302!\207\305\306!\207" [helm-alive-p helm-set-attr action-insert-space helm-ucs-insert-space helm-execute-persistent-action error "Running helm command outside of context"] 3 nil nil]) (defvar helm-source-ucs-recent (helm-make-source "Recent UCS" 'helm-source-sync :action 'helm-ucs-actions :candidates #[0 "\207" [helm-ucs-recent] 1] :help-message helm-ucs-help-message :keymap helm-ucs-map :volatile t)) #@49 Source for collecting `ucs-names' math symbols. (defvar helm-source-ucs (helm-make-source "UCS names" 'helm-source-in-buffer :data 'helm-ucs-init :get-line 'buffer-substring :help-message 'helm-ucs-help-message :filtered-candidate-transformer #[514 "\300\301\"\207" [sort helm-generic-sort-fn] 5 "\n\n(fn CANDIDATES SOURCE)"] :action 'helm-ucs-actions :persistent-action #[257 "\300!\210\301 \207" [helm-ucs-insert-char helm-force-update] 3 "\n\n(fn CANDIDATE)"] :keymap helm-ucs-map) (#$ . 9933)) #@39 Preconfigured `helm' to select Xfont. (defalias 'helm-select-xfont #[0 "\300\301\302\303\304$\207" [helm :sources helm-source-xfonts :buffer "*helm select xfont*"] 5 (#$ . 10439) nil]) #@98 Preconfigured `helm' for `ucs-names'. Called with a prefix arg force reloading cache. (fn ARG) (defalias 'helm-ucs #[257 "\211\203\n\305\211\305\305f\211\205\306!\262\307\310 \fD\311\312\313\205+\314!\205+\315\316&\207" [helm-ucs--names helm-ucs--max-len ucs-names helm-source-ucs-recent helm-source-ucs nil string helm :sources :history helm-ucs-history :input multibyte-string-p :buffer "*helm ucs*"] 12 (#$ . 10630) "P"]) (provide 'helm-font)