[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 075eab7 07/42: Improvements for tex-info.el
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 075eab7 07/42: Improvements for tex-info.el |
Date: |
Thu, 23 Nov 2017 06:06:06 -0500 (EST) |
branch: externals/auctex
commit 075eab75225ea89a4bebe214d1f2c683338e6e24
Author: Vincent Belaïche <address@hidden>
Commit: Tassilo Horn <address@hidden>
Improvements for tex-info.el
* tex-info.el (Texinfo-arg-nodename): Fix default prompt.
(Texinfo-arg-lrc): New function, used for commands that take Left,
Center, and Right entries for setting page header.
(Texinfo-arg-next-line): New function. Used to break line if need
be after entering command argument.
(Texinfo-arg-on|off): New function for entering boolean input.
(TeX-texinfo-mode): Add TeX symbols `allowcodebreak', `atchar',
`codequotebacktick', `codequoteundirected', `documentlanguage',
`documentencoding', `evenfooting', `evenheading', `everyfooting',
`everyheading', `LaTeX', `oddfooting', `oddheading',
`setchapternewpage', and `url'.
---
tex-info.el | 53 ++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 44 insertions(+), 9 deletions(-)
diff --git a/tex-info.el b/tex-info.el
index 7eb7970..c8bf86b 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -403,10 +403,38 @@ If DEFINITION is non-nil, then chosen node name is a node
name to be
added to the list of defined node names. Current implementation
ignored DEFINITION as the full document is scanned for node names at
each invocation."
- (let ((node-name (completing-read (TeX-argument-prompt optional prompt "Key")
+ (let ((node-name (completing-read (TeX-argument-prompt optional prompt
"Node")
(Texinfo-make-node-list))))
(insert "{" (Texinfo-nodename-escape node-name) "}" )))
+(defun Texinfo-arg-lrc (optional &rest args)
+ (let ((l (read-from-minibuffer "Enter left part: "))
+ (c (read-from-minibuffer "Enter center part: "))
+ (r (read-from-minibuffer "Enter right part: ")))
+ (insert " " l " @| " c " @| " r)))
+
+(defun Texinfo-arg-next-line (optional &rest args)
+ "Go to the beginning of next line if we are at the end of line. Otherwise
insert an end-of-line."
+ (if (eolp) (forward-line) (insert "\n")))
+
+(defun Texinfo-arg-on|off (optional &optional prompt style)
+ "Prompt for a boolean input.
+OPTIONAL is ignored.
+Use PROMPT as the prompt string.
+STYLE may be one of `:on|off' or `:true|false', if omitted `:on|off'
+is assumed by default."
+(let ((collection (cdr (assq style
+ '((nil . #1=("on" "off"))
+ (:on|off . #1#)
+ (:true|false "true" "false"))))))
+ (insert (if (y-or-n-p (TeX-argument-prompt optional prompt (concat (car
collection) ", not " (cadr collection))))
+ (car collection)
+ (cadr collection)))))
+
+(defun Texinfo-arg-choice (optional &optional prompt collection)
+ (insert (completing-read (TeX-argument-prompt optional prompt "Key")
+ collection)))
+
;; Silence the byte-compiler from warnings for variables and functions declared
;; in reftex.
(defvar reftex-section-levels-all)
@@ -682,12 +710,14 @@ value of `Texinfo-mode-hook'."
(TeX-add-symbols
'("acronym" "Acronym")
+ '("allowcodebreaks" (TeX-arg-literal " ") (Texinfo-arg-on|off nil
:true|false) (Texinfo-arg-next-line))
'("appendix" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("appendixsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("appendixsection" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("appendixsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("appendixsubsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("asis")
+ '("atchar" nil)
'("author" (TeX-arg-literal " ") (TeX-arg-free "Author"))
'("b" "Text")
'("bullet")
@@ -704,6 +734,8 @@ value of `Texinfo-mode-hook'."
'("cite" "Reference")
'("clear" (TeX-arg-literal " ") (TeX-arg-free "Flag"))
'("code" "Sample code")
+ '("codequotebacktick" (TeX-arg-literal " ") (Texinfo-arg-on|off)
(Texinfo-arg-next-line))
+ '("codequoteundirected" (TeX-arg-literal " ") (Texinfo-arg-on|off)
(Texinfo-arg-next-line))
'("command" "Command")
'("comment" (TeX-arg-literal " ") (TeX-arg-free "Comment"))
'("contents")
@@ -712,15 +744,17 @@ value of `Texinfo-mode-hook'."
'("defindex" (TeX-arg-literal " ") (TeX-arg-free "Index name"))
'("dfn" "Term")
'("dmn" "Dimension")
+ '("documentlanguage" (TeX-arg-literal " ") (Texinfo-arg-choice "Language"
("ca" "cs" "de" "en" "es" "fr" "hu" "is" "it" "ja" "nb" "nl" "nn" "pl" "pt"
"ru" "sr" "tr" "uk")) (Texinfo-arg-next-line))
+ '("documentencoding" (TeX-arg-literal " ") (Texinfo-arg-choice "Encoding"
("US-ASCII" "UTF-8" "ISO-8859-1" "ISO-8859-15" "ISO-8859-2" "koi8-r" "koi8-u"))
(Texinfo-arg-next-line))
'("dots" nil)
'("emph" "Text")
'("email" "Email address")
'("equiv" nil)
'("error")
- '("evenfooting" Texinfo-lrc-argument-hook)
- '("evenheading" Texinfo-lrc-argument-hook)
- '("everyfooting" Texinfo-lrc-argument-hook)
- '("everyheading" Texinfo-lrc-argument-hook)
+ '("evenfooting" Texinfo-arg-lrc)
+ '("evenheading" Texinfo-arg-lrc)
+ '("everyfooting" Texinfo-arg-lrc)
+ '("everyheading" Texinfo-arg-lrc)
'("exdent" (TeX-arg-literal " ") (TeX-arg-free "Line of text"))
'("expansion" nil)
'("file" "Filename")
@@ -744,6 +778,7 @@ value of `Texinfo-mode-hook'."
'("kbd" "Keyboard characters")
'("key" "Key name")
'("kindex" (TeX-arg-literal " ") (TeX-arg-free "Entry"))
+ '("LaTeX" nil)
'("lowersections" 0)
'("majorheading" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("menu")
@@ -754,8 +789,8 @@ value of `Texinfo-mode-hook'."
(TeX-arg-literal ", ") (TeX-arg-free "Previous")
(TeX-arg-literal ", ") (TeX-arg-free "Up"))
'("noindent")
- '("oddfooting" Texinfo-lrc-argument-hook)
- '("oddheading" Texinfo-lrc-argument-hook)
+ '("oddfooting" Texinfo-arg-lrc)
+ '("oddheading" Texinfo-arg-lrc)
'("page")
'("paragraphindent" (TeX-arg-literal " ") (TeX-arg-free "Indent"))
'("pindex" "Entry")
@@ -774,8 +809,7 @@ value of `Texinfo-mode-hook'."
'("sc" "Text")
'("section" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("set" (TeX-arg-literal " ") (TeX-arg-free "Flag"))
- ;; XXX: Would be nice with completion.
- '("setchapternewpage" (TeX-arg-literal " ") (TeX-arg-free "On off odd"))
+ '("setchapternewpage" (TeX-arg-literal " ") (Texinfo-arg-choice "On off
odd" ("on" "off" "odd")) (Texinfo-arg-next-line))
'("setfilename" (TeX-arg-literal " ") (TeX-arg-free "Info file name"))
'("settitle" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("shortcontents")
@@ -809,6 +843,7 @@ value of `Texinfo-mode-hook'."
'("unnumberedsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("unnumberedsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
'("unnumberedsubsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title"))
+ '("url" "Link")
'("value" "Flag")
'("var" "Metasyntactic variable")
'("vindex" (TeX-arg-literal " ") (TeX-arg-free "Entry"))
- [elpa] externals/auctex updated (c576c01 -> 5f007f1), Tassilo Horn, 2017/11/23
- [elpa] externals/auctex f73ccfe 03/42: * style/amsthm.el ("amsthm"): Use `LaTeX-amsthm-env-label'., Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 8337345 02/42: ; * style/minted.el: Fix header., Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 17d86b5 01/42: Conform to elisp coding convention in context.el, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 90a2c29 06/42: Use #' to quote function names, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex f3180f8 10/42: Fix doc string and indent, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 2ed9d93 09/42: Add %(PDF) when undumped format is used in preview-latex, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 433b5f9 15/42: Parse package/class option with comments correctly, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 01224b6 11/42: Add test for my commit on Aug 18, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex bfaa079 14/42: Conform to elisp coding convention, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 075eab7 07/42: Improvements for tex-info.el,
Tassilo Horn <=
- [elpa] externals/auctex aaf22a9 08/42: Add new style/arabxetex.el, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex cf0ff70 16/42: Add test for infinite loop, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 9e5e5f6 20/42: ; * tex.el (TeX-doc-backend-alist): Use `TeX-search-files-by-type'., Tassilo Horn, 2017/11/23
- [elpa] externals/auctex b43ec94 04/42: * style/XCharter.el ("XCharter"): Update to package v1.094 from 2017/08/08., Tassilo Horn, 2017/11/23
- [elpa] externals/auctex ff07544 05/42: Delay setting Japanese TeX engine in `japanese-latex-mode', Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 6dcf0e1 18/42: Add a new option for evince compatible viewer., Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 7863f42 13/42: Prevent possible infinite loop, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex cfad977 17/42: Make correct extensions are returned, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex 5a538cb 19/42: Prevent possible truncation of list value, Tassilo Horn, 2017/11/23
- [elpa] externals/auctex a944077 12/42: Use `delete' correctly for list variable, Tassilo Horn, 2017/11/23