I have one more suggestion for `LaTeX-env-document': prevent
documentclass from being inserted, if there's already one present in the
file. At least I find it somewhat annoying to be prompted for it.
--
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
My brain is my second favorite organ.
-- Woody Allen
--- latex.el 30 Dec 2012 19:47:08 +0100 5.476
+++ latex.el 02 Jan 2013 13:02:43 +0100
@@ -764,7 +764,10 @@
(defun LaTeX-env-document (&optional ignore)
"Create new LaTeX document.
The compatibility argument IGNORE is ignored."
- (TeX-insert-macro "documentclass")
+ (save-excursion
+ (unless (re-search-backward "^\\\\documentclass.*{" nil t)
+ (TeX-insert-macro "documentclass")))
(LaTeX-newline)
(LaTeX-newline)
(LaTeX-newline)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ auctex-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex-devel
