emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 77/299: * latex.el (TeX-arg-document): Search for LaTeX classes.


From: Stefan Monnier
Subject: [elpa] 77/299: * latex.el (TeX-arg-document): Search for LaTeX classes.
Date: Sun, 02 Nov 2014 03:10:27 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit 448b75dd11a3a2fb48964c173d7310541256b1bb
Author: Tassilo Horn <address@hidden>
Date:   Tue Apr 2 07:22:29 2013 +0000

    * latex.el (TeX-arg-document): Search for LaTeX classes.
---
 ChangeLog |    4 ++++
 latex.el  |   26 +++++++++++++++++---------
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eaedaa1..ca24cf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-29  Mos� Giordano  <address@hidden>
+
+       * latex.el (TeX-arg-document): Search for LaTeX classes.
+
 2013-03-28  Mos� Giordano  <address@hidden>
 
        * style/biblatex.el (LaTeX-biblatex-package-options): Correct name
diff --git a/latex.el b/latex.el
index c06e365..ada12d4 100644
--- a/latex.el
+++ b/latex.el
@@ -1737,15 +1737,23 @@ string."
 (defun TeX-arg-document (optional &optional ignore)
   "Insert arguments to documentclass.
 OPTIONAL and IGNORE are ignored."
-  (let ((style (completing-read
-               (concat "Document class: (default " LaTeX-default-style ") ")
-               LaTeX-style-list))
-       (options (read-string "Options: "
-                             (if (stringp LaTeX-default-options)
-                                 LaTeX-default-options
-                               (mapconcat 'identity
-                                          LaTeX-default-options
-                                          ",")))))
+  (let* ((TeX-file-extensions '("cls"))
+        (search (if (eq TeX-arg-input-file-search 'ask)
+                    (not (y-or-n-p "Find class yourself? "))
+                  TeX-arg-input-file-search))
+        (LaTeX-style-list
+         (if search
+             (mapcar 'identity (TeX-search-files-by-type 'texinputs 'global t 
t))
+           LaTeX-style-list))
+        (style (completing-read
+                (concat "Document class: (default " LaTeX-default-style ") ")
+                LaTeX-style-list))
+        (options (read-string "Options: "
+                              (if (stringp LaTeX-default-options)
+                                  LaTeX-default-options
+                                (mapconcat 'identity
+                                           LaTeX-default-options
+                                           ",")))))
     (if (zerop (length style))
        (setq style LaTeX-default-style))
     (if (not (zerop (length options)))



reply via email to

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