Import upstream version 10.8+0.20220720
Debian Janitor
1 year, 5 months ago
30 | 30 | "Apply initial ARGUMENT to sequence of FUNCTIONS. |
31 | 31 | FUNCTIONS is list of functions. |
32 | 32 | |
33 | \(poly-funcall '(f1 f2 .. fn) arg) is as same as | |
34 | \(fn .. (f2 (f1 arg)) ..). | |
33 | (poly-funcall \\='(f1 f2 .. fn) arg) is as same as | |
34 | (fn .. (f2 (f1 arg)) ..). | |
35 | 35 | |
36 | For example, (poly-funcall '(car number-to-string) '(100)) returns | |
36 | For example, (poly-funcall \\='(car number-to-string) \\='(100)) returns | |
37 | 37 | \"100\"." |
38 | 38 | (while functions |
39 | 39 | (setq argument (funcall (car functions) argument) |
58 | 58 | "List of functions for file-name filter. |
59 | 59 | |
60 | 60 | Example: |
61 | \(setq filename-filters '\(filename-special-filter | |
61 | (setq filename-filters \\='(filename-special-filter | |
62 | 62 | filename-eliminate-top-low-lines |
63 | 63 | filename-canonicalize-low-lines |
64 | 64 | filename-maybe-truncate-by-size |
65 | filename-eliminate-bottom-low-lines\)\) | |
65 | filename-eliminate-bottom-low-lines)) | |
66 | 66 | |
67 | 67 | Moreover, if you want to convert Japanese filename to roman string by kakasi, |
68 | 68 | |
69 | \(if \(exec-installed-p \"kakasi\"\) | |
70 | \(setq filename-filters | |
71 | \(append '\(filename-japanese-to-roman-string\) filename-filters\)\)\)") | |
69 | (if (exec-installed-p \"kakasi\") | |
70 | (setq filename-filters | |
71 | (append \\='(filename-japanese-to-roman-string) filename-filters)))") | |
72 | 72 | |
73 | 73 | ;;; @ filters |
74 | 74 | ;;; |
38 | 38 | If it is nil, variable `default-mime-charset-for-write' is used. |
39 | 39 | If it is a function, interface must be (TYPE CHARSETS &rest ARGS). |
40 | 40 | CHARSETS is list of charset. |
41 | If TYPE is 'region, ARGS has START and END." | |
41 | If TYPE is \\='region, ARGS has START and END." | |
42 | 42 | :group 'i18n |
43 | 43 | :type '(choice function (const nil))) |
44 | 44 |
141 | 141 | :type 'mime-charset) |
142 | 142 | |
143 | 143 | (defcustom detect-mime-charset-from-coding-system nil |
144 | "When non-nil, `detect-mime-charset-region' and `detect-mime-charset-string' functions decide charset by encodability in destination coding system. | |
144 | "When non-nil, `detect-mime-charset-region' and `detect-mime-charset-string' | |
145 | functions decide charset by encodability in destination coding system. | |
145 | 146 | |
146 | 147 | In that case, each car of `charsets-mime-charset-alist' element is ignored." |
147 | 148 | :group 'i18n |
163 | 164 | default-mime-charset-for-write)) |
164 | 165 | |
165 | 166 | (defun detect-mime-charset-from-coding-system (start end &optional string) |
166 | "Return MIME charset for the region between START and END, deciding by encodability in destination coding system. | |
167 | ||
168 | Optional 3rd argument STRING is non-nil, detect MIME charset from STRING. In that case, START and END are indexes of the string." | |
167 | "Return MIME charset for the region between START and END, | |
168 | deciding by encodability in destination coding system. | |
169 | ||
170 | Optional 3rd argument STRING is non-nil, detect MIME charset from STRING. | |
171 | In that case, START and END are indexes of the string." | |
169 | 172 | (let ((alist charsets-mime-charset-alist) |
170 | 173 | result) |
171 | 174 | (while alist |
179 | 182 | (defun detect-mime-charset-string (string) |
180 | 183 | "Return MIME charset for STRING. |
181 | 184 | |
182 | When `detect-mime-charset-from-coding-system' is non-nil, each car of `charsets-mime-charset-alist' element is ignored." | |
185 | When `detect-mime-charset-from-coding-system' is non-nil, | |
186 | each car of `charsets-mime-charset-alist' element is ignored." | |
183 | 187 | (if detect-mime-charset-from-coding-system |
184 | 188 | (detect-mime-charset-from-coding-system 0 (length string) string) |
185 | 189 | (let ((table (make-hash-table :test 'eq))) |
190 | 194 | (defun detect-mime-charset-region (start end) |
191 | 195 | "Return MIME charset for region between START and END. |
192 | 196 | |
193 | When `detect-mime-charset-from-coding-system' is non-nil, each car of `charsets-mime-charset-alist' element is ignored." | |
197 | When `detect-mime-charset-from-coding-system' is non-nil, | |
198 | each car of `charsets-mime-charset-alist' element is ignored." | |
194 | 199 | (if detect-mime-charset-from-coding-system |
195 | 200 | (detect-mime-charset-from-coding-system start end) |
196 | 201 | (let ((point (min start end)) |
26 | 26 | (defun mule-caesar-region (start end &optional stride-ascii) |
27 | 27 | "Caesar rotation of current region. |
28 | 28 | Optional argument STRIDE-ASCII is rotation-size for Latin alphabet |
29 | \(A-Z and a-z). For non-ASCII text, ROT-N/2 will be performed in any | |
29 | (A-Z and a-z). For non-ASCII text, ROT-N/2 will be performed in any | |
30 | 30 | case (N=charset-chars; 94 for 94 or 94x94 graphic character set; 96 |
31 | 31 | for 96 or 96x96 graphic character set)." |
32 | 32 | (interactive "r\nP") |
40 | 40 | absolute path: \"/HOO/BAR/BAZ/\" |
41 | 41 | |
42 | 42 | You can specify following OPTIONS: |
43 | 'all-paths search from `load-path' | |
43 | \\='all-paths search from `load-path' | |
44 | 44 | instead of `default-load-path' |
45 | 'append add PATH to the last of `load-path'" | |
45 | \\='append add PATH to the last of `load-path'" | |
46 | 46 | (let ((rest (if (memq 'all-paths options) |
47 | 47 | load-path |
48 | 48 | default-load-path)) |
186 | 186 | (defun character-to-event (ch) |
187 | 187 | "Convert keystroke CH into an event structure, replete with bucky bits. |
188 | 188 | Note that CH (the keystroke specifier) can be an integer, a character |
189 | or a symbol such as 'clear." | |
189 | or a symbol such as \\='clear." | |
190 | 190 | ch) |
191 | 191 | |
192 | 192 | ;; XEmacs 21: (event-to-character EVENT |
109 | 109 | |
110 | 110 | (defun richtext-next-annotation () |
111 | 111 | "Find and return next text/richtext annotation. |
112 | Return value is \(begin end name positive-p), or nil if none was found." | |
112 | Return value is (begin end name positive-p), or nil if none was found." | |
113 | 113 | (catch 'tag |
114 | 114 | (while (re-search-forward richtext-annotation-regexp nil t) |
115 | 115 | (let* ((beg0 (match-beginning 0)) |