diff options
| author | Juri Linkov | 2012-09-30 19:36:42 +0300 |
|---|---|---|
| committer | Juri Linkov | 2012-09-30 19:36:42 +0300 |
| commit | d80d54b289a971d7a98dc5fafebaa957082c8222 (patch) | |
| tree | 16e9835c084e67898a0b976ebfc86d9d4fe274ac | |
| parent | c06c382ae494c4129da43f2c1ea0f72e39a45bf1 (diff) | |
| download | emacs-d80d54b289a971d7a98dc5fafebaa957082c8222.tar.gz emacs-d80d54b289a971d7a98dc5fafebaa957082c8222.zip | |
* lisp/facemenu.el (list-colors-sort): Add option "Luminance".
(list-colors-sort-key): Implement it.
* lisp/vc/diff-mode.el (diff-refine-removed):
* lisp/vc/ediff-init.el (ediff-fine-diff-A):
* lisp/vc/smerge-mode.el (smerge-refined-removed):
Change background color "#ffaaaa" to "#ffbbbb".
Fixes: debbugs:10181
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/facemenu.el | 13 | ||||
| -rw-r--r-- | lisp/vc/diff-mode.el | 2 | ||||
| -rw-r--r-- | lisp/vc/ediff-init.el | 2 | ||||
| -rw-r--r-- | lisp/vc/smerge-mode.el | 2 |
5 files changed, 23 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d1a7eea095..4ac0f1d451e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-09-30 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * facemenu.el (list-colors-sort): Add option "Luminance". | ||
| 4 | (list-colors-sort-key): Implement it. | ||
| 5 | |||
| 6 | * vc/diff-mode.el (diff-refine-removed): | ||
| 7 | * vc/ediff-init.el (ediff-fine-diff-A): | ||
| 8 | * vc/smerge-mode.el (smerge-refined-removed): | ||
| 9 | Change background color "#ffaaaa" to "#ffbbbb". (Bug#10181) | ||
| 10 | |||
| 1 | 2012-09-30 Jan Djärv <jan.h.d@swipnet.se> | 11 | 2012-09-30 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 12 | ||
| 3 | * term/ns-win.el (x-file-dialog): New function. | 13 | * term/ns-win.el (x-file-dialog): New function. |
diff --git a/lisp/facemenu.el b/lisp/facemenu.el index bcef25eb893..88b9ddc7f54 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el | |||
| @@ -464,7 +464,8 @@ These special properties include `invisible', `intangible' and `read-only'." | |||
| 464 | `(rgb-dist . COLOR)' sorts by the RGB distance to the specified color. | 464 | `(rgb-dist . COLOR)' sorts by the RGB distance to the specified color. |
| 465 | `hsv' sorts by hue, saturation, value. | 465 | `hsv' sorts by hue, saturation, value. |
| 466 | `(hsv-dist . COLOR)' sorts by the HSV distance to the specified color | 466 | `(hsv-dist . COLOR)' sorts by the HSV distance to the specified color |
| 467 | and excludes grayscale colors." | 467 | and excludes grayscale colors. |
| 468 | `luminance' sorts by relative luminance in the CIE XYZ color space." | ||
| 468 | :type '(choice (const :tag "Unsorted" nil) | 469 | :type '(choice (const :tag "Unsorted" nil) |
| 469 | (const :tag "Color Name" name) | 470 | (const :tag "Color Name" name) |
| 470 | (const :tag "Red-Green-Blue" rgb) | 471 | (const :tag "Red-Green-Blue" rgb) |
| @@ -474,7 +475,8 @@ and excludes grayscale colors." | |||
| 474 | (const :tag "Hue-Saturation-Value" hsv) | 475 | (const :tag "Hue-Saturation-Value" hsv) |
| 475 | (cons :tag "Distance on HSV cylinder" | 476 | (cons :tag "Distance on HSV cylinder" |
| 476 | (const :tag "Distance from Color" hsv-dist) | 477 | (const :tag "Distance from Color" hsv-dist) |
| 477 | (color :tag "Source Color Name"))) | 478 | (color :tag "Source Color Name")) |
| 479 | (const :tag "Luminance" luminance)) | ||
| 478 | :group 'facemenu | 480 | :group 'facemenu |
| 479 | :version "24.1") | 481 | :version "24.1") |
| 480 | 482 | ||
| @@ -504,7 +506,12 @@ filter out the color from the output." | |||
| 504 | (+ (expt (- 180 (abs (- 180 (abs (- (nth 0 c-hsv) ; wrap hue | 506 | (+ (expt (- 180 (abs (- 180 (abs (- (nth 0 c-hsv) ; wrap hue |
| 505 | (nth 0 o-hsv)))))) 2) | 507 | (nth 0 o-hsv)))))) 2) |
| 506 | (expt (- (nth 1 c-hsv) (nth 1 o-hsv)) 2) | 508 | (expt (- (nth 1 c-hsv) (nth 1 o-hsv)) 2) |
| 507 | (expt (- (nth 2 c-hsv) (nth 2 o-hsv)) 2))))))) | 509 | (expt (- (nth 2 c-hsv) (nth 2 o-hsv)) 2))))) |
| 510 | ((eq list-colors-sort 'luminance) | ||
| 511 | (let ((c-rgb (color-name-to-rgb color))) | ||
| 512 | (+ (* (nth 0 c-rgb) 0.21266729) | ||
| 513 | (* (nth 1 c-rgb) 0.7151522) | ||
| 514 | (* (nth 2 c-rgb) 0.0721750)))))) | ||
| 508 | 515 | ||
| 509 | (defun list-colors-display (&optional list buffer-name callback) | 516 | (defun list-colors-display (&optional list buffer-name callback) |
| 510 | "Display names of defined colors, and show what they look like. | 517 | "Display names of defined colors, and show what they look like. |
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 11ec785b647..586dd2b75e2 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -1899,7 +1899,7 @@ For use in `add-log-current-defun-function'." | |||
| 1899 | '((default | 1899 | '((default |
| 1900 | :inherit diff-refine-change) | 1900 | :inherit diff-refine-change) |
| 1901 | (((class color) (min-colors 88) (background light)) | 1901 | (((class color) (min-colors 88) (background light)) |
| 1902 | :background "#ffaaaa") | 1902 | :background "#ffbbbb") |
| 1903 | (((class color) (min-colors 88) (background dark)) | 1903 | (((class color) (min-colors 88) (background dark)) |
| 1904 | :background "#aa2222")) | 1904 | :background "#aa2222")) |
| 1905 | "Face used for removed characters shown by `diff-refine-hunk'." | 1905 | "Face used for removed characters shown by `diff-refine-hunk'." |
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 2c41ce8c457..65776dfccad 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el | |||
| @@ -979,7 +979,7 @@ this variable represents.") | |||
| 979 | (defface ediff-fine-diff-A | 979 | (defface ediff-fine-diff-A |
| 980 | (if (featurep 'emacs) | 980 | (if (featurep 'emacs) |
| 981 | '((((class color) (min-colors 88) (background light)) | 981 | '((((class color) (min-colors 88) (background light)) |
| 982 | :background "#ffaaaa") | 982 | :background "#ffbbbb") |
| 983 | (((class color) (min-colors 88) (background dark)) | 983 | (((class color) (min-colors 88) (background dark)) |
| 984 | :background "#aa2222") | 984 | :background "#aa2222") |
| 985 | (((class color) (min-colors 16)) | 985 | (((class color) (min-colors 16)) |
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index babcf6f1beb..7037b606fe7 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el | |||
| @@ -132,7 +132,7 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 132 | '((default | 132 | '((default |
| 133 | :inherit smerge-refined-change) | 133 | :inherit smerge-refined-change) |
| 134 | (((class color) (min-colors 88) (background light)) | 134 | (((class color) (min-colors 88) (background light)) |
| 135 | :background "#ffaaaa") | 135 | :background "#ffbbbb") |
| 136 | (((class color) (min-colors 88) (background dark)) | 136 | (((class color) (min-colors 88) (background dark)) |
| 137 | :background "#aa2222") | 137 | :background "#aa2222") |
| 138 | (t :inverse-video t)) | 138 | (t :inverse-video t)) |