[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0c06b93 2/7: Merge from origin/emacs-26
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 0c06b93 2/7: Merge from origin/emacs-26 |
Date: |
Mon, 25 Sep 2017 14:22:10 -0400 (EDT) |
branch: master
commit 0c06b93c1e467debd401eb0b3be4652fde14fa95
Merge: c4e6ff0 96aaeaa
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Merge from origin/emacs-26
96aaeaaffa ; * src/lcms.c: Minor stylistic changes in comments.
c3df816585 Fix compilation warning in etags.c
5490ccc5eb Add lisp variable lcms-d65-xyz
dee96f4a17 * lisp/emacs-lisp/cl-macs.el (cl-letf): Fix Edebug spec (b...
12e864eb30 Avoid MinGW64 compiler warnings in unexw32.c
625cee5316 Start emacs-26 release branch
# Conflicts:
# README
# configure.ac
# msdos/sed2v2.inp
# nt/README.W32
---
lib-src/etags.c | 16 +++++++++-------
lisp/cus-edit.el | 2 +-
lisp/emacs-lisp/cl-macs.el | 4 +++-
src/lcms.c | 24 +++++++++++++-----------
src/unexw32.c | 2 +-
test/src/lcms-tests.el | 19 +++++++++++++++++++
6 files changed, 46 insertions(+), 21 deletions(-)
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 4000f47..009cba5 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -7068,14 +7068,16 @@ etags_mktmp (void)
errno = temp_errno;
templt = NULL;
}
-
#if defined (DOS_NT)
- /* The file name will be used in shell redirection, so it needs to have
- DOS-style backslashes, or else the Windows shell will barf. */
- char *p;
- for (p = templt; *p; p++)
- if (*p == '/')
- *p = '\\';
+ else
+ {
+ /* The file name will be used in shell redirection, so it needs to have
+ DOS-style backslashes, or else the Windows shell will barf. */
+ char *p;
+ for (p = templt; *p; p++)
+ if (*p == '/')
+ *p = '\\';
+ }
#endif
return templt;
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 1e13e95..6b67555 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1159,7 +1159,7 @@ Show the buffer in another window, but don't select it."
(unless (eq symbol basevar)
(message "`%s' is an alias for `%s'" symbol basevar))))
-(defvar customize-changed-options-previous-release "24.5"
+(defvar customize-changed-options-previous-release "25.3"
"Version for `customize-changed-options' to refer back to by default.")
;; Packages will update this variable, so make it available.
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index d90e70d..32ba0ac 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2438,7 +2438,9 @@ As a special case, if `(PLACE)' is used instead of
`(PLACE VALUE)',
the PLACE is not modified before executing BODY.
\(fn ((PLACE VALUE) ...) BODY...)"
- (declare (indent 1) (debug ((&rest (gate gv-place &optional form)) body)))
+ (declare (indent 1) (debug ((&rest [&or (symbolp form)
+ (gate gv-place &optional form)])
+ body)))
(if (and (not (cdr bindings)) (cdar bindings) (symbolp (caar bindings)))
`(let ,bindings ,@body)
(cl--letf bindings () () body)))
diff --git a/src/lcms.c b/src/lcms.c
index 1f3ace3..f543a03 100644
--- a/src/lcms.c
+++ b/src/lcms.c
@@ -102,7 +102,7 @@ DEFUN ("lcms-cie-de2000", Flcms_cie_de2000,
Slcms_cie_de2000, 2, 5, 0,
Each color is a list of L*a*b* coordinates, where the L* channel ranges from
0 to 100, and the a* and b* channels range from -128 to 128.
Optional arguments KL, KC, KH are weighting parameters for lightness,
-chroma, and hue, respectively. The parameters each default to 1. */)
+chroma, and hue, respectively. The parameters each default to 1. */)
(Lisp_Object color1, Lisp_Object color2,
Lisp_Object kL, Lisp_Object kC, Lisp_Object kH)
{
@@ -162,8 +162,8 @@ parse_xyz_list (Lisp_Object xyz_list, cmsCIEXYZ *color)
DEFUN ("lcms-cam02-ucs", Flcms_cam02_ucs, Slcms_cam02_ucs, 2, 3, 0,
doc: /* Compute CAM02-UCS metric distance between COLOR1 and COLOR2.
-Each color is a list of XYZ coordinates, with Y scaled to unity.
-Optional argument is the XYZ white point, which defaults to illuminant D65. */)
+Each color is a list of XYZ coordinates, with Y scaled about unity.
+Optional argument is the XYZ white point, which defaults to illuminant D65.
*/)
(Lisp_Object color1, Lisp_Object color2, Lisp_Object whitepoint)
{
cmsViewingConditions vc;
@@ -186,15 +186,11 @@ Optional argument is the XYZ white point, which defaults
to illuminant D65. */)
if (!(CONSP (color1) && parse_xyz_list (color1, &xyz1)))
signal_error ("Invalid color", color1);
if (!(CONSP (color2) && parse_xyz_list (color2, &xyz2)))
- signal_error ("Invalid color", color1);
+ signal_error ("Invalid color", color2);
if (NILP (whitepoint))
- {
- xyzw.X = 95.047;
- xyzw.Y = 100.0;
- xyzw.Z = 108.883;
- }
+ parse_xyz_list (Vlcms_d65_xyz, &xyzw);
else if (!(CONSP (whitepoint) && parse_xyz_list (whitepoint, &xyzw)))
- signal_error("Invalid white point", whitepoint);
+ signal_error ("Invalid white point", whitepoint);
vc.whitePoint.X = xyzw.X;
vc.whitePoint.Y = xyzw.Y;
@@ -243,7 +239,7 @@ Optional argument is the XYZ white point, which defaults to
illuminant D65. */)
DEFUN ("lcms-temp->white-point", Flcms_temp_to_white_point,
Slcms_temp_to_white_point, 1, 1, 0,
doc: /* Return XYZ black body chromaticity from TEMPERATURE given in K.
-Valid range of TEMPERATURE is from 4000K to 25000K. */)
+Valid range of TEMPERATURE is from 4000K to 25000K. */)
(Lisp_Object temperature)
{
cmsFloat64Number tempK;
@@ -295,6 +291,12 @@ DEFUN ("lcms2-available-p", Flcms2_available_p,
Slcms2_available_p, 0, 0, 0,
void
syms_of_lcms2 (void)
{
+ DEFVAR_LISP ("lcms-d65-xyz", Vlcms_d65_xyz,
+ doc: /* D65 illuminant as a CIE XYZ triple. */);
+ Vlcms_d65_xyz = list3 (make_float (0.950455),
+ make_float (1.0),
+ make_float (1.088753));
+
defsubr (&Slcms_cie_de2000);
defsubr (&Slcms_cam02_ucs);
defsubr (&Slcms2_available_p);
diff --git a/src/unexw32.c b/src/unexw32.c
index 0c6b483..e97a52b 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -471,7 +471,7 @@ get_section_info (file_data *p_infile)
}
/* Format to print a DWORD_PTR value. */
-#ifdef MINGW_W64
+#if defined MINGW_W64 && defined _WIN64
# define pDWP "16llx"
#else
# define pDWP "08lx"
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el
index 74648e1..962902e 100644
--- a/test/src/lcms-tests.el
+++ b/test/src/lcms-tests.el
@@ -33,6 +33,9 @@
(require 'ert)
(require 'color)
+(defconst lcms-colorspacious-d65 '(0.95047 1.0 1.08883)
+ "D65 white point from colorspacious.")
+
(defun lcms-approx-p (a b &optional delta)
"Check if A and B are within relative error DELTA of one another.
B is considered the exact value."
@@ -46,6 +49,22 @@ B is considered the exact value."
(lcms-approx-p a2 b2 delta)
(lcms-approx-p a3 b3 delta))))
+(ert-deftest lcms-cri-cam02-ucs ()
+ "Test use of `lcms-cam02-ucs'."
+ (should-error (lcms-cam02-ucs '(0 0 0) '(0 0 0) "error"))
+ (should-error (lcms-cam02-ucs '(0 0 0) 'error))
+ (should-not
+ (lcms-approx-p
+ (let ((lcms-d65-xyz '(0.44757 1.0 0.40745)))
+ (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0)))
+ (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0))))
+ (should (eql 0.0 (lcms-cam02-ucs '(0.5 0.5 0.5) '(0.5 0.5 0.5))))
+ (should
+ (lcms-approx-p (lcms-cam02-ucs lcms-colorspacious-d65
+ '(0 0 0)
+ lcms-colorspacious-d65)
+ 100.0)))
+
(ert-deftest lcms-whitepoint ()
"Test use of `lcms-temp->white-point'."
(skip-unless (featurep 'lcms2))
- [Emacs-diffs] master updated (c7474fa -> 2d6bd23), Paul Eggert, 2017/09/25
- [Emacs-diffs] master 00a86a5 3/7: ; Merge from origin/emacs-26, Paul Eggert, 2017/09/25
- [Emacs-diffs] master 0bd61c2 5/7: ; Merge from origin/emacs-26, Paul Eggert, 2017/09/25
- [Emacs-diffs] master c4e6ff0 1/7: emacs-25 → emacs-26, Paul Eggert, 2017/09/25
- [Emacs-diffs] master 0c06b93 2/7: Merge from origin/emacs-26,
Paul Eggert <=
- [Emacs-diffs] master 2d6bd23 7/7: * etc/NEWS.26: Copy from emacs-26/etc/NEWS., Paul Eggert, 2017/09/25
- [Emacs-diffs] master 1bb8ac0 4/7: Merge from origin/emacs-26, Paul Eggert, 2017/09/25
- [Emacs-diffs] master abcb2e6 6/7: Merge from origin/emacs-26, Paul Eggert, 2017/09/25