auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Change the default environment in some class styles


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] Change the default environment in some class styles
Date: Thu, 25 Apr 2013 19:52:59 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Mosè Giordano <address@hidden> writes:

> what do you think about the attached patch?  It defines a new variable
> with the name of the default environment when the current one is
> `document', without changing the value of `LaTeX-default-environment'
> following Mads' advice.  I believe it's really useful when using
> classes like beamer, in which one has to insert many times the same
> "outermost" (I hope this adjective is clear enough) environment.

Yes, I think that makes sense.

However, I don't like the name and description of the new variable.  The
"outermost" environment is always "document", so the term "outermost"
isn't appropriate.  How about `LaTeX-default-document-environment',
meaning the default environment directly below document?

Another nitpick: the "`document'" occurences in the docstrings below
suggest that the value of `LaTeX-default-environment' (or return value
of `LaTeX-current-environment') were symbols, but they are strings.  So
I'd write it "document".

--8<---------------cut here---------------start------------->8---
-  "*The default environment when creating new ones with `LaTeX-environment'."
+  "*The default environment when creating new ones with `LaTeX-environment'.
+It is overridden by `LaTeX-outermost-environment' when it is
+non-nil and the current environment is `document'."
   :group 'LaTeX-environment
   :type 'string)
- (make-variable-buffer-local 'LaTeX-default-environment)
+(make-variable-buffer-local 'LaTeX-default-environment)
+
+(defvar LaTeX-outermost-environment nil
+  "The default environment when creating new ones with
+`LaTeX-environment' and the current one is `document'.  This
+variable overrides `LaTeX-default-environment'.")
+(make-variable-buffer-local 'LaTeX-outermost-environment)
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]