From be30c8b126cf7e9da1498f83aa8b07d465205111 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 14 Jun 2017 19:11:33 +0200 Subject: [PATCH] ox-texinfo: Change default table markup * lisp/ox-texinfo.el (org-texinfo-table-default-markup): Rename from `org-texinfo-def-table-markup'. Set default value to the neutral "@asis". (org-texinfo-plain-list): Use new name. * lisp/org-compat.el (org-texinfo-def-table-markup): Mark as obsolete. * doc/org.texi (Publishing options): Document change. --- doc/org.texi | 2 +- lisp/org-compat.el | 3 +++ lisp/ox-texinfo.el | 13 ++++++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 860c0fb1c..df95cf803 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -14558,7 +14558,7 @@ however, override everything. @item @code{:texinfo-active-timestamp-format} @tab @code{org-texinfo-active-timestamp-format} @item @code{:texinfo-classes} @tab @code{org-texinfo-classes} @item @code{:texinfo-class} @tab @code{org-texinfo-default-class} -@item @code{:texinfo-def-table-markup} @tab @code{org-texinfo-def-table-markup} +@item @code{:texinfo-table-default-markup} @tab @code{org-texinfo-table-default-markup} @item @code{:texinfo-diary-timestamp-format} @tab @code{org-texinfo-diary-timestamp-format} @item @code{:texinfo-filename} @tab @code{org-texinfo-filename} @item @code{:texinfo-format-drawer-function} @tab @code{org-texinfo-format-drawer-function} diff --git a/lisp/org-compat.el b/lisp/org-compat.el index f68d310ee..ca0181c49 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -372,6 +372,9 @@ use of this function is for the stuck project list." (define-obsolete-variable-alias 'org-usenet-links-prefer-google 'org-gnus-prefer-web-links "Org 9.1") +(define-obsolete-variable-alias 'org-texinfo-def-table-markup + 'org-texinfo-table-default-markup "Org 9.1") + ;;;; Obsolete link types diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 2b2c8b17f..01a310438 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -113,7 +113,7 @@ (:texinfo-link-with-unknown-path-format nil nil org-texinfo-link-with-unknown-path-format) (:texinfo-tables-verbatim nil nil org-texinfo-tables-verbatim) (:texinfo-table-scientific-notation nil nil org-texinfo-table-scientific-notation) - (:texinfo-def-table-markup nil nil org-texinfo-def-table-markup) + (:texinfo-table-default-markup nil nil org-texinfo-table-default-markup) (:texinfo-text-markup-alist nil nil org-texinfo-text-markup-alist) (:texinfo-format-drawer-function nil nil org-texinfo-format-drawer-function) (:texinfo-format-inlinetask-function nil nil org-texinfo-format-inlinetask-function))) @@ -279,15 +279,18 @@ When nil, no transformation is made." (string :tag "Format string") (const :tag "No formatting" nil))) -(defcustom org-texinfo-def-table-markup "@samp" +(defcustom org-texinfo-table-default-markup "@asis" "Default markup for first column in two-column tables. This should an indicating command, e.g., \"@code\", \"@kbd\" or -\"@asis\". +\"@samp\". It can be overridden locally using the \":indic\" attribute." :group 'org-export-texinfo - :type 'string) + :type 'string + :version "26.1" + :package-version '(Org . "9.1") + :safe #'stringp) ;;;; Text markup @@ -1250,7 +1253,7 @@ CONTENTS is the contents of the list. INFO is a plist holding contextual information." (let* ((attr (org-export-read-attribute :attr_texinfo plain-list)) (indic (let ((i (or (plist-get attr :indic) - (plist-get info :texinfo-def-table-markup)))) + (plist-get info :texinfo-table-default-markup)))) ;; Allow indicating commands with missing @ sign. (if (string-prefix-p "@" i) i (concat "@" i)))) (table-type (plist-get attr :table-type))