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

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

[elpa] externals/org 795783d644 4/5: ox-latex: Remove unused argument


From: ELPA Syncer
Subject: [elpa] externals/org 795783d644 4/5: ox-latex: Remove unused argument
Date: Sat, 17 Sep 2022 07:57:55 -0400 (EDT)

branch: externals/org
commit 795783d6445c279589640f292563f18ad451f20c
Author: TEC <git@tecosaur.net>
Commit: TEC <git@tecosaur.net>

    ox-latex: Remove unused argument
    
    * lisp/ox-latex.el (org-latex-template,
    org-latex-generate-engraved-preamble): The second argument of
    `org-latex-generate-engraved-preamble' is only ever t, so there's not
    much point in having it.
    
    * lisp/ox-beamer.el (org-beamer-template): Update to not call
    `org-latex-generate-engraved-preamble' with the second argument.
---
 lisp/ox-beamer.el |  2 +-
 lisp/ox-latex.el  | 69 ++++++++++++++++++++++++++-----------------------------
 2 files changed, 33 insertions(+), 38 deletions(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 108392bd6f..51684448d6 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -875,7 +875,7 @@ holding export options."
                 (org-element-map (plist-get info :parse-tree)
                     '(src-block inline-src-block) #'identity
                     info t))
-       (org-latex-generate-engraved-preamble info t))
+       (org-latex-generate-engraved-preamble info))
      ;; Document start.
      "\\begin{document}\n\n"
      ;; Title command.
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index a74f7c915a..fe484a20c3 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1308,42 +1308,37 @@ which are given by `org-latex-engraved-preamble' and
                   "plaintop" "plain"))
              t t
              engraved-preamble)))
-    (if syntax-colours-p
-        (concat
-         "\n% Setup for code blocks [1/2]\n\n"
-         engraved-preamble
-         "\n\n% Setup for code blocks [2/2]: syntax highlighting colors\n\n"
-         (if (require 'engrave-faces-latex nil t)
-             (if engraved-themes
-                 (concat
-                  (mapconcat
-                   (lambda (theme)
-                     (format
-                      "\n\\newcommand{\\engravedtheme%s}{%%\n%s\n}"
-                      (replace-regexp-in-string "[^A-Za-z]" "" theme)
-                      (replace-regexp-in-string
-                       "newcommand" "renewcommand"
-                       (replace-regexp-in-string
-                        "#" "##"
-                        (funcall gen-theme-spec theme)))))
-                   engraved-themes
-                   "\n")
-                  "\n\n"
-                  (cond
-                   ((memq engraved-theme engraved-themes)
-                    (concat "\\engravedtheme"
-                            (replace-regexp-in-string
-                             "[^A-Za-z]" "" engraved-theme)
-                            "\n"))
-                   (t (funcall gen-theme-spec engraved-theme))))
-               (funcall gen-theme-spec engraved-theme))
-           (message "Cannot engrave source blocks. Consider installing 
`engrave-faces'.")
-           "% WARNING syntax highlighting unavailable as engrave-faces-latex 
was missing.\n")
-         "\n")
-      (concat
-       "\n% Setup for code blocks\n\n"
-       engraved-preamble
-       "\n"))))
+    (concat
+     "\n% Setup for code blocks [1/2]\n\n"
+     engraved-preamble
+     "\n\n% Setup for code blocks [2/2]: syntax highlighting colors\n\n"
+     (if (require 'engrave-faces-latex nil t)
+         (if engraved-themes
+             (concat
+              (mapconcat
+               (lambda (theme)
+                 (format
+                  "\n\\newcommand{\\engravedtheme%s}{%%\n%s\n}"
+                  (replace-regexp-in-string "[^A-Za-z]" "" theme)
+                  (replace-regexp-in-string
+                   "newcommand" "renewcommand"
+                   (replace-regexp-in-string
+                    "#" "##"
+                    (funcall gen-theme-spec theme)))))
+               engraved-themes
+               "\n")
+              "\n\n"
+              (cond
+               ((memq engraved-theme engraved-themes)
+                (concat "\\engravedtheme"
+                        (replace-regexp-in-string
+                         "[^A-Za-z]" "" engraved-theme)
+                        "\n"))
+               (t (funcall gen-theme-spec engraved-theme))))
+           (funcall gen-theme-spec engraved-theme))
+       (message "Cannot engrave source blocks. Consider installing 
`engrave-faces'.")
+       "% WARNING syntax highlighting unavailable as engrave-faces-latex was 
missing.\n")
+     "\n")))
 
 ;;;; Compilation
 
@@ -1999,7 +1994,7 @@ holding export options."
                 (org-element-map (plist-get info :parse-tree)
                     '(src-block inline-src-block) #'identity
                     info t))
-       (org-latex-generate-engraved-preamble info t))
+       (org-latex-generate-engraved-preamble info))
      ;; Document start.
      "\\begin{document}\n\n"
      ;; Title command.



reply via email to

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