(list-colors-print): Print #RRGGBB in default face.
Remove 1 space before #RRGGBB to not truncate it on terminal windows w/o fringes. Remove 1 space between bg and fg examples to get more space. (list-colors-duplicates): Replace `and' with `if' for `boundp' to avoid byte-compile warnings.
This commit is contained in:
parent
af3abed126
commit
51d23bd053
1 changed files with 12 additions and 12 deletions
|
|
@ -513,17 +513,17 @@ argument BUFFER-NAME is nil, it defaults to *Colors*."
|
||||||
'face (cons 'background-color (car color)))
|
'face (cons 'background-color (car color)))
|
||||||
(put-text-property
|
(put-text-property
|
||||||
(prog1 (point)
|
(prog1 (point)
|
||||||
(insert " " (if (cdr color)
|
(insert " " (if (cdr color)
|
||||||
(mapconcat 'identity (cdr color) ", ")
|
(mapconcat 'identity (cdr color) ", ")
|
||||||
(car color)))
|
(car color))))
|
||||||
(indent-to (max (- (window-width) 8) 44))
|
|
||||||
(insert (apply 'format " #%02x%02x%02x"
|
|
||||||
(mapcar (lambda (c) (lsh c -8))
|
|
||||||
(color-values (car color)))))
|
|
||||||
|
|
||||||
(insert "\n"))
|
|
||||||
(point)
|
(point)
|
||||||
'face (cons 'foreground-color (car color))))
|
'face (cons 'foreground-color (car color)))
|
||||||
|
(indent-to (max (- (window-width) 8) 44))
|
||||||
|
(insert (apply 'format "#%02x%02x%02x"
|
||||||
|
(mapcar (lambda (c) (lsh c -8))
|
||||||
|
(color-values (car color)))))
|
||||||
|
|
||||||
|
(insert "\n"))
|
||||||
(goto-char (point-min)))
|
(goto-char (point-min)))
|
||||||
|
|
||||||
(defun list-colors-duplicates (&optional list)
|
(defun list-colors-duplicates (&optional list)
|
||||||
|
|
@ -539,8 +539,8 @@ a list of colors that the current display can handle."
|
||||||
(l list))
|
(l list))
|
||||||
(while (cdr l)
|
(while (cdr l)
|
||||||
(if (and (facemenu-color-equal (car (car l)) (car (car (cdr l))))
|
(if (and (facemenu-color-equal (car (car l)) (car (car (cdr l))))
|
||||||
(not (and (boundp 'w32-default-color-map)
|
(not (if (boundp 'w32-default-color-map)
|
||||||
(not (assoc (car (car l)) w32-default-color-map)))))
|
(not (assoc (car (car l)) w32-default-color-map)))))
|
||||||
(progn
|
(progn
|
||||||
(setcdr (car l) (cons (car (car (cdr l))) (cdr (car l))))
|
(setcdr (car l) (cons (car (car (cdr l))) (cdr (car l))))
|
||||||
(setcdr l (cdr (cdr l))))
|
(setcdr l (cdr (cdr l))))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue