diff options
| author | Paul Eggert | 2018-12-17 13:26:42 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-12-17 13:32:52 -0800 |
| commit | c5e02f2bce28f3b1f2006ce1f208f4a92ca05ed9 (patch) | |
| tree | e4b2465343ceddd587684515029b7dad8f7f3ef2 /lisp | |
| parent | 55838e4e6a176317367c6759e0520395e80c856f (diff) | |
| download | emacs-c5e02f2bce28f3b1f2006ce1f208f4a92ca05ed9.tar.gz emacs-c5e02f2bce28f3b1f2006ce1f208f4a92ca05ed9.zip | |
Make org-protocol-flatten always an alias
* lisp/org/org-protocol.el (org-protocol-flatten):
Rewrite as top-level alias, as per Stefan’s suggestion,
to avoid compiler warnings.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/org/org-protocol.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index bb88c2fe1fd..2a4d51242cf 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el | |||
| @@ -349,20 +349,20 @@ returned list." | |||
| 349 | ret) | 349 | ret) |
| 350 | l))) | 350 | l))) |
| 351 | 351 | ||
| 352 | (if (fboundp 'flatten-tree) | 352 | (defalias 'org-protocol-flatten |
| 353 | (defalias 'org-protocol-flatten 'flatten-tree) | 353 | (if (fboundp 'flatten-tree) 'flatten-tree |
| 354 | (defun org-protocol-flatten (list) | 354 | (lambda (list) |
| 355 | "Transform LIST into a flat list. | 355 | "Transform LIST into a flat list. |
| 356 | 356 | ||
| 357 | Greedy handlers might receive a list like this from emacsclient: | 357 | Greedy handlers might receive a list like this from emacsclient: |
| 358 | \((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")) | 358 | \((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")) |
| 359 | where \"/dir/\" is the absolute path to emacsclients working directory. | 359 | where \"/dir/\" is the absolute path to emacsclients working directory. |
| 360 | This function transforms it into a flat list." | 360 | This function transforms it into a flat list." |
| 361 | (if (null list) () | 361 | (if list |
| 362 | (if (listp list) | 362 | (if (consp list) |
| 363 | (append (org-protocol-flatten (car list)) | 363 | (append (org-protocol-flatten (car list)) |
| 364 | (org-protocol-flatten (cdr list))) | 364 | (org-protocol-flatten (cdr list))) |
| 365 | (list list))))) | 365 | (list list)))))) |
| 366 | 366 | ||
| 367 | (defun org-protocol-parse-parameters (info &optional new-style default-order) | 367 | (defun org-protocol-parse-parameters (info &optional new-style default-order) |
| 368 | "Return a property list of parameters from INFO. | 368 | "Return a property list of parameters from INFO. |