aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2017-09-25 11:16:05 -0700
committerPaul Eggert2017-09-25 11:16:05 -0700
commit0c06b93c1e467debd401eb0b3be4652fde14fa95 (patch)
tree9fac5e948a58a4526dcc5ce6160b48197ea03f7d
parentc4e6ff097c946b46e3a659982c61e25093bde1a7 (diff)
parent96aaeaaffac8a93d9c8126ba77ad217a3f323fce (diff)
downloademacs-0c06b93c1e467debd401eb0b3be4652fde14fa95.tar.gz
emacs-0c06b93c1e467debd401eb0b3be4652fde14fa95.zip
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
-rw-r--r--lib-src/etags.c16
-rw-r--r--lisp/cus-edit.el2
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
-rw-r--r--src/lcms.c24
-rw-r--r--src/unexw32.c2
-rw-r--r--test/src/lcms-tests.el19
6 files changed, 46 insertions, 21 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 4000f47a414..009cba528d7 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -7068,14 +7068,16 @@ etags_mktmp (void)
7068 errno = temp_errno; 7068 errno = temp_errno;
7069 templt = NULL; 7069 templt = NULL;
7070 } 7070 }
7071
7072#if defined (DOS_NT) 7071#if defined (DOS_NT)
7073 /* The file name will be used in shell redirection, so it needs to have 7072 else
7074 DOS-style backslashes, or else the Windows shell will barf. */ 7073 {
7075 char *p; 7074 /* The file name will be used in shell redirection, so it needs to have
7076 for (p = templt; *p; p++) 7075 DOS-style backslashes, or else the Windows shell will barf. */
7077 if (*p == '/') 7076 char *p;
7078 *p = '\\'; 7077 for (p = templt; *p; p++)
7078 if (*p == '/')
7079 *p = '\\';
7080 }
7079#endif 7081#endif
7080 7082
7081 return templt; 7083 return templt;
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 1e13e950476..6b67555770f 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."
1159 (unless (eq symbol basevar) 1159 (unless (eq symbol basevar)
1160 (message "`%s' is an alias for `%s'" symbol basevar)))) 1160 (message "`%s' is an alias for `%s'" symbol basevar))))
1161 1161
1162(defvar customize-changed-options-previous-release "24.5" 1162(defvar customize-changed-options-previous-release "25.3"
1163 "Version for `customize-changed-options' to refer back to by default.") 1163 "Version for `customize-changed-options' to refer back to by default.")
1164 1164
1165;; Packages will update this variable, so make it available. 1165;; 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 d90e70d3d8b..32ba0ac3091 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)',
2438the PLACE is not modified before executing BODY. 2438the PLACE is not modified before executing BODY.
2439 2439
2440\(fn ((PLACE VALUE) ...) BODY...)" 2440\(fn ((PLACE VALUE) ...) BODY...)"
2441 (declare (indent 1) (debug ((&rest (gate gv-place &optional form)) body))) 2441 (declare (indent 1) (debug ((&rest [&or (symbolp form)
2442 (gate gv-place &optional form)])
2443 body)))
2442 (if (and (not (cdr bindings)) (cdar bindings) (symbolp (caar bindings))) 2444 (if (and (not (cdr bindings)) (cdar bindings) (symbolp (caar bindings)))
2443 `(let ,bindings ,@body) 2445 `(let ,bindings ,@body)
2444 (cl--letf bindings () () body))) 2446 (cl--letf bindings () () body)))
diff --git a/src/lcms.c b/src/lcms.c
index 1f3ace3baac..f543a030399 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,
102Each color is a list of L*a*b* coordinates, where the L* channel ranges from 102Each color is a list of L*a*b* coordinates, where the L* channel ranges from
1030 to 100, and the a* and b* channels range from -128 to 128. 1030 to 100, and the a* and b* channels range from -128 to 128.
104Optional arguments KL, KC, KH are weighting parameters for lightness, 104Optional arguments KL, KC, KH are weighting parameters for lightness,
105chroma, and hue, respectively. The parameters each default to 1. */) 105chroma, and hue, respectively. The parameters each default to 1. */)
106 (Lisp_Object color1, Lisp_Object color2, 106 (Lisp_Object color1, Lisp_Object color2,
107 Lisp_Object kL, Lisp_Object kC, Lisp_Object kH) 107 Lisp_Object kL, Lisp_Object kC, Lisp_Object kH)
108{ 108{
@@ -162,8 +162,8 @@ parse_xyz_list (Lisp_Object xyz_list, cmsCIEXYZ *color)
162 162
163DEFUN ("lcms-cam02-ucs", Flcms_cam02_ucs, Slcms_cam02_ucs, 2, 3, 0, 163DEFUN ("lcms-cam02-ucs", Flcms_cam02_ucs, Slcms_cam02_ucs, 2, 3, 0,
164 doc: /* Compute CAM02-UCS metric distance between COLOR1 and COLOR2. 164 doc: /* Compute CAM02-UCS metric distance between COLOR1 and COLOR2.
165Each color is a list of XYZ coordinates, with Y scaled to unity. 165Each color is a list of XYZ coordinates, with Y scaled about unity.
166Optional argument is the XYZ white point, which defaults to illuminant D65. */) 166Optional argument is the XYZ white point, which defaults to illuminant D65. */)
167 (Lisp_Object color1, Lisp_Object color2, Lisp_Object whitepoint) 167 (Lisp_Object color1, Lisp_Object color2, Lisp_Object whitepoint)
168{ 168{
169 cmsViewingConditions vc; 169 cmsViewingConditions vc;
@@ -186,15 +186,11 @@ Optional argument is the XYZ white point, which defaults to illuminant D65. */)
186 if (!(CONSP (color1) && parse_xyz_list (color1, &xyz1))) 186 if (!(CONSP (color1) && parse_xyz_list (color1, &xyz1)))
187 signal_error ("Invalid color", color1); 187 signal_error ("Invalid color", color1);
188 if (!(CONSP (color2) && parse_xyz_list (color2, &xyz2))) 188 if (!(CONSP (color2) && parse_xyz_list (color2, &xyz2)))
189 signal_error ("Invalid color", color1); 189 signal_error ("Invalid color", color2);
190 if (NILP (whitepoint)) 190 if (NILP (whitepoint))
191 { 191 parse_xyz_list (Vlcms_d65_xyz, &xyzw);
192 xyzw.X = 95.047;
193 xyzw.Y = 100.0;
194 xyzw.Z = 108.883;
195 }
196 else if (!(CONSP (whitepoint) && parse_xyz_list (whitepoint, &xyzw))) 192 else if (!(CONSP (whitepoint) && parse_xyz_list (whitepoint, &xyzw)))
197 signal_error("Invalid white point", whitepoint); 193 signal_error ("Invalid white point", whitepoint);
198 194
199 vc.whitePoint.X = xyzw.X; 195 vc.whitePoint.X = xyzw.X;
200 vc.whitePoint.Y = xyzw.Y; 196 vc.whitePoint.Y = xyzw.Y;
@@ -243,7 +239,7 @@ Optional argument is the XYZ white point, which defaults to illuminant D65. */)
243 239
244DEFUN ("lcms-temp->white-point", Flcms_temp_to_white_point, Slcms_temp_to_white_point, 1, 1, 0, 240DEFUN ("lcms-temp->white-point", Flcms_temp_to_white_point, Slcms_temp_to_white_point, 1, 1, 0,
245 doc: /* Return XYZ black body chromaticity from TEMPERATURE given in K. 241 doc: /* Return XYZ black body chromaticity from TEMPERATURE given in K.
246Valid range of TEMPERATURE is from 4000K to 25000K. */) 242Valid range of TEMPERATURE is from 4000K to 25000K. */)
247 (Lisp_Object temperature) 243 (Lisp_Object temperature)
248{ 244{
249 cmsFloat64Number tempK; 245 cmsFloat64Number tempK;
@@ -295,6 +291,12 @@ DEFUN ("lcms2-available-p", Flcms2_available_p, Slcms2_available_p, 0, 0, 0,
295void 291void
296syms_of_lcms2 (void) 292syms_of_lcms2 (void)
297{ 293{
294 DEFVAR_LISP ("lcms-d65-xyz", Vlcms_d65_xyz,
295 doc: /* D65 illuminant as a CIE XYZ triple. */);
296 Vlcms_d65_xyz = list3 (make_float (0.950455),
297 make_float (1.0),
298 make_float (1.088753));
299
298 defsubr (&Slcms_cie_de2000); 300 defsubr (&Slcms_cie_de2000);
299 defsubr (&Slcms_cam02_ucs); 301 defsubr (&Slcms_cam02_ucs);
300 defsubr (&Slcms2_available_p); 302 defsubr (&Slcms2_available_p);
diff --git a/src/unexw32.c b/src/unexw32.c
index 0c6b48342e5..e97a52ba07a 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -471,7 +471,7 @@ get_section_info (file_data *p_infile)
471} 471}
472 472
473/* Format to print a DWORD_PTR value. */ 473/* Format to print a DWORD_PTR value. */
474#ifdef MINGW_W64 474#if defined MINGW_W64 && defined _WIN64
475# define pDWP "16llx" 475# define pDWP "16llx"
476#else 476#else
477# define pDWP "08lx" 477# define pDWP "08lx"
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el
index 74648e1979e..962902eb100 100644
--- a/test/src/lcms-tests.el
+++ b/test/src/lcms-tests.el
@@ -33,6 +33,9 @@
33(require 'ert) 33(require 'ert)
34(require 'color) 34(require 'color)
35 35
36(defconst lcms-colorspacious-d65 '(0.95047 1.0 1.08883)
37 "D65 white point from colorspacious.")
38
36(defun lcms-approx-p (a b &optional delta) 39(defun lcms-approx-p (a b &optional delta)
37 "Check if A and B are within relative error DELTA of one another. 40 "Check if A and B are within relative error DELTA of one another.
38B is considered the exact value." 41B is considered the exact value."
@@ -46,6 +49,22 @@ B is considered the exact value."
46 (lcms-approx-p a2 b2 delta) 49 (lcms-approx-p a2 b2 delta)
47 (lcms-approx-p a3 b3 delta)))) 50 (lcms-approx-p a3 b3 delta))))
48 51
52(ert-deftest lcms-cri-cam02-ucs ()
53 "Test use of `lcms-cam02-ucs'."
54 (should-error (lcms-cam02-ucs '(0 0 0) '(0 0 0) "error"))
55 (should-error (lcms-cam02-ucs '(0 0 0) 'error))
56 (should-not
57 (lcms-approx-p
58 (let ((lcms-d65-xyz '(0.44757 1.0 0.40745)))
59 (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0)))
60 (lcms-cam02-ucs '(0.5 0.5 0.5) '(0 0 0))))
61 (should (eql 0.0 (lcms-cam02-ucs '(0.5 0.5 0.5) '(0.5 0.5 0.5))))
62 (should
63 (lcms-approx-p (lcms-cam02-ucs lcms-colorspacious-d65
64 '(0 0 0)
65 lcms-colorspacious-d65)
66 100.0)))
67
49(ert-deftest lcms-whitepoint () 68(ert-deftest lcms-whitepoint ()
50 "Test use of `lcms-temp->white-point'." 69 "Test use of `lcms-temp->white-point'."
51 (skip-unless (featurep 'lcms2)) 70 (skip-unless (featurep 'lcms2))