-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdiogenes-lisp-utils.elc
81 lines (62 loc) · 7.31 KB
/
diogenes-lisp-utils.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
;ELC
;;; Compiled
;;; in Emacs version 29.4
;;; with all optimizations.
(byte-code "\300\301!\210\300\302!\207" [require cl-lib seq] 2)#@404 Apply a list of regex-substitutions to a string in sequence.
Each SUBST-LIST contains the REGEXP REP, followed optionaleval
parameters of `replace-regexp-in-string', FIXEDCASE LITERAL SUBEXP
START. Alternativly, SUBST-LIST can be a string or a list of one
element, in which case this is taken as the REGEXP and all of its
matches are deleted.
Returns the resulting string.
(fn STR &rest SUBST-LISTS)
(defalias 'diogenes--replace-regexes-in-string '(macro . #[385 "\211\203B \211@\211<\203( \211@A@\206 \300AA\301BBBB\266\203\2029 \211;\2035 \301\300F\2029 \302\303\"\262A\266\202\202 \207" ["" replace-regexp-in-string error "%s must be either a list or a string!"] 13 (#$ . 148)]))
(byte-code "\300\301\302\303#\300\207" [function-put diogenes--replace-regexes-in-string lisp-indent-function 1] 4)#@51 Traverse a plist and extract its keys
(fn PLIST)
(defalias 'diogenes--plist-keys #[257 "\300!\204\n \301\302!\210\211\303\211:\203# @\262B\262AA\262\202 \211\237\207" [plistp error "Not a plist!" nil] 6 (#$ . 972)])#@53 Traverse a plist and extract its values
(fn PLIST)
(defalias 'diogenes--plist-values #[257 "\300!\204\n \301\302!\210\211A\303\211:\203$ @\262B\262AA\262\202 \211\237\207" [plistp error "Not a plist!" nil] 6 (#$ . 1204)])#@55 Check if all keys of a plist are keywords
(fn PLIST)
(defalias 'diogenes--plist-keyword-keys-p #[257 "\300!\204 \301\207\211A\203 \302@!\205 \303AA!\207\304\207" [plistp nil keywordp diogenes--plist-keyword-keys-p t] 3 (#$ . 1442)])#@155 Return non-nil if KEY is equal to the cadr of an element of ALIST.
The value is actually the first element of ALIST whose car equals KEY.
(fn KEY ALIST)
(defalias 'diogenes--assoc-cadr #[514 "\300\301\302\"\"\207" [cl-find-if make-closure #[257 "\300A@\232\207" [V0] 3 "\n\n(fn E)"]] 6 (#$ . 1688)])#@11
(fn KW)
(defalias 'diogenes--keyword->string #[257 "\300!\204 \301\302\"\210\303!\304\305O\207" [keywordp error "Not a keyword: %s" symbol-name 1 nil] 4 (#$ . 1997)])#@10
(fn S)
(defalias 'diogenes--string->keyword #[257 "\300\301P!\207" [intern ":"] 4 (#$ . 2175)])#@19
(fn HASH-TABLE)
(defalias 'diogenes--hash-to-alist #[257 "\300C\301\302\303\"\"\210\211\242\237\207" [nil maphash make-closure #[514 "\300B\300\242B\240\207" [V0] 5 "\n\n(fn K V)"]] 6 (#$ . 2279)])#@85 Split a string once on regexp and return the substrings as a list.
(fn REGEXP STR)
(defalias 'diogenes--split-once #[514 "\300 \301\302\"\216\303\"\203 \304\211\224O\304\225\305OD\202 C)\207" [match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data t] 3] string-match 0 nil] 7 (#$ . 2488)])#@85 Get the boundaries of the region where property does not change.
(fn POS PROPERTY)
(defalias 'diogenes--get-text-prop-boundaries #[514 "\300\"\206 d\301\"\206 e\211D\207" [next-single-char-property-change previous-single-char-property-change] 6 (#$ . 2805)])#@15
(fn LETTER)
(defalias 'diogenes--ascii-alpha-p #[257 "\300X\203\f \211\301X\206 \302X\205 \211\303X\207" [65 90 97 122] 3 (#$ . 3077)])#@12
(fn STR)
(defalias 'diogenes--ascii-alpha-only #[257 "\300\301\"\207" [cl-remove-if-not diogenes--ascii-alpha-p] 4 (#$ . 3224)])
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put diogenes--ascii-alpha-only speed -1 put byte-optimizer byte-compile-inline-expand] 5)#@90 Compare two string, making them equal if they contain the same letters
(fn STR-A STR-B)
(defalias 'diogenes--string-equal-letters-only #[514 "\300\301\302#\300\301\302#\230\207" [replace-regexp-in-string "[^[:alpha:]]" ""] 7 (#$ . 3513)])#@48 Return non-nil if on the first line in buffer.
(defalias 'diogenes--first-line-p #[0 "\212\300 \210o)\207" [beginning-of-line] 1 (#$ . 3760)])#@47 Return non-nil if on the last line in buffer.
(defalias 'diogenes--last-line-p #[0 "\212\300\210m)\207" [nil] 1 (#$ . 3908)])#@467 Filter a list interactively in minibuffer, with initial-selection preselected.
When supplied, the keyword arguments add additional strings with a special meaning:
- :all-string adds all values and toggles the other input mode (add <-> remove)
- :regexp-string causes the next input to be read in as a regexp
- :remove-string switches input mode to `remove'
(fn LIST PROMPT &key INITIAL-SELECTION REMOVE-PROMPT ALL-STRING REMOVE-STRING REGEXP-STRING COMMIT-STRING)
(defalias 'diogenes--filter-in-minibuffer #[642 "\301\302\"A@\301\303\"A@\301\304\"A@\301\305\"A@\301\306\"A@\301\307\"A@\211\203] \211@\310>\203E \211A\204= \311\312@\"\210\211AA\262\202'