[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa d6b107e 33/51: Improve style/doc.el
From: |
Tassilo Horn |
Subject: |
[elpa] elpa d6b107e 33/51: Improve style/doc.el |
Date: |
Sun, 22 May 2016 07:22:49 +0000 (UTC) |
branch: elpa
commit d6b107e74ecbe532016bbbbf93be18790a9688c5
Author: Arash Esbati <address@hidden>
Commit: Mosè Giordano <address@hidden>
Improve style/doc.el
* style/doc.el ("doc"): Do not indent the content inside the "macro"
environment.
Insert a pair of braces after "DoNotIndex", "StopEventually",
"MacroFont", "AltMacroFont".
Prefix the string read with TeX-esc when inserting
"DescribeMacro", "cmd".
Ask for an argument ("parg", "oarg", "marg", "meta").
Add missing macro "cs".
Delete dups ("MacroFont", "AltMacroFont", "theCodelineNo").
Ask for .fdd and .dtx files to input or include ("DocInput",
"DocInclude").
Add lengths "MacrocodeTopsep", "MacroTopsep", "MacroIndent".
Signed-off-by: Mosè Giordano <address@hidden>
---
style/doc.el | 63 ++++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 46 insertions(+), 17 deletions(-)
diff --git a/style/doc.el b/style/doc.el
index 3176368..abd248d 100644
--- a/style/doc.el
+++ b/style/doc.el
@@ -1,6 +1,6 @@
;;; doc.el --- AUCTeX style for `doc.sty'
-;; Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2008, 2016 Free Software Foundation, Inc.
;; Author: Frank K�ster <address@hidden>
;; Maintainer: address@hidden
@@ -62,6 +62,8 @@
'("macrocode" current-indentation))
(add-to-list 'LaTeX-indent-environment-list
'("macrocode*" current-indentation))
+ (add-to-list 'LaTeX-indent-environment-list
+ '("macro" current-indentation))
(add-hook 'LaTeX-after-insert-env-hooks 'LaTeX-doc-after-insert-macrocode
nil t)
(LaTeX-add-environments
@@ -72,24 +74,33 @@
(TeX-add-symbols
"EnableCrossrefs"
"DisableCrossrefs"
- "DoNotIndex"
+ '("DoNotIndex" t)
"DontCheckModules"
"CheckModules"
"Module"
- '("DescribeMacro" "Macro")
+ '("DescribeMacro" (TeX-arg-eval
+ (lambda ()
+ (let ((name (TeX-read-string
+ (TeX-argument-prompt optional nil "Macro")
+ TeX-esc)))
+ (format "%s" name)))))
'("DescribeEnv" "Environment")
"verbatim"
"verb"
- "parg"
- "oarg"
- "marg"
- "meta"
- "cmd"
+ '("parg" "Argument")
+ '("oarg" "Argument")
+ '("marg" "Argument")
+ '("meta" "Text")
+ '("cs" "Name")
+ '("cmd" (TeX-arg-eval
+ (lambda ()
+ (let ((name (TeX-read-string
+ (TeX-argument-prompt optional nil "Name")
+ TeX-esc)))
+ (format "%s" name)))))
"makelabel"
- "MacroFont"
- "MacroFont"
- "AltMacroFont"
- "AltMacroFont"
+ '("MacroFont" t)
+ '("AltMacroFont" t)
"PrintMacroName"
"PrintDescribeMacro"
"PrintDescribeEnv"
@@ -126,7 +137,7 @@
"GlossaryParms"
"PrintChanges"
"AlsoImplementation"
- "StopEventually"
+ '("StopEventually" t)
"OnlyDescription"
"Finale"
"IndexInput"
@@ -142,16 +153,34 @@
"CodelineIndex"
"PageIndex"
"theCodelineNo"
- "theCodelineNo"
"DocstyleParms"
"MakePercentIgnore"
"MakePercentComment"
- "DocInput"
- "DocInclude"
+ '("DocInput"
+ (TeX-arg-eval
+ (lambda ()
+ (let ((file (file-relative-name
+ (read-file-name
+ "File to input: " nil nil nil nil
+ (lambda (x)
+ (string-match "\\.fdd$\\|\\.dtx$" x)))
+ (TeX-master-directory))))
+ (format "%s" file)))))
+ '("DocInclude"
+ (TeX-arg-eval
+ (lambda ()
+ (let ((file (file-relative-name
+ (read-file-name
+ "File to include: " nil nil nil nil
+ (lambda (x)
+ (string-match "\\.fdd$\\|\\.dtx$" x)))
+ (TeX-master-directory))))
+ (format "%s" file)))))
"GetFileInfo"
"filename"
"fileinfo")
- (TeX-run-style-hooks "shortvrb"))
+ (TeX-run-style-hooks "shortvrb")
+ (LaTeX-add-lengths "MacrocodeTopsep" "MacroTopsep" "MacroIndent"))
LaTeX-dialect)
;; Local Variables:
- [elpa] elpa e90e050 34/51: Insert braces after some macros and \relax after \ProcessOptions, (continued)
- [elpa] elpa e90e050 34/51: Insert braces after some macros and \relax after \ProcessOptions, Tassilo Horn, 2016/05/22
- [elpa] elpa 0a3632e 45/51: Adjust query commands for loading by xcolor.el, Tassilo Horn, 2016/05/22
- [elpa] elpa adf998c 25/51: Replace TeX-PDF-via-dvips-ps2pdf with TeX-PDF-from-DVI, Tassilo Horn, 2016/05/22
- [elpa] elpa 3e93869 43/51: Add new style/xcolor.el, Tassilo Horn, 2016/05/22
- [elpa] elpa ae6ed8b 06/51: TikZ: make `TeX-TikZ-single-macro-arg' prompt required., Tassilo Horn, 2016/05/22
- [elpa] elpa d83900b 09/51: TikZ: Make '+' and '++' prefixes apply to TikZ points, Tassilo Horn, 2016/05/22
- [elpa] elpa ae6cb79 26/51: Reword documentation of TeX-PDF-from-DVI, Tassilo Horn, 2016/05/22
- [elpa] elpa 1c397d5 29/51: Fix TeX-error-overview-make-entries, Tassilo Horn, 2016/05/22
- [elpa] elpa e092f72 35/51: Use commit date to determine package date, Tassilo Horn, 2016/05/22
- [elpa] elpa 7b41d77 38/51: Adapt for upLaTeX, Tassilo Horn, 2016/05/22
- [elpa] elpa d6b107e 33/51: Improve style/doc.el,
Tassilo Horn <=
- [elpa] elpa cf54f7d 49/51: Make ChangeLog UTF-8, Tassilo Horn, 2016/05/22
- [elpa] elpa ebf4b8a 51/51: Release GNU AUCTeX 11.89.4, Tassilo Horn, 2016/05/22
- [elpa] elpa 8c6f901 48/51: Append environment indentation rules to LaTeX-indent-environment-list, Tassilo Horn, 2016/05/22
- [elpa] elpa e78a13c 03/51: * tex-buf.el: Address some compiler warnings, Tassilo Horn, 2016/05/22
- [elpa] elpa 8ed465a 50/51: Merge branch 'master' into elpa, Tassilo Horn, 2016/05/22