| Server IP : 217.160.0.212 / Your IP : 216.73.216.71 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/org/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib org-macs org-compat] 2)
#@295 Alist containing all macro templates in current buffer.
Associations are in the shape of (NAME . TEMPLATE) where NAME
stands for macro's name and template for its replacement value,
both as strings. This is an internal variable. Do not set it
directly, use instead:
#+MACRO: name template
(defvar org-macro-templates nil (#$ . 178))
(make-variable-buffer-local 'org-macro-templates)
#@64 Compute the formal arglist to use for TEMPLATE.
(fn TEMPLATE)
(defalias 'org-macro--makeargs #[257 "\300\211\301\302#\203 \300\225\262\303\304\305\"!]\262\202 \306\305W\203$ \207\300V\203; \307\310\311\"!B\262S\262\202$ \312B\207" [0 string-match "\\$\\([0-9]+\\)" string-to-number match-string 1 (&rest _) intern format "$%d" &optional] 8 (#$ . 572)])
#@175 Set template for the macro NAME.
VALUE is the template of the macro. The new value override the
previous one, unless VALUE is nil. Return the updated list.
(fn TEMPLATES)
(defalias 'org-macro--set-templates #[257 "\301\211\203n \211@\211\242\243\211\302\";\203E \303\301\304\305#)\266\203\203E \306!\30717 \310!A@0\202= \210\311\312\"\313E\262\266\203U \211\203U \211\241\266\202g \211\204e \206_ \314BB\262\266A\266\202\202 \210\207" [inhibit-changing-match-data nil assoc "\\`(eval\\>" t string-match org-macro--makeargs (error) read user-error "Invalid definition for macro %S" lambda ""] 15 (#$ . 950)])
#@116 Collect macro definitions in current buffer and setup files.
Return an alist containing all macro templates found.
(defalias 'org-macro--collect-macros #[0 "\300\301\302\303\"B\304\301\305!B\306\301\307\303\"B\310\311 BF\312\313!\211:\203b \211\242\211:\203a \211\242\211\314\232\203` \243\243\211\204^ \211\203] \211@\315\316\"\203V \317\320\"\321\225\322OB\nB\262\n\266A\266\202\2026 \210\266\210\210\210\207" ["author" org-macro--find-keyword-value "AUTHOR" t "email" "EMAIL" "title" "TITLE" "date" org-macro--find-date org-collect-keywords ("MACRO") "MACRO" string-match "^\\(\\S-+\\)[ ]*" match-string 1 0 nil] 12 (#$ . 1598)])
#@416 Collect macro templates defined in current buffer.
DEFAULT is a list of globally available templates.
Templates are stored in buffer-local variable `org-macro-templates'.
In addition to buffer-defined macros, the function installs the
following ones: "n", "author", "email", "keyword",
"time", "property", and, if the buffer is associated to
a file, "input-file" and "modification-time".
(fn &optional DEFAULT)
(defalias 'org-macro-initialize-templates #[256 "\301\302!\210\303 \210\304\305\306 \"!\307\310 !\211\2053 \311!\2053 \312\313!B\314\315!\3168\262\317\320#\262BD\262\244\321\244\211\207" [org-macro-templates require org-element org-macro--counter-initialize org-macro--set-templates append org-macro--collect-macros buffer-file-name buffer-base-buffer file-exists-p "input-file" file-name-nondirectory "modification-time" file-attributes 5 make-closure #[641 "\302\303!\203 \304\300!\206 \301\"\207" [V0 V1 format-time-string org-string-nw-p org-macro--vc-modified-time] 7 "\n\n(fn ARG1 &optional ARG2 &rest _)"] (("keyword" lambda (arg1 &rest _) (org-macro--find-keyword-value arg1 t)) ("n" lambda (&optional arg1 arg2 &rest _) (org-macro--counter-increment arg1 arg2)) ("property" lambda (arg1 &optional arg2 &rest _) (org-macro--get-property arg1 arg2)) ("time" lambda (arg1 &rest _) (format-time-string arg1)))] 10 (#$ . 2251)])
#@285 Return expanded MACRO, as a string.
MACRO is an object, obtained, for example, with
`org-element-context'. TEMPLATES is an alist of templates used
for expansion. See `org-macro-templates' for a buffer-local
default value. Return nil if no template was found.
(fn MACRO TEMPLATES)
(defalias 'org-macro-expand #[514 "\300\301\302\"\303#A\211\2053 \304!\203 \305\301\306\"\"\202) \307\310\311\312\"\313\314%\315\316\2060 \317\"\262\207" [assoc-string org-element-property :key t functionp apply :args replace-regexp-in-string "\\$[0-9]+" make-closure #[257 "\301\302\303O!S\304\305\300\"8\206 \306\207" [V0 string-to-number 1 nil org-element-property :args #1=""] 5 "\n\n(fn M)"] nil literal format "%s" #1#] 9 (#$ . 3621)])
#@414 Replace all macros in current buffer by their expansion.
TEMPLATES is an alist of templates used for expansion. See
`org-macro-templates' for a buffer-local default value.
Optional argument KEYWORDS, when non-nil is a list of keywords,
as strings, where macro expansion is allowed.
Return an error if a macro in the buffer cannot be associated to
a definition in TEMPLATES.
(fn TEMPLATES &optional KEYWORDS)
(defalias 'org-macro-replace-all #[513 "\212\214~\210eb\210\301\302\303!\"\304\305\306\304\307#\205\320 \310 \311\312\"\216\313 )\262\204 \310 \311\314\"\216\315 )\262\316!\211\317=\203>