summaryrefslogtreecommitdiff
path: root/lisp/facemenu.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2011-10-18 16:31:27 +0200
committerJuanma Barranquero <lekktu@gmail.com>2011-10-18 16:31:27 +0200
commit343a34ff0b237779f41c9164dd4eeb3454d59703 (patch)
tree612aa3f430ebb08989c1879c41b851a6eeda6069 /lisp/facemenu.el
parent97d0a92c79a5190291ae46dac668b0031ce6fe64 (diff)
downloademacs-343a34ff0b237779f41c9164dd4eeb3454d59703.tar.gz
lisp/facemenu.el (list-colors-duplicates): Detect more duplicates on Windows.
Fixes: debbugs:9722
Diffstat (limited to 'lisp/facemenu.el')
-rw-r--r--lisp/facemenu.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index a18b892efe8..54b17d58f33 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -639,8 +639,15 @@ a list of colors that the current display can handle."
(l list))
(while (cdr l)
(if (and (facemenu-color-equal (car (car l)) (car (car (cdr l))))
- (not (if (fboundp 'w32-default-color-map)
- (not (assoc (car (car l)) (w32-default-color-map))))))
+ ;; On MS-Windows, there are logical colors that might have
+ ;; the same value but different names and meanings. For
+ ;; example, `SystemMenuText' (the color w32 uses for the
+ ;; text in menu entries) and `SystemWindowText' (the default
+ ;; color w32 uses for the text in windows and dialogs) may
+ ;; be the same display color and be adjacent in the list.
+ ;; This makes them different to any other color. Bug#9722
+ (not (and (eq system-type 'windows-nt)
+ (string-match-p "^System" (car (car l))))))
(progn
(setcdr (car l) (cons (car (car (cdr l))) (cdr (car l))))
(setcdr l (cdr (cdr l))))