diff options
author | Christian Egli <christian.egli@alumni.ethz.ch> | 2010-03-24 09:20:10 +0100 |
---|---|---|
committer | Christian Egli <christian.egli@alumni.ethz.ch> | 2010-06-08 09:20:32 +0200 |
commit | 8e8bd469db22fd3b1a6907018e642dda2979cba5 (patch) | |
tree | e55d2591f8503c50f1252d6e8c778d2c11b18dd0 | |
parent | c1508e9310f9753b691505e5fa31c1318841bcba (diff) | |
download | org-mode-8e8bd469db22fd3b1a6907018e642dda2979cba5.tar.gz |
Use a let instead of calculating a value twice.
-rw-r--r-- | lisp/org-taskjuggler.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 84ac06f..cde1fec 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -375,7 +375,10 @@ specified it is calculated org-export-taskjuggler-default-project-duration)))) (defun org-taskjuggler-filter-and-join (items) - (and (remq nil items) (mapconcat 'identity (remq nil items) "\n"))) + "Filter all nil elements from ITEMS and join the remaining ones +with separator \"\n\"." + (let ((filtered-items (remq nil items))) + (and filtered-items (mapconcat 'identity filtered-items "\n")))) (defun org-taskjuggler-get-attributes (item attributes) "Return all attribute as a single formated string. ITEM is an alist |