aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/org/org-protocol.el18
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
357Greedy handlers might receive a list like this from emacsclient: 357Greedy 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\"))
359where \"/dir/\" is the absolute path to emacsclients working directory. 359where \"/dir/\" is the absolute path to emacsclients working directory.
360This function transforms it into a flat list." 360This 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.