;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require tablist dash magit-popup cl-lib] 2) #@19 (fn SYMBOL STR) (defalias 'tblui--append-str-to-symbol #[514 "\300\301!P!\207" [intern symbol-name] 5 (#$ . 198)]) #@62 (fn FN &optional ARG SHOW-PROGRESS DISTINGUISH-ONE-MARKED) (defalias 'tblui--tablist-map-over-marks #[1025 "\203+\250\203+\300C\301\302\303$\"\210\304W\203$\211\242\237\202&\211\242\262\202\233\203=\305 \210m?\205\233 C\202\233\306\307 \300\211\211\212eb\210!\205O\310 \262??\262\203\205b\210\203f\311\304!\210 B\262b\210\312y\210\300\211\223\210!\205\200\310 \262\202V)\203\226G\312U\203\226\313B\262\266\204\262\314 \210\207" [nil tablist-repeat-over-lines make-closure #[0 "\301\203\303\304!\210\302\300 \302\242B\240\207" [V0 V1 V2 sit-for 0] 3] 0 tablist-skip-invisible-entries #[257 "\300\301 \210\302\300\303#\211\262\203\304`!\203\305 \210\202\207" [nil tablist-skip-invisible-entries re-search-forward t invisible-p tablist-forward-entry] 6 "\n\n(fn RE)"] tablist-marker-regexp point-marker sit-for 1 t tablist-move-to-major-column] 12 (#$ . 323)]) #@74 Return marked or ARG entries. (fn &optional ARG DISTINGUISH-ONE-MARKED) (defalias 'tblui--tablist-get-marked-items #[512 "\212\300\301\302$)\203\211@\303=\203\207\211\237\207" [tblui--tablist-map-over-marks #[0 "\300\301\206`\302\"\262\300\301\206`\303\"\262B\207" [nil get-text-property tabulated-list-id tabulated-list-entry] 5] nil t] 7 (#$ . 1251)]) #@63 Select current row is selection is empty. (fn &optional ARG) (defalias 'tblui--select-if-empty #[256 "\300 ?\205\301 \207" [tblui--tablist-get-marked-items tablist-put-mark] 2 (#$ . 1627)]) #@1430 Define tabulated list UI easily. Hereafter referred as tblui. This macro defines functions and popups for the defined tblui. User of this macro can focus on writing the logic for ui, let this package handle the tabulated list buffer interaction part. Each arguments are explained as follows: * `TBLUI-NAME` : the symbol name of defining tblui. It will be used as prefix for functions defined via this macro. * `ENTRIES-PROVIDER` : the function which provides tabulated-list-entries * `TABLE-LAYOUT` : the `tabulated-list-format` to be used for the tblui. * `POPUP-DEFINITIONS` : list of popup definition. A popup definition is an plist of `(:key KEY :name NAME :funcs FUNCTIONS)`. KEY is the key to be bound for the defined magit-popup. NAME is the name for defined magit-popup. FUNCTIONS is the list of action definition. Action definition is a list of 3 elements, which is `(ACTIONKEY DESCRIPTION FUNCTION)`. ACTIONKEY is the key to be used as action key in the magit-popup. DESCRIPTION is the description of the action. FUNCTION is the logic to be called for this UI. It is the elisp function which receives the IDs of tabulated-list entry, and do what ever operation. With this macro `TBLUI-NAME-goto-ui` function is defined. Calling this function will popup and switch to the tblui buffer. (fn TBLUI-NAME ENTRIES-PROVIDER TABLE-LAYOUT POPUP-DEFINITIONS) (defalias 'tblui-define '(macro . #[1028 "\300\301\"\302\303!\302Q\300\304\"\300\305\"\300\306\"\307\310\311\312\"\313\314\307\315 \"\"\"\307\316\"\317\320\321\322\323CEF\314\307\324\"\307\325\326# \"\327 \330\331\332\314\307\325\333\"\"\322\334E\335\336\337\340D\341BBB\342BBB\"BBBBB\320 \321\343D\344C\345BBBBBBD#BB\207" [tblui--append-str-to-symbol "-goto-ui" "*" symbol-name "-refresher" "-mode" "-map" mapcar apply-partially nth 2 apply append #[257 "\300\301\"\207" [plist-get :funcs] 4 "\n\n(fn PDEF)"] #[257 "\211\300\301\"B\207" [tblui--append-str-to-symbol "-popup-interface"] 5 "\n\n(fn TABLIST-FUNC)"] progn defun nil setq tabulated-list-entries #[257 "\300A\301\302@\303B\257\207" [defun nil (interactive) ((mapcar #'car (tablist-get-marked-items)))] 7 "\n\n(fn TABLIST-FUNC-INFO-ENTRY)"] make-closure #[257 "\302\303\"\302\304\"\305\306\307\300D\310\307\311\312\313\301\"\"D\257\314\315\316\307DD\317BBBE\207" [V0 V1 plist-get :name :funcs progn magit-define-popup quote :actions mapcar make-closure #[257 "\211\211@A@\3018\302\300\"E\207" [V0 2 assoc-default] 10 "\n\n(fn ENTRY)"] add-function :before symbol-function (#'tblui--select-if-empty)] 13 "\n\n(fn POPUP-DEFINITION)"] define-derived-mode tabulated-list-mode "Containers Menu" "Major mode for handling a list of docker containers." #[257 "\301\302\"\301\303\"\304\300\305DF\207" [V0 plist-get :key :name define-key function] 8 "\n\n(fn POPUP-DEFINITION)"] tabulated-list-format (setq tabulated-list-padding 2) add-hook 'tabulated-list-revert-hook function (nil t) ((tabulated-list-init-header) (tablist-minor-mode)) pop-to-buffer (tabulated-list-init-header) ((tabulated-list-revert))] 29 (#$ . 1828)])) (provide 'tblui)