1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00
Commit Graph

130488 Commits

Author SHA1 Message Date
Mark Oteiza
5490ccc5eb Add lisp variable lcms-d65-xyz
This serves as the default optional argument for functions in this
library.
* src/lcms.c (lcms-d65-xyz): New variable.
(lcms-cam02-ucs): Use it.  Use better word in docstring.  Fix bug
color1 -> color2.
* test/src/lcms-tests.el: Add some tests for lcms-cri-cam02-ucs.
(lcms-colorspacious-d65): New variable.
2017-09-16 12:49:28 -04:00
Gemini Lasswell
dee96f4a17 * lisp/emacs-lisp/cl-macs.el (cl-letf): Fix Edebug spec (bug#24765) 2017-09-16 07:36:18 -07:00
Andy Moreton
12e864eb30 Avoid MinGW64 compiler warnings in unexw32.c
* src/unexw32.c (pDWP) [MINGW_W64]: Define to "16llx" only for the
64-bit build.
2017-09-16 16:44:39 +03:00
Eli Zaretskii
625cee5316 Start emacs-26 release branch
* configure.ac:
* nt/README.W32:
* README:
* msdos/sed2v2.inp: Increment Emacs version to 26.0.60.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Update value to "25.3".
2017-09-16 15:34:15 +03:00
Alan Mackenzie
4ea37c2b8b Cope better with C++ and Objective-C protection keywords in class declarations
This fix fixes the fontification of a method inside a class at the time it is
typed, when there is a protection keyword clause preceding it.

* lisp/progmodes/cc-engine.el (c-forward-keyword-clause): Handle protection
keywords.
(c-looking-at-decl-block): Avoid scanning forward over protection keyword
clauses too eagerly.

* lisp/progmodes/cc-langs.el (c-protection-key c-post-protection-token): New
lang defconsts and defvars.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): When we encounter a protection
keyword following a semicolon or brace, move forward over it before attempting
to parse a type.
2017-09-16 11:31:38 +00:00
Eli Zaretskii
2d53f8783f Fix order of sorted overlays returned by 'overlays-at'
* src/buffer.c (Foverlays_at): If SORTED is non-nil, reverse the
list of results, to have their order as per the documentation.
(Bug#28390)

* etc/NEWS: Mention the change in the behavior of overlays-at.
2017-09-16 13:02:31 +03:00
Eli Zaretskii
a103dbe360 Disable execution of unsafe Lisp by Enriched Text mode
* src/xdisp.c (handle_display_spec): If the display property is
wrapped in 'disable-eval' form, disable Lisp evaluation while
processing this property.
(handle_single_display_spec): Accept new argument ENABLE_EVAL_P.
If that argument is false, don't evaluate Lisp while processing
display properties.

* lisp/textmodes/enriched.el
(enriched-allow-eval-in-display-props): New defcustom.
(enriched-decode-display-prop): If
enriched-allow-eval-in-display-props is nil, wrap the display
property with 'disable-eval' to disable Lisp evaluation when the
display property is processed for display.  (Bug#28350)
* lisp/gnus/mm-view.el (mm-inline-text): Re-enable processing of
enriched text.

* doc/lispref/display.texi (Display Property): Document the
'disable-eval' wrapping of 'display' properties.
* doc/emacs/text.texi (Enriched Properties): Document
'enriched-allow-eval-in-display-props'.

* etc/NEWS: Describe the security issues with Enriched Text mode
and their solution.
2017-09-16 12:45:24 +03:00
Eli Zaretskii
6d6dc246f9 Avoid MinGW64 compilation warning in w32.c
* src/w32.c (sys_strerror): Provide a prototype for MinGW64.
2017-09-16 11:51:24 +03:00
Eli Zaretskii
d25d2a9b2d ; * src/data.c (minmax_driver): Fix last change. 2017-09-16 11:01:19 +03:00
Eli Zaretskii
1170c2f371 Fix MS-Windows build broken by recent changes in lcms.c
* src/lcms.c [WINDOWSNT]: Define types for cmsWhitePointFromTemp
and cmsxyY2XYZ function pointers.
(init_lcms_functions) [WINDOWSNT]: Load cmsWhitePointFromTemp and
cmsxyY2XYZ from liblcms2.
(cmsWhitePointFromTemp, cmsxyY2XYZ) [WINDOWSNT]: Redirect to the
corresponding function pointers.
(Flcms_temp_to_white_point): Minor stylistic changes.  Doc fix.
(syms_of_lcms2): Defsubr Slcms_temp_to_white_point.
2017-09-16 10:41:52 +03:00
Eli Zaretskii
cb27a13413 Avoid GCC 7 compilation warning in data.c
* src/data.c (minmax_driver): Use UNINIT to avoid compilation
warnings.  Reported by Fabrice Popineau
<fabrice.popineau@centralesupelec.fr>.
2017-09-16 10:31:32 +03:00
Mark Oteiza
f5f261c690 Add lcms-temp->white-point and initial tests
* src/lcms.c (lcms-temp->white-point): New function.
* test/src/lcms-tests.el: New file.
2017-09-15 23:49:42 -04:00
Mark Oteiza
30c955b172 Use cl-print in timer list
* lisp/emacs-lisp/timer-list.el (timer-list): Use cl-print
for handling functions.
(timer-list-mode): Capitalize major mode name.  Set bidi direction
as in tabulated-list-mode.
2017-09-15 23:18:54 -04:00
Vincent Belaïche
767b3a7429 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2017-09-15 23:52:24 +02:00
Vincent Belaïche
d1458d0f40 Make landscape layout with geometry package rather than a PostScript special.
* lisp/calendar/cal-tex.el (cal-tex-preamble): Make 12pt the
default class option.
(cal-tex-year, cal-tex-cursor-month-landscape): Pass landscape
request to `cal-tex-insert-preamble' function call within the
class option string.
(cal-tex-cursor-month): Don't pass any longer "12pt" argument
to `cal-tex-insert-preamble' function, as it is default.
(cal-tex-insert-preamble): Suppress landscape and size
argument, and replace them by a class-options string
argument. Do not insert any longer "\special{landscape}" in
case of landscape layout, as the job is made by the geometry
package.
2017-09-15 23:51:05 +02:00
Mark Oteiza
9785d35137 * lisp/json.el (json-read-keyword): Revert previous change to catch EOL. 2017-09-15 15:38:44 -04:00
Eli Zaretskii
541b596bf1 One more attempt to avoid GCC 7 warnings in dispnew.c
* src/dispnew.c (adjust_glyph_matrix): Use eassume instead of
eassert, to avoid compilation warnings about NULL pointer
dereferences.
2017-09-15 21:59:08 +03:00
Mark Oteiza
6e38b9253e Fix color-distance docstring
Also feed the translated color to the metric argument.
* src/xfaces.c (color-distance): Reword docstring to be more helpful.
Avoid duplicating effort in lcms2 by passing the translated 16 bit RGB
instead of the function's color arguments.
2017-09-15 13:30:20 -04:00
Michael Albinus
7911ebc610 Improve Tramp behaviour according to bug#27986
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file): Check, that NEWNAME is a
directory name when existing.  Use `file-name-as-directory'
where appropriate.
2017-09-15 18:29:00 +02:00
Mark Oteiza
1c70054750 ; Partially revert previous commit
The reduction in was because I broke it.
* lisp/json.el (json-pop): Do not bind at compile time something needed
at run time.
2017-09-15 10:06:56 -04:00
Mark Oteiza
3b783a75ad More JSON optimization
Last I checked, inlining json-skip-whitespace didn't make much
difference.  However, changing defsubsts to define-inline results
in roughly 15% reduction in read time on a 200K file.
* lisp/json.el (json-advance, json-peek, json-pop):
(json-skip-whitespace): Inline with define-inline.
(json-read-keyword): Don't use whitespace syntax.
(json-add-to-object): Simpler condition.
2017-09-15 09:49:27 -04:00
Eli Zaretskii
817e92b2bd Avoid crashes due to invalid error forms from sentinels/filters
* src/process.c (exec_sentinel_error_handler): Make sure the error
form passed to cmd_error_internal is a cons cell.  (Bug#28430)
2017-09-15 16:15:05 +03:00
Eli Zaretskii
015172d1ba Avoid compilation warnings with GCC 7 on MS-Windows
* src/w32term.c (w32_setup_relief_color, construct_mouse_click)
(w32_read_socket): Initialize variables to shut up bogus
compilation warnings from GCC 7.
* src/unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Cast to DWORD_PTR
to avoid compiler warnings about printing signed values using %x
format spec.
* src/dispnew.c (adjust_glyph_matrix): Add eassert to avoid
compiler warning about possible NULL pointer dereference.
* src/lisp.h (pI): Tweak the definition some more for MinGW64.
2017-09-15 11:46:37 +03:00
Martin Rudalics
025e216566 Define gnutls_rnd for WINDOWSNT and HAVE_GNUTLS3 case only
* src/fns.c (gnutls_rnd): Define for WINDOWSNT and HAVE_GNUTLS3
case only to avoid unused macros warning otherwise.
2017-09-15 09:48:54 +02:00
Martin Rudalics
0ce6b4310d In w32heap.c bump up DUMPED_HEAP_SIZE
* src/w32heap.c (DUMPED_HEAP_SIZE): Bump up DUMPED_HEAP_SIZE
to 13*1024*1024 for 32-bit non-wide-integer builds.
2017-09-15 09:39:17 +02:00
Mark Oteiza
117f28430a Bind n,p in timer-list
* lisp/emacs-lisp/timer-list.el (timer-list-mode-map): Bind n and p
to next- and previous-line, respectively.
2017-09-14 19:52:09 -04:00
Glenn Morris
ce0aa05864 * lisp/net/tls.el (tls-program): Fix :version.
; Ref: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00401.html
2017-09-14 16:35:43 -04:00
Eli Zaretskii
d44c8542af * configure.ac (--with-lcms2, --without-lcms2): New options. 2017-09-14 22:22:29 +03:00
Eli Zaretskii
0d5f0a8d56 ; * etc/NEWS: Reword the lcms2 entry. 2017-09-14 21:35:31 +03:00
Eli Zaretskii
7d33ebc1f0 Avoid 64-bit compilation warnings in unexw32.c
* src/unexw32.c (pDWP): New macro.
(COPY_CHUNK, COPY_PROC_CHUNK): Declare 'count' as DWORD_PTR.  Use
pDWP for printing values that can be either 32-bit or 64-bit wide.
2017-09-14 20:46:59 +03:00
Eli Zaretskii
2c29280e7a Fix warnings about formats in printf-like functions on MS-Windows
* src/lisp.h (pI) [__MINGW32__]: Provide definition that will
hopefully DTRT with both MinGW64 and mingw.org's MinGW.  See
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00171.html
for the details.
* src/conf_post.h (PRINTF_ARCHETYPE) [MINGW_W64]: Separate
definition specific to MinGW64.
(PRINTF_ARCHETYPE) [__MINGW32__]: For mingw.org's MinGW, use
__mingw_printf__ in ANSI-compatible mode.
2017-09-14 20:38:42 +03:00
Eli Zaretskii
56ab0c4a4c Support lcms2 in MS-Windows builds
* lisp/term/w32-win.el (dynamic-library-alist): Include
association for the lcms2 library.

* src/lcms.c [WINDOWSNT]: Include windows.h and w32.h.  Use
DEF_DLL_FN to define pointers to dynamically loaded lcms2
functions.
(cmsCIE2000DeltaE, cmsCIECAM02Init, cmsCIECAM02Forward)
(cmsCIECAM02Done): New macros.
(init_lcms_functions, Flcms2_available_p): New functions.
(Flcms_cie_de2000, Flcms_cam02_ucs) [WINDOWSNT]: Call
init_lcms_functions.
(syms_of_lcms2): Defsubr lcms2-available-p.
* src/w32fns.c (syms_of_w32fns): DEFSYM Qlcms2.

* configure.ac: Include lcms2 in the final report and in
emacs_config_features.

* nt/INSTALL:
* nt/INSTALL.W64: Update with the information about lcms2 library.
2017-09-14 19:37:35 +03:00
Paul Eggert
bc5485edef Port renameat_noreplace to openSUSE 12.3
Problem reported by M. Nomiya in:
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00363.html
* src/sysdep.c (renameat_noreplace):
Call renameat2 only if CYGWIN.
2017-09-14 07:23:49 -07:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
5da53a0191 Prefer HTTPS to HTTP for gnu.org
This patch just changes code files; a followup companion patch
(much larger) will affect the commentary.  This part is
separated out to make it easier to review.
* .dir-locals.el (change-log-mode):
* lisp/org/org-info.el (org-info-other-documents)
(org-info-map-html-url):
* lisp/org/ox-html.el (org-html-creator-string):
* lisp/startup.el (fancy-startup-text, fancy-about-text)
(fancy-splash-head):
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352):
* test/lisp/thingatpt-tests.el (thing-at-point-test-data):
Use HTTPS instead of HTTP.
2017-09-13 15:54:25 -07:00
Simen Heggestøyl
e7d6c62209 Add tests for color.el
* lisp/color.el (color-name-to-rgb, color-complement): Clarify in
docstrings that RGB triplets should use four digits per component.
(color-rgb-to-hsl): Break line to avoid "Hidden behind deeper element"
warning.

* test/lisp/color-tests.el: New file.
2017-09-13 20:23:44 +02:00
Lars Ingebrigtsen
6339807147 Make gnutls-verify-error work again with url-retrieve-synchronously
* lisp/url/url-gw.el (url-open-stream): Only use :nowait if
we're doing async connections (bug#26835).

* lisp/url/url-parse.el (url): Add an asynchronous slot.

* lisp/url/url.el (url-asynchronous): New variable.
(url-retrieve-internal): Store the value.
(url-retrieve-synchronously): Bind the variable.
2017-09-13 20:11:02 +02:00
Michael Albinus
4ab44f75d6 Improve backward compatibility of tramp-tests
* test/lisp/net/tramp-tests.el (seq): Don't require.
(tramp--test-emacs26-p): New defun.
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Use it.
(tramp-test16-file-expand-wildcards): Use `copy-sequence'.
2017-09-13 20:10:40 +02:00
Michael Albinus
516481156c * lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 25.3.
2017-09-13 20:10:10 +02:00
Mark Oteiza
bdb71dea4a Add clarification to if-let* docstring
Also make its behaviour consistent with and-let* in that empty bindings
results in success, not failure.
* lisp/emacs-lisp/subr-x.el: Edit docstring, change else to then.
2017-09-13 13:27:49 -04:00
Lars Ingebrigtsen
6519df8f5a Make fully qualified domain names more fully qualified
* lisp/gnus/message.el (message-make-fqdn): Don't try to use a
system-name without any periods as a fully qualified domain name.
2017-09-13 18:08:51 +02:00
Paul Eggert
b74d536ed4 Remove unused file lib/getopt_.h
* lib/getopt_.h: Remove.  It was renamed to lib/getopt.in.h etc.
on 2011-01-08, but I forgot to remove the old file.
2017-09-13 08:47:59 -07:00
Mark Oteiza
912826a829 Remove "baroque" use of prefix argument from gensym
'cl-gensym' was simply moved here, but let us take an opportunity to
shed some historical baggage.
* lisp/subr.el (gensym): Remove special treatment of PREFIX as a
number.  Use "g" as prefix to differentiate from cl-gensym defaults.
* doc/lispref/symbols.texi (Creating Symbols): Update accordingly.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter, cl-gensym): Restore.
2017-09-13 10:38:05 -04:00
Mark Oteiza
3d96fc1536 Provide an lcms2 feature
* src/lcms.c (syms_of_lcms2): Provide "lcms2".
2017-09-13 10:36:05 -04:00
Mark Oteiza
5d4c539bd7 Add lcms2 interface
configure.ac: Add boilerplate for configuring and detecting liblcms2.
etc/NEWS: Mention new configure option and color-distance change.
src/Makefile.in: Add references to lcms.c and liblcms.
src/emacs.c: Define lcms2 symbols.
src/lcms.c: New file.
src/lisp.h: Add declaration for lcms2.
src/xfaces.c: Add optional METRIC argument.
2017-09-13 10:27:37 -04:00
Mark Oteiza
9a8bbb9d5d ; Fix previous commit
Removing extraneous code, thanks to Michael Heerdegen.
* lisp/emacs-lisp/subr-x.el (internal--listify): Remove latter
condition which always evaluates to t.
(internal--build-binding-value-form): Remove dead code.
2017-09-13 10:19:59 -04:00
Mark Oteiza
d532caaeee Add other D series white points and some simple conversions
* lisp/color.el (color-d75-xyz, color-d55-xyz, color-d50-xyz): New
constants.
(color-xyz-to-xyy, color-xyy-to-xyz, color-lab-to-lch):
(color-lch-to-lab): New functions.
2017-09-13 10:00:39 -04:00
Mark Oteiza
8d433d9b22 Permit non-integral color gradients
* lisp/color.el (color-gradient): Float the step-number.
2017-09-13 09:59:37 -04:00
Katsumi Yamaoka
61b8f9c490 Protect against malformed MIME messages that cause inf-loop (bugfix)
* lisp/gnus/gnus-art.el (gnus-article-mime-handles):
Protect against malformed MIME messages that cause inf-loop.
2017-09-13 10:04:14 +00:00
Paul Eggert
a0202fdc85 Merge from Gnulib
This incorporates:
2017-09-13 all: prefer https: URLs
This just changes http: to https: in comments,
in files copied from Gnulib.
2017-09-13 02:08:36 -07:00