Browse Source

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

Carsten Dominik 14 years ago
parent
commit
4ab9990b54
1 changed files with 6 additions and 7 deletions
  1. 6 7
      lisp/org-capture.el

+ 6 - 7
lisp/org-capture.el

@@ -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."