Tables: Allow #+TABNAME to be indented

This commit is contained in:
Carsten Dominik 2009-07-02 08:42:24 +02:00
parent 840c74162c
commit 9a6261df78
3 changed files with 20 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2009-07-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-table.el (org-table-get-remote-range): Find #+TBLNAME also
when indented.
* org.el (org-fontify-meta-lines-and-blocks): Make #+TBLNAME
highlight also when indented.
2009-07-01 Carsten Dominik <carsten.dominik@gmail.com>
* org-footnote.el (org-footnote-renumber-fn:N): New command.

View File

@ -4184,11 +4184,13 @@ list of the fields in the rectangle ."
(save-excursion
(goto-char (point-min))
(if (re-search-forward
(concat "^#\\+TBLNAME:[ \t]*" (regexp-quote name-or-id) "[ \t]*$")
(concat "^#[ \t]*\\+TBLNAME:[ \t]*" (regexp-quote name-or-id) "[ \t]*$")
nil t)
(setq buffer (current-buffer) loc (match-beginning 0))
(setq id-loc (org-id-find name-or-id 'marker)
buffer (marker-buffer id-loc)
(setq id-loc (org-id-find name-or-id 'marker))
(unless (and id-loc (markerp id-loc))
(error "Can't find remote table \"%s\"" name-or-id))
(setq buffer (marker-buffer id-loc)
loc (marker-position id-loc))
(move-marker id-loc nil)))
(switch-to-buffer buffer)

View File

@ -4236,7 +4236,7 @@ will be prompted for."
beg (match-end 0)
'(font-lock-fontified t face org-meta-line))
t)
((or (member dc1 '("caption:" "label:" "orgtbl:" "tblfm:"))
((or (member dc1 '("caption:" "label:" "orgtbl:" "tblfm:" "tblname:"))
(and (match-end 4) (equal dc3 "attr")))
(add-text-properties
beg (match-end 0)
@ -8714,16 +8714,18 @@ This function can be used in a hook."
;;;; Completion
(defconst org-additional-option-like-keywords
'("BEGIN_HTML" "BEGIN_LaTeX" "END_HTML" "END_LaTeX"
"ORGTBL" "HTML:" "LaTeX:" "BEGIN:" "END:" "TBLFM"
"LATEX_HEADER:"
'("BEGIN_HTML" "END_HTML" "HTML:" "ATTR_HTML"
"BEGIN_DocBook" "END_DocBook" "DocBook:" "ATTR_DocBook"
"BEGIN_LaTeX" "END_LaTeX" "LaTeX:" "LATEX_HEADER:" "ATTR_LaTeX"
"BEGIN:" "END:"
"ORGTBL" "TBLFM:" "TBLNAME:"
"BEGIN_EXAMPLE" "END_EXAMPLE"
"BEGIN_QUOTE" "END_QUOTE"
"BEGIN_VERSE" "END_VERSE"
"BEGIN_CENTER" "END_CENTER"
"BEGIN_SRC" "END_SRC"
"CATEGORY" "COLUMNS"
"CAPTION" "LABEL" "ATTR_HTML" "ATTR_LaTeX"))
"CAPTION" "LABEL"))
(defcustom org-structure-template-alist
'(