summaryrefslogtreecommitdiff
path: root/lisp/org/ob-tangle.el
diff options
context:
space:
mode:
authorBastien Guerry <bzg@gnu.org>2014-10-03 10:13:51 +0200
committerBastien Guerry <bzg@gnu.org>2014-10-03 10:13:51 +0200
commita81e5de3a34d27cea43d49ffdfd9755f0eddb262 (patch)
tree94d0e2b93f054d2cc9f7f7dc5423561ea3c00a2c /lisp/org/ob-tangle.el
parente197284d4789d7caa613fc406516f58fbec02547 (diff)
downloademacs-a81e5de3a34d27cea43d49ffdfd9755f0eddb262.tar.gz
Sync with Org 8.2.8.
Diffstat (limited to 'lisp/org/ob-tangle.el')
-rw-r--r--lisp/org/ob-tangle.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el
index 37b2d92a8cf..3a43b42e3ad 100644
--- a/lisp/org/ob-tangle.el
+++ b/lisp/org/ob-tangle.el
@@ -225,13 +225,14 @@ used to limit the exported source code blocks by language."
(concat base-name "." ext) base-name))))
(when file-name
;; Possibly create the parent directories for file.
- (when (let ((m (funcall get-spec :mkdirp)))
- (and m (not (string= m "no"))))
- (make-directory (file-name-directory file-name) 'parents))
+ (let ((m (funcall get-spec :mkdirp))
+ (fnd (file-name-directory file-name)))
+ (and m fnd (not (string= m "no"))
+ (make-directory fnd 'parents)))
;; delete any old versions of file
- (when (and (file-exists-p file-name)
- (not (member file-name (mapcar #'car path-collector))))
- (delete-file file-name))
+ (and (file-exists-p file-name)
+ (not (member file-name (mapcar #'car path-collector)))
+ (delete-file file-name))
;; drop source-block to file
(with-temp-buffer
(when (fboundp lang-f) (ignore-errors (funcall lang-f)))