;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'cl-lib) #@238 Turn prefix argument PREFIX-ARGUMENT to a logical index. Examples: C-u : index 1 C-u C-u : index 2 C-u 2 : index 2 C-u 1 2 : index 12 : index 0 (no prefix argument used) (fn PREFIX-ARGUMENT) (defalias 'purpose--prefix-arg-to-index #[257 "\211\204\300\207\211<\203\301\302@\303\"!\207\211\304=\203\305\207\207" [0 round log 4 - -1] 5 (#$ . 106)]) #@22 (fn NAME COMMANDS) (defalias 'purpose--generate-documentation-def-prefix-overload #[514 "\300\301@#A\302\303\302:\203L@\262\300\304\305\306\303\302X\203.\307B\262T\262\202\211\237\266\203\310#  &B\262A\262T\262\202 \211\237\266\204\305\306\311\312\313E\"\314#\207" [format "\\[%s]: `%s'" nil 1 "%s \\[%s], C-u %s \\[%s]: `%s'" mapconcat identity "C-u" " " append "This function was generated by `define-purpose-prefix-overload'." "" "\n"] 16 (#$ . 511)]) #@362 Define an interactive function named NAME, which calls interactively one command from COMMANDS. The command is chosen by the prefix argument: no prefix argument: first command; C-u or C-u 1: second command; C-u C-u or C-u 2: third command; and so on. Use it like this: (define-purpose-prefix-overload hello '(command1 command2 command3)) (fn NAME COMMANDS) (defalias 'define-purpose-prefix-overload '(macro . #[514 "\300!\204\n\301\302!\210\303\304\305\300!\"\306\307\310\311\312\313\nEDD\314BB\257\207" [eval error "Argument COMMANDS cannot be empty" defun (&optional arg) purpose--generate-documentation-def-prefix-overload (interactive "P") let* (index (purpose--prefix-arg-to-index arg)) command nth index ((if command (call-interactively command) (error "Index %s too big" index)))] 13 (#$ . 1009)])) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310!\207" [function-put define-purpose-prefix-overload lisp-indent-function defun put edebug-form-spec (&define name (&rest sexp)) provide window-purpose-prefix-overload] 5)