diff options
| author | Juri Linkov | 2005-03-08 21:47:03 +0000 |
|---|---|---|
| committer | Juri Linkov | 2005-03-08 21:47:03 +0000 |
| commit | 51d23bd053b36c85874696b7a9cfa2d40877cd30 (patch) | |
| tree | 41fbb896be23d8f118ecc1bea7802ae0b536a43d | |
| parent | af3abed1268fe43c04c2b3974ff8f1c723a8bdb0 (diff) | |
| download | emacs-51d23bd053b36c85874696b7a9cfa2d40877cd30.tar.gz emacs-51d23bd053b36c85874696b7a9cfa2d40877cd30.zip | |
(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.
| -rw-r--r-- | lisp/facemenu.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el index a996d4c15e7..cd3998520a1 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el | |||
| @@ -513,17 +513,17 @@ argument BUFFER-NAME is nil, it defaults to *Colors*." | |||
| 513 | 'face (cons 'background-color (car color))) | 513 | 'face (cons 'background-color (car color))) |
| 514 | (put-text-property | 514 | (put-text-property |
| 515 | (prog1 (point) | 515 | (prog1 (point) |
| 516 | (insert " " (if (cdr color) | 516 | (insert " " (if (cdr color) |
| 517 | (mapconcat 'identity (cdr color) ", ") | 517 | (mapconcat 'identity (cdr color) ", ") |
| 518 | (car color))) | 518 | (car color)))) |
| 519 | (indent-to (max (- (window-width) 8) 44)) | ||
| 520 | (insert (apply 'format " #%02x%02x%02x" | ||
| 521 | (mapcar (lambda (c) (lsh c -8)) | ||
| 522 | (color-values (car color))))) | ||
| 523 | |||
| 524 | (insert "\n")) | ||
| 525 | (point) | 519 | (point) |
| 526 | 'face (cons 'foreground-color (car color)))) | 520 | 'face (cons 'foreground-color (car color))) |
| 521 | (indent-to (max (- (window-width) 8) 44)) | ||
| 522 | (insert (apply 'format "#%02x%02x%02x" | ||
| 523 | (mapcar (lambda (c) (lsh c -8)) | ||
| 524 | (color-values (car color))))) | ||
| 525 | |||
| 526 | (insert "\n")) | ||
| 527 | (goto-char (point-min))) | 527 | (goto-char (point-min))) |
| 528 | 528 | ||
| 529 | (defun list-colors-duplicates (&optional list) | 529 | (defun list-colors-duplicates (&optional list) |
| @@ -539,8 +539,8 @@ a list of colors that the current display can handle." | |||
| 539 | (l list)) | 539 | (l list)) |
| 540 | (while (cdr l) | 540 | (while (cdr l) |
| 541 | (if (and (facemenu-color-equal (car (car l)) (car (car (cdr l)))) | 541 | (if (and (facemenu-color-equal (car (car l)) (car (car (cdr l)))) |
| 542 | (not (and (boundp 'w32-default-color-map) | 542 | (not (if (boundp 'w32-default-color-map) |
| 543 | (not (assoc (car (car l)) w32-default-color-map))))) | 543 | (not (assoc (car (car l)) w32-default-color-map))))) |
| 544 | (progn | 544 | (progn |
| 545 | (setcdr (car l) (cons (car (car (cdr l))) (cdr (car l)))) | 545 | (setcdr (car l) (cons (car (car (cdr l))) (cdr (car l)))) |
| 546 | (setcdr l (cdr (cdr l)))) | 546 | (setcdr l (cdr (cdr l)))) |