Simplify the function `org-capture-expand-file'

This commit is contained in:
Carsten Dominik 2011-02-22 14:00:24 +01:00
parent a821f4e922
commit 4ab9990b54
1 changed files with 6 additions and 7 deletions

View File

@ -735,13 +735,12 @@ already gone. Any prefix argument will be passed to the refile comand."
"Expand functions and symbols for FILE.
When FILE is a function, call it. When it is a form, evaluate
it. When it is a variable, retrieve the value. Return whatever we get."
(setq file
(cond
((org-string-nw-p file) file)
((functionp file) (funcall file))
((and (symbolp file) (boundp file)) (symbol-value file))
((and file (consp file)) (eval file))
(t file))))
(cond
((org-string-nw-p file) file)
((functionp file) (funcall file))
((and (symbolp file) (boundp file)) (symbol-value file))
((and file (consp file)) (eval file))
(t file)))
(defun org-capture-target-buffer (file)
"Get a buffer for FILE."