1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

19 Commits

Author SHA1 Message Date
Julien Danjou
43b2e2e71a color.el: fix color-rgb-to-hsv computing 2013-01-11 15:04:24 +00:00
Paul Eggert
0877d0dc24 Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca 2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Stefan Monnier
19dc72069c Use cl-lib instead of cl, and interactive-p => called-interactively-p.
* lisp/erc/erc-track.el, lisp/erc/erc-networks.el, lisp/erc/erc-netsplit.el:
* lisp/erc/erc-dcc.el, lisp/erc/erc-backend.el: Use cl-lib, nth, pcase, and
called-interactively-p instead of cl.
* lisp/erc/erc-speedbar.el, lisp/erc/erc-services.el:
* lisp/erc/erc-pcomplete.el, lisp/erc/erc-notify.el, lisp/erc/erc-match.el:
* lisp/erc/erc-log.el, lisp/erc/erc-join.el, lisp/erc/erc-ezbounce.el:
* lisp/erc/erc-capab.el: Don't require cl since we don't use it.
* lisp/erc/erc.el: Use cl-lib, nth, pcase, and called-interactively-p i.s.o cl.
(erc-lurker-ignore-chars, erc-common-server-suffixes): Move before first use.
* lisp/json.el: Don't require cl since we don't use it.
* lisp/color.el: Don't require cl.
(color-complement): `caddr' -> `nth 2'.
* test/automated/ert-x-tests.el: Use cl-lib.
* test/automated/ert-tests.el: Use lexical-binding and cl-lib.
2012-11-19 12:24:12 -05:00
Julian Scheid
123ec15769 color-hsl-to-rgb fix (tiny change)
* lisp/color.el (color-hsl-to-rgb): Fix incorrect results for small
and large hue values.

Fixes: debbugs:12559
2012-10-05 19:20:36 -07:00
Glenn Morris
e8757f091a Merge from emacs-24; up to 2012-05-08T14:11:47Z!monnier@iro.umontreal.ca 2012-10-05 00:38:05 -07:00
Glenn Morris
d8788e1e6f Doc fixes
* lisp/color.el (color-name-to-rgb, color-rgb-to-hex)
(color-hue-to-rgb, color-hsl-to-rgb, color-rgb-to-hsv)
(color-rgb-to-hsl, color-srgb-to-xyz, color-saturate-hsl)
(color-desaturate-hsl, color-desaturate-name, color-lighten-hsl)
(color-lighten-name, color-darken-hsl, color-darken-name): Doc fixes.

Fixes: debbugs:12558
2012-10-05 00:17:23 -07:00
Stefan Monnier
aa7c6dbeba * lisp/color.el (color-xyz-to-lab, color-lab-to-xyz, color-cie-de2000):
Prefer pcase-let over destructuring-bind.
* lisp/vc/diff-mode.el (diff-remove-trailing-whitespace): Same.
Also, remove whitespace as we go, rather than after accumulating the
various places.
2012-08-13 15:10:35 -04:00
Bastien Guerry
0a0a3573ec Fix typo in color.el.
Thanks to Brad Town for spotting this.
2012-04-05 09:29:19 +02:00
Julien Danjou
6725d21a1b color.el: Add saturate, lighten functions. 2012-01-24 12:06:51 +00:00
Julien Danjou
0d0deb382b color.el (color-name-to-rgb): Use the white color to find the max color component value and return correctly computed values.
(color-name-to-rgb): Add missing float conversion for max value.
2012-01-19 23:06:49 +00:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
e4920bc99d Spelling fixes. 2011-11-24 23:14:48 -08:00
Paul Eggert
5396468298 Spelling fixes. 2011-11-19 01:18:31 -08:00
Chong Yidong
6d7132563c Merge some code from hexrgb.el into color.el.
* lisp/color.el (color-name-to-rgb): Rename from color-rgb->normalize.
Autoload.  Add optional arg FRAME, and pass it to color-values.
(color-complement): Caller changed.  Doc fix.
(color-gradient): Rewrite for better clarity and efficiency.
(color-rgb-to-hex): Rename from color-rgb->hex.
(color-rgb-to-hsv): Rename from color-rgb->hsv.  Force hue and
saturation to zero if the value is too small.
(color-rgb-to-hsl): Rename from color-rgb->hsl.
(color-srgb-to-xyz): Rename from color-srgb->xyz.  Doc fix.
(color-xyz-to-srgb): Rename from color-xyz->srgb.  Doc fix.
(color-xyz-to-lab): Rename from color-xyz->lab.  Doc fix.
(color-lab-to-xyz): Rename from color-lab->xyz.  Doc fix.
(color-lab-to-srgb): Rename from color-lab->srgb.  Doc fix.
(color-cie-de2000): Doc fix.

* lisp/facemenu.el (color-rgb-to-hsv): Deleted; use the version in
lisp/color.el instead.
(list-colors-sort-key, list-colors-print): Use
color-normalized-values.

* lisp/faces.el (color-values): Use cond for clarity.  Doc fix.

* lisp/gnus/shr-color.el (shr-color->hexadecimal): Use renamed
function names color-rgb-to-hex, color-name-to-rgb,
color-srgb-to-lab, and color-lab-to-srgb.
2011-02-21 01:03:36 -05:00
Julien Danjou
39cde66c5e mm-uu.el (mm-uu-type-alist): Add support for git format-patch diff format.
mm-decode.el (mm-inline-media-tests): Do not check for diff-mode it's standard in Emacs nowadays.
color.el (color-gradient): Add a color-gradient function.
2011-02-01 23:46:27 +00:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Katsumi Yamaoka
e60c6ca9ca [Gnus] Update copyright years. 2011-01-15 00:35:35 +00:00
Chong Yidong
778ca437de Move color.el out of the gnus/ tree. 2010-12-20 11:18:56 +08:00