This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX".
The branch, master has been updated via 5886c49d94ac761020bf2494afb42677987b3e90 (commit) from 13153baa51f35b04ca5411ae9dfb0a2c8f9bb405 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5886c49d94ac761020bf2494afb42677987b3e90 Author: Arash Esbati <esb...@gmx.de> Date: Fri May 13 09:07:53 2016 +0200 Improve the insertation of "macro" environment * style/doc.el (LaTeX-env-no-comment): Check if argument `environment' is "macro" and query/insert a name prefixed with `TeX-esc'. (LaTeX-doc-after-insert-macrocode): Add "macro" environment. ("doc"): Run `LaTeX-env-no-comment' when "macro" environment is inserted. Signed-off-by: Mosè Giordano <m...@gnu.org> diff --git a/style/doc.el b/style/doc.el index abd248d..6c98d66 100644 --- a/style/doc.el +++ b/style/doc.el @@ -31,7 +31,12 @@ (defun LaTeX-env-no-comment (environment) "Insert ENVIRONMENT and make sure there is no commented empty line inside." - (LaTeX-insert-environment environment) + (LaTeX-insert-environment environment + (when (string-equal environment "macro") + (let ((macroname (TeX-read-string + (TeX-argument-prompt nil nil "Macro") + TeX-esc))) + (format "{%s}" macroname)))) (unless (TeX-active-mark) (when (save-excursion (beginning-of-line) @@ -42,7 +47,7 @@ (defun LaTeX-doc-after-insert-macrocode (env start end) "Make sure the macrocode environment is properly formatted after insertion." - (when (TeX-member env '("macrocode" "macrocode*") 'string-equal) + (when (TeX-member env '("macro" "macrocode" "macrocode*") 'string-equal) (save-excursion (goto-char end) (skip-chars-backward " \t") @@ -70,7 +75,7 @@ "theglossary" '("macrocode" LaTeX-env-no-comment) '("macrocode*" LaTeX-env-no-comment) - '("macro" "Macro")) + '("macro" LaTeX-env-no-comment)) (TeX-add-symbols "EnableCrossrefs" "DisableCrossrefs" ----------------------------------------------------------------------- Summary of changes: style/doc.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) hooks/post-receive -- GNU AUCTeX
_______________________________________________ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs