diff options
| author | Paul Eggert | 2018-12-17 10:19:23 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-12-17 10:26:15 -0800 |
| commit | ef144113f3473f39d3df3e96e780c832e0d5420e (patch) | |
| tree | 4dcdfeb3a0d55a6f891983f9e59b9f5d1b3f5378 /lisp/org | |
| parent | a5995a326d1dad9bccf1ad7eb96e4e8146f6dcbe (diff) | |
| download | emacs-ef144113f3473f39d3df3e96e780c832e0d5420e.tar.gz emacs-ef144113f3473f39d3df3e96e780c832e0d5420e.zip | |
Some more flatten-tree aliases
* lisp/allout.el (allout-flatten):
* lisp/progmodes/hideif.el (hif-flatten):
Now an obsolete alias for flatten-tree. All callers changed.
* lisp/org/org-protocol.el (org-protocol-flatten):
Make it an alias for flatten-tree if available.
* lisp/progmodes/js.el (js--flatten-list):
Remove alias. We shouldn’t need obsolete function aliases for
private functions.
Diffstat (limited to 'lisp/org')
| -rw-r--r-- | lisp/org/org-protocol.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 33957ee3269..bb88c2fe1fd 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el | |||
| @@ -349,17 +349,20 @@ returned list." | |||
| 349 | ret) | 349 | ret) |
| 350 | l))) | 350 | l))) |
| 351 | 351 | ||
| 352 | (defun org-protocol-flatten (list) | 352 | (if (fboundp 'flatten-tree) |
| 353 | "Transform LIST into a flat list. | 353 | (defalias 'org-protocol-flatten 'flatten-tree) |
| 354 | (defun org-protocol-flatten (list) | ||
| 355 | "Transform LIST into a flat list. | ||
| 354 | 356 | ||
| 355 | Greedy handlers might receive a list like this from emacsclient: | 357 | Greedy handlers might receive a list like this from emacsclient: |
| 356 | \((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")) | 358 | \((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")) |
| 357 | where \"/dir/\" is the absolute path to emacsclients working directory. | 359 | where \"/dir/\" is the absolute path to emacsclients working directory. |
| 358 | This function transforms it into a flat list." | 360 | This function transforms it into a flat list." |
| 359 | (if (null list) () | 361 | (if (null list) () |
| 360 | (if (listp list) | 362 | (if (listp list) |
| 361 | (append (org-protocol-flatten (car list)) (org-protocol-flatten (cdr list))) | 363 | (append (org-protocol-flatten (car list)) |
| 362 | (list list)))) | 364 | (org-protocol-flatten (cdr list))) |
| 365 | (list list))))) | ||
| 363 | 366 | ||
| 364 | (defun org-protocol-parse-parameters (info &optional new-style default-order) | 367 | (defun org-protocol-parse-parameters (info &optional new-style default-order) |
| 365 | "Return a property list of parameters from INFO. | 368 | "Return a property list of parameters from INFO. |