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

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

[elpa] externals/auctex 79c8264 19/36: Fix query for defined colors in s


From: Tassilo Horn
Subject: [elpa] externals/auctex 79c8264 19/36: Fix query for defined colors in style/textpos.el
Date: Thu, 22 Dec 2016 13:08:12 +0000 (UTC)

branch: externals/auctex
commit 79c8264b3e41efa816c96d0f3955255a95055a35
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Fix query for defined colors in style/textpos.el
    
    * style/textpos.el ("textpos"): Use `cond' to check which color
    defining package is loaded and use the respective function for
    `completing-read'.
---
 style/textpos.el |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/style/textpos.el b/style/textpos.el
index 9c27ddd..e8a31e6 100644
--- a/style/textpos.el
+++ b/style/textpos.el
@@ -83,17 +83,23 @@ them."
     '("textblockcolour"
       (TeX-arg-eval
        (lambda ()
-        (let ((color (completing-read "Color name: "
-                                      (or (LaTeX-xcolor-definecolor-list)
-                                          (LaTeX-color-definecolor-list)))))
+        (let ((color (cond ((member "xcolor" (TeX-style-list))
+                            (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
+                           ((member "color" (TeX-style-list))
+                            (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
+                           (t
+                            (TeX-read-string "Color name: ")))))
           (format "%s" color)))))
 
     '("textblockrulecolour"
       (TeX-arg-eval
        (lambda ()
-        (let ((color (completing-read "Color name: "
-                                      (or (LaTeX-xcolor-definecolor-list)
-                                          (LaTeX-color-definecolor-list)))))
+        (let ((color (cond ((member "xcolor" (TeX-style-list))
+                            (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
+                           ((member "color" (TeX-style-list))
+                            (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
+                           (t
+                            (TeX-read-string "Color name: ")))))
           (format "%s" color)))))
 
    '("TPshowboxestrue")



reply via email to

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