branch: externals/auctex commit 79c8264b3e41efa816c96d0f3955255a95055a35 Author: Arash Esbati <arash.esb...@gmail.com> Commit: Arash Esbati <arash.esb...@gmail.com>
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")