0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-20 07:26:30 +00:00

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> 2009-07-01 Carsten Dominik <carsten.dominik@gmail.com>
* org-footnote.el (org-footnote-renumber-fn:N): New command. * 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 (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(if (re-search-forward (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) nil t)
(setq buffer (current-buffer) loc (match-beginning 0)) (setq buffer (current-buffer) loc (match-beginning 0))
(setq id-loc (org-id-find name-or-id 'marker) (setq id-loc (org-id-find name-or-id 'marker))
buffer (marker-buffer id-loc) (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)) loc (marker-position id-loc))
(move-marker id-loc nil))) (move-marker id-loc nil)))
(switch-to-buffer buffer) (switch-to-buffer buffer)

View file

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