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

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

[elpa] externals/auctex cfad977 17/42: Make correct extensions are retur


From: Tassilo Horn
Subject: [elpa] externals/auctex cfad977 17/42: Make correct extensions are returned
Date: Thu, 23 Nov 2017 06:06:10 -0500 (EST)

branch: externals/auctex
commit cfad977c8747bc72c38533470d00dfa99a0238e0
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Make correct extensions are returned
    
    * style/graphicx.el (LaTeX-includegraphics-extensions):
    Fix misaligned form structure which prevented `cond' to enter clauses
    for engines other than default.
    Use copied list for the last argument of `append' so that
    `delete-dups' does not alter the value of
    `LaTeX-includegraphics-extensions'.
    Use `delete' rather than `remove' for copied sequence.
    ():
    (LaTeX-includegraphics-read-file-relative):
    Fix typos.
---
 style/graphicx.el | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/style/graphicx.el b/style/graphicx.el
index 4fcdc17..6ba58e4 100644
--- a/style/graphicx.el
+++ b/style/graphicx.el
@@ -23,7 +23,7 @@
 
 ;;; Commentary:
 
-;;  This package supports the includegraphcics macro in graphicx style.
+;;  This package supports the includegraphics macro in graphicx style.
 
 ;; Acknowledgements
 ;;  Dr. Thomas Baumann <address@hidden>
@@ -110,22 +110,22 @@ key-val's."
   (let* ((temp (copy-sequence LaTeX-includegraphics-extensions))
         (LaTeX-includegraphics-extensions
          (cond (;; 'default TeX-engine:
-                (if (and (eq TeX-engine 'default)
-                         ;; we want to produce a pdf
-                         (if TeX-PDF-mode
-                             ;; Return t if default compiler produces PDF,
-                             ;; nil for "Dvips" or "Dvipdfmx"
-                             (not (TeX-PDF-from-DVI))
-                           ;; t if pdftex is used in dvi-mode
-                           TeX-DVI-via-PDFTeX))
+                (eq TeX-engine 'default)
+                (if ;; we want to produce a pdf
+                    (if TeX-PDF-mode
+                        ;; Return t if default compiler produces PDF,
+                        ;; nil for "Dvips" or "Dvipdfmx"
+                        (not (TeX-PDF-from-DVI))
+                      ;; t if pdftex is used in dvi-mode
+                      TeX-DVI-via-PDFTeX)
                     ;; We're using pdflatex in pdf-mode
                     (delete-dups
                      (append LaTeX-includegraphics-pdftex-extensions
-                             LaTeX-includegraphics-extensions))
+                             temp))
                   ;; We're generating a .dvi to process with dvips or dvipdfmx
                   (progn
                     (dolist (x '("jpe?g" "pdf" "png"))
-                      (setq temp (remove x temp)))
+                      (setq temp (delete x temp)))
                     (delete-dups
                      (append LaTeX-includegraphics-dvips-extensions
                              temp)))))
@@ -134,20 +134,20 @@ key-val's."
                 (if TeX-PDF-mode
                     (delete-dups
                      (append LaTeX-includegraphics-pdftex-extensions
-                             LaTeX-includegraphics-extensions))
+                             temp))
                   (progn
                     (dolist (x '("jpe?g" "pdf" "png"))
-                      (setq temp (remove x temp)))
+                      (setq temp (delete x temp)))
                     (delete-dups
                      (append LaTeX-includegraphics-dvips-extensions
                              temp)))))
                ;; Running xetex in any mode:
                ((eq TeX-engine 'xetex)
                 (delete-dups (append LaTeX-includegraphics-xetex-extensions
-                                     LaTeX-includegraphics-extensions)))
+                                     temp)))
                ;; For anything else
                (t
-                LaTeX-includegraphics-extensions))))
+                temp))))
     (concat "\\."
            (mapconcat 'identity
                       (or list LaTeX-includegraphics-extensions)
@@ -175,7 +175,7 @@ doesn't works with Emacs 21.3 or XEmacs.  See
   (file-relative-name
    (read-file-name
     "Image file: " nil nil nil nil
-    ;; FIXME: Emacs 21.3 and XEmacs 21.4.15 dont have PREDICATE as the sixth
+    ;; FIXME: Emacs 21.3 and XEmacs 21.4.15 don't have PREDICATE as the sixth
     ;; argument (Emacs 21.3: five args; XEmacs 21.4.15: sixth is HISTORY).
     (lambda (fname)
       (or (file-directory-p fname)



reply via email to

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