branch: externals/auctex
commit 34eab00574bd4c81b6cd83fea43cf0a5db9229f9
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Improve indenting and filling in "Form" environments
* style/hyperref.el ("hyperref"): Add the "Form" environment to
`LaTeX-document-regexp'.
---
style/hyperref.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/style/hyperref.el b/style/hyperref.el
index 5ee8b31..02d886e 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -275,11 +275,12 @@
(LaTeX-add-environments
'("Form"))
- ;; Do not indent the content of the "Form"-env; it is odd if the whole
- ;; document is indented. Append to `LaTeX-indent-environment-list' in order
- ;; not to override custom settings.
- (make-local-variable 'LaTeX-indent-environment-list)
- (add-to-list 'LaTeX-indent-environment-list '("Form" current-indentation) t)
+ ;; Do not indent the content of the "Form"-env; it is odd if the
+ ;; whole document is indented. Append it to a local version of
+ ;; `LaTeX-document-regexp':
+ (unless (string-match-p "Form" LaTeX-document-regexp)
+ (set (make-local-variable 'LaTeX-document-regexp)
+ (concat LaTeX-document-regexp "\\|" "Form")))
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")