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

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

[elpa] externals/auctex 3ca0106 08/95: Guard setcar with appropriate tes


From: Tassilo Horn
Subject: [elpa] externals/auctex 3ca0106 08/95: Guard setcar with appropriate test
Date: Sun, 16 Apr 2017 01:26:45 -0400 (EDT)

branch: externals/auctex
commit 3ca01062a578e1dd1c641ca34001b5e07a72936a
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Guard setcar with appropriate test
    
    * tex-jp.el (assoc): Replace second element of "BibTeX" and "Index" entries 
of
    `TeX-command-list' only if they are already there.  This variable is
    customizable and users may have removed them.  Reported by jfbu.
---
 tex-jp.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tex-jp.el b/tex-jp.el
index cfc37bf..e08d702 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -124,8 +124,11 @@ For detail, see `TeX-command-list', to which this list is 
appended."
              TeX-command-list))
 
 ;; $B;CDj=hCV!#(Btex.el $B$K<h$j9~$s$G$b$i$($k$H$h$$!#(B
-(setcar (cdr (assoc "BibTeX" TeX-command-list)) "%(bibtex) %s")
-(setcar (cdr (assoc "Index" TeX-command-list)) "%(makeindex) %s")
+;; Replace the entries only if they're already there.
+(when (assoc "BibTeX" TeX-command-list)
+  (setcar (cdr (assoc "BibTeX" TeX-command-list)) "%(bibtex) %s"))
+(when (assoc "Index" TeX-command-list)
+  (setcar (cdr (assoc "Index" TeX-command-list)) "%(makeindex) %s"))
 
 ;; $B;CDj=hCV!#(Btex.el $B$K<h$j9~$s$G$b$i$($k$H$h$$!#(B
 (setq TeX-expand-list



reply via email to

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