mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
76bbd0 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib org-macs org-compat] 2)
16 #@295 Alist containing all macro templates in current buffer.
17 Associations are in the shape of (NAME . TEMPLATE) where NAME
18 stands for macro's name and template for its replacement value,
19 both as strings.  This is an internal variable.  Do not set it
20 directly, use instead:
21
22   #+MACRO: name template
23 (defvar org-macro-templates nil (#$ . 502))
24 (make-variable-buffer-local 'org-macro-templates)
25 #@116 Collect macro definitions in current buffer and setup files.
26 Return an alist containing all macro templates found.
27 (defalias 'org-macro--collect-macros #[0 "\300C\211\301\302\303\304\305!\306\"\307\310%\240\210\211\242\300\211\"\207" [nil make-byte-code 514 "\303\212\214~\210eb\210\304\305\306\303#\203\254\307 \310!\311=\203\250\312\313\"\312\314\"\315\232\203X\316\317\"\203\247\320\321\"\320\322\"\206;\323\324\"\211\203K\211\241\210\202SBB\262\266\202\247\325\326\211\327!#\330!\211\203j\202m\331!\211\235\204\245\332\333!r\211q\210\334\335\336\337\340!\341\"\322$\216\204\217\342!\343 \210\344\345\"c\210\300\242    B\"\262*\210\266\210\210\202    +\207" vconcat vector [case-fold-search default-directory t re-search-forward "^[     ]*#\\+\\(MACRO\\|SETUPFILE\\):" nil org-element-at-point org-element-type keyword org-element-property :value :key "MACRO" string-match "^\\(.*?\\)\\(?:\\s-+\\(.*\\)\\)?\\s-*$" match-string 1 2 "" assoc org-unbracket-string "\"" org-trim org-file-url-p expand-file-name generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] file-name-directory org-mode org-file-contents noerror] 14 "\n\n(fn FILES TEMPLATES)"] 8 (#$ . 897)])
28 #@304 Collect macro templates defined in current buffer.
29 Templates are stored in buffer-local variable
30 `org-macro-templates'.  In addition to buffer-defined macros, the
31 function installs the following ones: "property",
32 "time". and, if the buffer is associated to a file,
33 "input-file" and "modification-time".
34 (defalias 'org-macro-initialize-templates #[0 "\301C\302\303\304\305\306!\307\"\310\311%\312\313\314B\315\316BD\"\210\317\320 !\211\203B\321!\203B\312\322\323!B\324\325\326\327!\327\310\330\n!8!#BD\"\210\210\331 \210\211\332\333B!\210\334 \242\244\211\207" [org-macro-templates nil make-byte-code 257 "\301@\300\242\"\211\203\211A\241\202\300\300\242B\240\207" vconcat vector [assoc] 5 "\n\n(fn CELL)" mapc "property" "(eval (save-excursion\n        (let ((l \"$2\"))\n          (when (org-string-nw-p l)\n            (condition-case _\n                (let ((org-link-search-must-match-exact-headline t))\n                  (org-link-search l nil t))\n              (error\n               (error \"Macro property failed: cannot find location %s\"\n                      l)))))\n        (org-entry-get nil \"$1\" 'selective)))" "time" "(eval (format-time-string \"$1\"))" buffer-file-name buffer-base-buffer file-exists-p "input-file" file-name-nondirectory "modification-time" format "(eval (format-time-string \"$1\" (or (and (org-string-nw-p \"$2\") (org-macro--vc-modified-time %s)) '%s)))" prin1-to-string file-attributes org-macro--counter-initialize "n" "(eval (org-macro--counter-increment \"$1\" \"$2\"))" org-macro--collect-macros] 14 (#$ . 2175)])
35 #@285 Return expanded MACRO, as a string.
36 MACRO is an object, obtained, for example, with
37 `org-element-context'.  TEMPLATES is an alist of templates used
38 for expansion.  See `org-macro-templates' for a buffer-local
39 default value.  Return nil if no template was found.
40
41 (fn MACRO TEMPLATES)
42 (defalias 'org-macro-expand #[514 "\300\301\302\"\303#A\211\2058\304\305\306\307\310\311\312    !\313\"\314\315%\316\317%\320\321\"\203.\322\323!!\262\324\325\2065\326\"\262\207" [assoc-string org-element-property :key t replace-regexp-in-string "\\$[0-9]+" make-byte-code 257 "\301\302\303O!S\304\305\300\"8\206\306\207" vconcat vector [string-to-number 1 nil org-element-property :args #1=""] 5 "\n\n(fn ARG)" nil literal string-match "\\`(eval\\>" eval read format "%s" #1#] 11 (#$ . 3763)])
43 #@450 Replace all macros in current buffer by their expansion.
44
45 TEMPLATES is an alist of templates used for expansion.  See
46 `org-macro-templates' for a buffer-local default value.
47
48 If optional arg FINALIZE is non-nil, raise an error if a macro is
49 found in the buffer with no definition in TEMPLATES.
50
51 Optional argument KEYWORDS, when non-nil is a list of keywords,
52 as strings, where macro expansion is allowed.
53
54 (fn TEMPLATES &optional FINALIZE KEYWORDS)
55 (defalias 'org-macro-replace-all #[769 "\212\214~\210eb\210\301\302\303!\"\304\305\306\304\307#\205\332\310 \311\312\313\314\315!\316\"\317$\216\320 )\262\204\310 \311\312\313\314\315!\321\"\317$\216\322 )\262\323!\211\324=\203L\202|\211\325=\203[\326\327\"\235\204t\211\330=\205|\326\327\"\304\307\331#)\266\203\205|\212\312\224b\210\332 )\211\203\325\333    \"\326\334\"\211\326\335\"E\211\235\203\244\336\337\326\327\"\"\210\202\323\203\305\211B\262\326\340\"b\210\341\304x\210`|\210\212c\210)\202\323    \203\323\336\342\326\327\"\"\210\266\266\202\266\202*\207" [inhibit-changing-match-data format "\\`EXPORT_%s\\+?\\'" regexp-opt nil re-search-forward "{{{[-A-Za-z0-9_]" t match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 org-in-commented-heading-p [set-match-data evaporate] org-element-context org-element-type macro keyword org-element-property :key node-property string-match org-element-macro-parser org-macro-expand :begin :args error "Circular macro expansion: %s" :end "     " "Undefined Org macro: %s; aborting"] 16 (#$ . 4561)])
56 #@219 Build macro's arguments string from ARGS.
57 ARGS are strings.  Return value is a string with arguments
58 properly escaped and separated with commas.  This is the opposite
59 of `org-macro-extract-arguments'.
60
61 (fn &rest ARGS)
62 (defalias 'org-macro-escape-arguments #[128 "\300\301!\211\2033\211@\302\303\304\305\300\232?\205$\306\307\"\205$\310\311\"P\312\313%Q\262A\266\202\202\314\312O\262\207" ["" reverse "," replace-regexp-in-string "\\(\\\\*\\)," #[257 "\300\301\302\"G\303_T\304\"\305P\207" [make-string match-string 1 2 92 ","] 5 "\n\n(fn M)"] string-match "\\\\+\\'" match-string 0 nil t 1] 12 (#$ . 6152)])
63 #@209 Extract macro arguments from string S.
64 S is a string containing comma separated values properly escaped.
65 Return a list of arguments, as strings.  This is the opposite of
66 `org-macro-escape-arguments'.
67
68 (fn S)
69 (defalias 'org-macro-extract-arguments #[257 "\300\301\302\303\304\305%\306\"\207" [split-string replace-regexp-in-string "\\(\\\\*\\)," #[257 "\300\301\"G\302\303\245\304\"\305\303\"\306U\203\307\202\310P\207" [match-string 1 make-string 2 92 mod 0 "" ","] 6 "\n\n(fn STR)"] nil t ""] 8 (#$ . 6786)])
70 #@13 
71
72 (fn FILE)
73 (defalias 'org-macro--vc-modified-time #[257 "\301 \302\303\304\305\306!\307\"\310$\216\311!\205d\312\313!\314\315C\302\303\304\305\306!\316\"\310$\216\317\311!\320\315\211\321&\210rq\210\322\302\303\323\305\306!\324\"\325$!\210)\326!\211\203]\327\330\315\314$\204P\210)\211\242)\266\203)\207" [case-fold-search current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 vc-backend get-buffer-create " *org-vc*" t nil [kill-buffer] vc-call-backend print-log 1 vc-exec-after "eb\210\301\302\303\304#\205 \305`\306 {!\307\310\"\205\300\311\312\"\240\262\207" [re-search-forward "Date:?[     ]*" nil t parse-time-string line-end-position cl-some identity apply encode-time] 5 get-buffer-process accept-process-output 0.5] 13 (#$ . 7312)])
74 #@47 Hash table containing counter value per name.
75 (defvar org-macro--counter-table nil (#$ . 8137))
76 #@40 Initialize `org-macro--counter-table'.
77 (defalias 'org-macro--counter-initialize #[0 "\301\302\303\"\211\207" [org-macro--counter-table make-hash-table :test equal] 3 (#$ . 8239)])
78 #@361 Increment counter NAME.
79 NAME is a string identifying the counter.
80
81 When non-nil, optional argument ACTION is a string.
82
83 If the string is "-", keep the NAME counter at its current
84 value, i.e. do not increment.
85
86 If the string represents an integer, set the counter to this number.
87
88 Any other non-empty string resets the counter to 1.
89
90 (fn NAME &optional ACTION)
91 (defalias 'org-macro--counter-increment #[513 "\302!\303!\205\f\302!\304\303!\204\305\306#T\202B\307\230\203+\305\310#\202B\311\312\313\314#)\266\203\203A\315!\202B\310#\207" [org-macro--counter-table inhibit-changing-match-data org-trim org-string-nw-p puthash gethash 0 "-" 1 "\\`[0-9]+\\'" nil t string-match string-to-number] 13 (#$ . 8427)])
92 (provide 'org-macro)