diff options
author | Bastien Guerry <bzg@altern.org> | 2011-08-23 16:27:56 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-08-23 16:27:56 +0200 |
commit | 76ab4dd422216ff2c574be4586ba161b8c40704e (patch) | |
tree | a7842adfaac492e77338bfe9e7bb96c2406c5cbb | |
parent | 98ae074c8af16dd2aa84f6b5307a94a9b9f66fe1 (diff) | |
download | org-mode-76ab4dd422216ff2c574be4586ba161b8c40704e.tar.gz |
org-table.el: Allow underscore in field and column names.
* org-table.el (org-table-get-specials): Allow the use of the
underscore character in column names.
(org-table-get-specials): Allow the use of the underscore
character in field names.
Thanks to AndrĂ¡s Major for bringing this up and to Nick Dokos
for a suggested fix.
-rw-r--r-- | lisp/org-table.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index 20eea6e..03b1126 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2166,7 +2166,7 @@ For all numbers larger than LIMIT, shift them by DELTA." cnt 1) (while (setq name (pop names)) (setq cnt (1+ cnt)) - (if (string-match "^[a-zA-Z][a-zA-Z0-9]*$" name) + (if (string-match "^[a-zA-Z][_a-zA-Z0-9]*$" name) (push (cons name (int-to-string cnt)) org-table-column-names)))) (setq org-table-column-names (nreverse org-table-column-names)) (setq org-table-column-name-regexp @@ -2190,7 +2190,7 @@ For all numbers larger than LIMIT, shift them by DELTA." (while (and fields1 (setq field (pop fields))) (setq v (pop fields1) col (1+ col)) (when (and (stringp field) (stringp v) - (string-match "^[a-zA-Z][a-zA-Z0-9]*$" field)) + (string-match "^[a-zA-Z][_a-zA-Z0-9]*$" field)) (push (cons field v) org-table-local-parameters) (push (list field line col) org-table-named-field-locations)))) ;; Analyse the line types @@ -2952,7 +2952,7 @@ them to individual field equations for each field." ((string-match "^@-?[-+I0-9]+\\$-?[0-9]+$" lhs) ;; This just refers to one fixed field (push e res)) - ((string-match "^[a-zA-Z][a-zA-Z0-9]*$" lhs) + ((string-match "^[a-zA-Z][_a-zA-Z0-9]*$" lhs) ;; This just refers to one fixed named field (push e res)) ((string-match "^@[0-9]+$" lhs) |