소스 검색

babel: can now tangle files without extensions

Dan Davison 15 년 전
부모
커밋
21849af58b
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      contrib/babel/lisp/org-babel-tangle.el

+ 4 - 3
contrib/babel/lisp/org-babel-tangle.el

@@ -102,9 +102,10 @@ exported source code blocks by language."
                                      ((> (length tangle) 0) tangle))
                                     target-file))
                      (file-name (when base-name
-                                  (if (string= base-name
-                                               (file-name-sans-extension base-name))
-                                      (concat base-name "." ext) base-name))))
+                                  (if (and ext
+                                          (string= base-name
+                                                   (file-name-sans-extension base-name)))
+                                     (concat base-name "." ext) base-name))))
                 ;; ;; debugging
                 ;; (message "tangle=%S base-name=%S file-name=%S"
                 ;;          tangle base-name file-name)