org-exp.el: Allow to use #+include with no column.

* org-exp.el (org-export-handle-include-files): Allow to use
#+include with no column.

Thanks to Albert for spotting this.
This commit is contained in:
Bastien Guerry 2012-05-19 10:25:19 +02:00
parent 595d451280
commit 584b869d38
2 changed files with 2 additions and 2 deletions

View File

@ -2412,7 +2412,7 @@ TYPE must be a string, any of:
(let ((case-fold-search t)
params file markup lang start end prefix prefix1 switches all minlevel currentlevel addlevel lines)
(goto-char (point-min))
(while (re-search-forward "^#\\+INCLUDE:?[ \t]+\\(.*\\)" nil t)
(while (re-search-forward "^#\\+include:?[ \t]+\\(.*\\)" nil t)
(setq params (read (concat "(" (match-string 1) ")"))
prefix (org-get-and-remove-property 'params :prefix)
prefix1 (org-get-and-remove-property 'params :prefix1)

View File

@ -1122,7 +1122,7 @@ so that the file including them will be republished as well."
(setq buf (find-file (expand-file-name filename)))
(with-current-buffer buf
(goto-char (point-min))
(while (re-search-forward "^#\\+include:[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t)
(while (re-search-forward "^#\\+include:?[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t)
(let* ((included-file (expand-file-name (match-string 1))))
(add-to-list 'included-files-ctime
(org-publish-cache-ctime-of-src included-file) t))))