浏览代码

Minor fixed for the previous commit

Carsten Dominik 15 年之前
父节点
当前提交
6bc0ec12ce
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      lisp/org-exp.el

+ 11 - 1
lisp/org-exp.el

@@ -1840,7 +1840,17 @@ When it is nil, all comments will be removed."
   (goto-char (point-min))
   (while (re-search-forward "^[ \t]*|" nil t)
     (beginning-of-line 1)
-    (if (looking-at "[ \t]*| *[!_^] *|")
+    (if (or (looking-at "[ \t]*| *[!_^] *|")
+	    (memq
+	     nil
+	     (mapcar
+	      (lambda (f)
+		(or (= (length f) 0)
+		    (string-match
+		     "\\`<\\([0-9]\\|[rl]\\|[rl][0-9]+\\)>\\'" f)))
+	      (org-split-string ;; FIXME, can't we do this without splitting???
+	       (buffer-substring (point-at-bol) (point-at-eol))
+	       "[ \t]*|[ \t]*"))))
 	(delete-region (max (point-min) (1- (point-at-bol)))
 		       (point-at-eol))
       (end-of-line 1))))