]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years ago; Merge from origin/emacs-26
Paul Eggert [Mon, 25 Sep 2017 18:16:05 +0000 (11:16 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

546413e1ac * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 ...

7 years agoMerge from origin/emacs-26
Paul Eggert [Mon, 25 Sep 2017 18:16:05 +0000 (11:16 -0700)]
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

7 years agoemacs-25 → emacs-26
Paul Eggert [Mon, 25 Sep 2017 15:56:07 +0000 (08:56 -0700)]
emacs-25 → emacs-26

* admin/gitmerge.el (gitmerge-default-branch): Now emacs-26.

7 years agoExpand recognized time intervals for MPC seeking
Mark Oteiza [Sun, 24 Sep 2017 12:17:34 +0000 (08:17 -0400)]
Expand recognized time intervals for MPC seeking

Now accepts [+-]H:M:S and subsets.  Also accepts some odd variations of
it since the regexp is not strict.  One unpleasant caveat is that
string-to-number simply returns zero on failure instead of signaling an
error.  At the moment, there are cases where instead of getting
a user-error, the seek may simply not go where one expects it.
* lisp/mpc.el (mpc-read-seek): New function.
(mpc-seek-current): Use it.

7 years agoAdd configuration for clang-format.
Philipp Stephani [Tue, 19 Sep 2017 08:48:02 +0000 (10:48 +0200)]
Add configuration for clang-format.

This allows developers to auto-format the C code with clang-format.
It’s not 100% accurate, but works pretty well for most of the C code.

7 years agoMake FILENAME argument of 'file-name-base' mandatory
Philipp Stephani [Tue, 19 Sep 2017 08:29:42 +0000 (10:29 +0200)]
Make FILENAME argument of 'file-name-base' mandatory

* lisp/files.el (file-name-base): Make FILENAME argument mandatory.

* lisp/autoinsert.el (auto-insert-alist):
* lisp/progmodes/cperl-mode.el (cperl-electric-pod):
* lisp/progmodes/idlwave.el (idlwave-parse-definition):
* lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes): Fix
all callers.

7 years ago* lisp/newcomment.el (comment-search-backward): Obey the docstring (bug#28428)
Stefan Monnier [Sat, 23 Sep 2017 21:06:23 +0000 (17:06 -0400)]
* lisp/newcomment.el (comment-search-backward): Obey the docstring (bug#28428)

7 years agoDon't attempt to disable double buffering in newer GTK+ versions
Philipp Stephani [Sun, 27 Aug 2017 10:45:52 +0000 (12:45 +0200)]
Don't attempt to disable double buffering in newer GTK+ versions

* src/gtkutil.c (xg_create_frame_widgets): Stop calling deprecated
function gtk_widget_set_double_buffered.

7 years agoGTK+: Stop querying for background colors.
Philipp Stephani [Sun, 27 Aug 2017 10:31:37 +0000 (12:31 +0200)]
GTK+: Stop querying for background colors.

* src/gtkutil.c (xg_check_special_colors): Don't call deprecated
function gtk_style_context_get_background_color in newer versions of
GTK+.

7 years agoGTK+: stop calling 'gtk_window_set_wmclass' in new versions
Philipp Stephani [Sun, 27 Aug 2017 11:08:37 +0000 (13:08 +0200)]
GTK+: stop calling 'gtk_window_set_wmclass' in new versions

* src/gtkutil.c (xg_create_frame_widgets): Stop calling deprecated
function 'gtk_window_set_wmclass' in GTK+ 3.22.

7 years agoGTK+: Use a style provider instead of deprecated function
Philipp Stephani [Sun, 27 Aug 2017 10:42:56 +0000 (12:42 +0200)]
GTK+: Use a style provider instead of deprecated function

* src/gtkutil.c (xg_set_widget_bg): Use a CSS style provider instead
of the deprecated gtk_widget_override_background_color.

7 years agoTeach Emacs to set XTerm window titles
Mark Oteiza [Wed, 20 Sep 2017 15:39:37 +0000 (11:39 -0400)]
Teach Emacs to set XTerm window titles

* lisp/term/xterm.el (terminal-init-xterm): Add initialization.
(xterm--init-frame-title, xterm-set-window-title-flag):
(xterm-unset-window-title-flag, xterm-set-window-title): New functions.
(xterm-window-title-flag): New variable.
(xterm-set-window-title): New custom variable.
* etc/NEWS: Mention it.

7 years agoDon't call deprecated GTK function gtk_adjustment_changed
Philipp Stephani [Sun, 27 Aug 2017 10:41:06 +0000 (12:41 +0200)]
Don't call deprecated GTK function gtk_adjustment_changed

* src/gtkutil.c (xg_set_toolkit_scroll_bar_thumb)
(xg_set_toolkit_horizontal_scroll_bar_thumb): Remove calls to
deprecated function gtk_adjustment_changed.  This function has been
deprecated since GTK+ 3.18.

7 years agoFix bug#28435: "all" score file is ignored
Sam Steingold [Mon, 18 Sep 2017 20:33:37 +0000 (16:33 -0400)]
Fix bug#28435: "all" score file is ignored

(gnus-score-find-bnews): Fix removing the empty suffix.

7 years agoAdd define-thing-chars and use it for filename.
Sam Steingold [Mon, 18 Sep 2017 16:54:29 +0000 (12:54 -0400)]
Add define-thing-chars and use it for filename.

(define-thing-chars): New defmacro.
(filename): Define this thing using `define-thing-chars'.

7 years agoRevert "Implement native JSON support using Jansson"
Philipp Stephani [Mon, 18 Sep 2017 16:00:45 +0000 (18:00 +0200)]
Revert "Implement native JSON support using Jansson"

This reverts commit cb99cf5a99680af7dc2c49fdf5b840d1ff4dd928.

7 years agoImplement native JSON support using Jansson
Philipp Stephani [Mon, 18 Sep 2017 08:51:39 +0000 (10:51 +0200)]
Implement native JSON support using Jansson

* configure.ac: New option --with-json.

* src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string)
(Fjson_parse_buffer): New defuns.
(json_out_of_memory, json_parse_error, json_release_object)
(check_string_without_embedded_nulls, json_check, lisp_to_json)
(json_insert, json_insert_callback, json_to_lisp)
(json_read_buffer_callback, Fjson_parse_buffer, define_error): New
helper function.
(syms_of_json): New file.

* src/lisp.h: Declaration for syms_of_json.

* src/emacs.c (main): Enable JSON functions.

* src/Makefile.in (JSON_LIBS, JSON_CFLAGS, JSON_OBJ, EMACS_CFLAGS)
(base_obj, LIBES): Compile json.c if --with-json is enabled.

* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/object, json-parse-string/object): New unit tests.

7 years agoFix irregularities with CC Mode fontification, particularly with "known types"
Alan Mackenzie [Mon, 18 Sep 2017 08:52:24 +0000 (08:52 +0000)]
Fix irregularities with CC Mode fontification, particularly with "known types"

* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Introduce a new
optional parameter, template-class.  In "class <X = Y>", fontify "Y" as a
type.
(c-font-lock-single-decl): New variable template-class, set to non-nil when we
have a construct like the above.  Pass this as argument to
c-font-lock-declarators.
(c-font-lock-cut-off-declarators): Check more rigorously that a declaration
being processed starts before the function's starting position.
(c-complex-decl-matchers): Remove the redundant clause which fontified "types
preceded by, e.g., "struct"".

* lisp/progmodes/cc-langs.el (c-template-typename-kwds)
(c-template-typename-key): New lang defconsts and defvar.

7 years ago* lisp/net/trampver.el (customize-package-emacs-version-alist):
Michael Albinus [Sun, 17 Sep 2017 08:08:54 +0000 (10:08 +0200)]
* lisp/net/trampver.el (customize-package-emacs-version-alist):

Add Tramp version integrated in Emacs 26.1.

7 years ago* test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.
Glenn Morris [Sat, 16 Sep 2017 20:27:25 +0000 (13:27 -0700)]
* test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.

(cherry picked from commit 8081df26911c63aadfce4ee8f6a7223d814baeaf)

7 years ago* test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.
Glenn Morris [Sat, 16 Sep 2017 20:27:25 +0000 (13:27 -0700)]
* test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.

7 years ago; * src/lcms.c: Minor stylistic changes in comments.
Eli Zaretskii [Sat, 16 Sep 2017 19:25:13 +0000 (22:25 +0300)]
; * src/lcms.c: Minor stylistic changes in comments.

7 years agoFix compilation warning in etags.c
Eli Zaretskii [Sat, 16 Sep 2017 19:17:55 +0000 (22:17 +0300)]
Fix compilation warning in etags.c

* lib-src/etags.c (etags_mktmp) [DOS_NT]: Don't dereference a NULL
pointer.  Reported by Richard Copley <rcopley@gmail.com>.

7 years agoAdd lisp variable lcms-d65-xyz
Mark Oteiza [Sat, 16 Sep 2017 16:49:28 +0000 (12:49 -0400)]
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.

7 years ago* lisp/emacs-lisp/cl-macs.el (cl-letf): Fix Edebug spec (bug#24765)
Gemini Lasswell [Tue, 25 Apr 2017 14:42:01 +0000 (07:42 -0700)]
* lisp/emacs-lisp/cl-macs.el (cl-letf): Fix Edebug spec (bug#24765)

7 years agoAvoid MinGW64 compiler warnings in unexw32.c
Andy Moreton [Sat, 16 Sep 2017 13:44:39 +0000 (16:44 +0300)]
Avoid MinGW64 compiler warnings in unexw32.c

* src/unexw32.c (pDWP) [MINGW_W64]: Define to "16llx" only for the
64-bit build.

7 years agoIncrement Emacs version to 27.0.50
Eli Zaretskii [Sat, 16 Sep 2017 12:53:03 +0000 (15:53 +0300)]
Increment Emacs version to 27.0.50

* README:
* configure.ac:
* nt/README.W32:
* src/msdos.c (internal_terminal_init):
* msdos/sed2v2.inp:
* etc/refcards/ru-refcard.tex: Increment Emacs version to 27.0.50.
* etc/NEWS: New file with sections for Emacs 27.1.
* etc/NEWS.26: Renamed from etc/NEWS.

7 years agoStart emacs-26 release branch
Eli Zaretskii [Sat, 16 Sep 2017 12:34:15 +0000 (15:34 +0300)]
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".

7 years agoCope better with C++ and Objective-C protection keywords in class declarations
Alan Mackenzie [Sat, 16 Sep 2017 11:31:38 +0000 (11:31 +0000)]
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.

7 years agoFix order of sorted overlays returned by 'overlays-at'
Eli Zaretskii [Sat, 16 Sep 2017 10:02:31 +0000 (13:02 +0300)]
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.

7 years agoDisable execution of unsafe Lisp by Enriched Text mode
Eli Zaretskii [Sat, 16 Sep 2017 09:45:24 +0000 (12:45 +0300)]
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.

7 years agoAvoid MinGW64 compilation warning in w32.c
Eli Zaretskii [Sat, 16 Sep 2017 08:51:24 +0000 (11:51 +0300)]
Avoid MinGW64 compilation warning in w32.c

* src/w32.c (sys_strerror): Provide a prototype for MinGW64.

7 years ago; * src/data.c (minmax_driver): Fix last change.
Eli Zaretskii [Sat, 16 Sep 2017 08:01:19 +0000 (11:01 +0300)]
; * src/data.c (minmax_driver): Fix last change.

7 years agoFix MS-Windows build broken by recent changes in lcms.c
Eli Zaretskii [Sat, 16 Sep 2017 07:41:52 +0000 (10:41 +0300)]
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.

7 years agoAvoid GCC 7 compilation warning in data.c
Eli Zaretskii [Sat, 16 Sep 2017 07:31:32 +0000 (10:31 +0300)]
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>.

7 years agoAdd lcms-temp->white-point and initial tests
Mark Oteiza [Sat, 16 Sep 2017 03:49:42 +0000 (23:49 -0400)]
Add lcms-temp->white-point and initial tests

* src/lcms.c (lcms-temp->white-point): New function.
* test/src/lcms-tests.el: New file.

7 years agoUse cl-print in timer list
Mark Oteiza [Sat, 16 Sep 2017 02:59:57 +0000 (22:59 -0400)]
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.

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vincent Belaïche [Fri, 15 Sep 2017 21:52:24 +0000 (23:52 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoMake landscape layout with geometry package rather than a PostScript special.
Vincent Belaïche [Fri, 15 Sep 2017 21:51:05 +0000 (23:51 +0200)]
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.

7 years ago* lisp/json.el (json-read-keyword): Revert previous change to catch EOL.
Mark Oteiza [Fri, 15 Sep 2017 19:37:25 +0000 (15:37 -0400)]
* lisp/json.el (json-read-keyword): Revert previous change to catch EOL.

7 years agoOne more attempt to avoid GCC 7 warnings in dispnew.c
Eli Zaretskii [Fri, 15 Sep 2017 18:59:08 +0000 (21:59 +0300)]
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.

7 years agoFix color-distance docstring
Mark Oteiza [Fri, 15 Sep 2017 17:27:39 +0000 (13:27 -0400)]
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.

7 years agoImprove Tramp behaviour according to bug#27986
Michael Albinus [Fri, 15 Sep 2017 16:29:00 +0000 (18:29 +0200)]
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.

7 years ago; Partially revert previous commit
Mark Oteiza [Fri, 15 Sep 2017 14:06:56 +0000 (10:06 -0400)]
; 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.

7 years agoMore JSON optimization
Mark Oteiza [Fri, 15 Sep 2017 13:49:27 +0000 (09:49 -0400)]
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.

7 years agoAvoid crashes due to invalid error forms from sentinels/filters
Eli Zaretskii [Fri, 15 Sep 2017 13:15:05 +0000 (16:15 +0300)]
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)

7 years agoAvoid compilation warnings with GCC 7 on MS-Windows
Eli Zaretskii [Fri, 15 Sep 2017 08:46:37 +0000 (11:46 +0300)]
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.

7 years agoDefine gnutls_rnd for WINDOWSNT and HAVE_GNUTLS3 case only
Martin Rudalics [Fri, 15 Sep 2017 07:48:54 +0000 (09:48 +0200)]
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.

7 years agoIn w32heap.c bump up DUMPED_HEAP_SIZE
Martin Rudalics [Fri, 15 Sep 2017 07:39:17 +0000 (09:39 +0200)]
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.

7 years agoBind n,p in timer-list
Mark Oteiza [Thu, 14 Sep 2017 23:52:09 +0000 (19:52 -0400)]
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.

7 years ago* lisp/net/tls.el (tls-program): Fix :version.
Glenn Morris [Thu, 14 Sep 2017 20:35:43 +0000 (16:35 -0400)]
* lisp/net/tls.el (tls-program): Fix :version.

; Ref: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00401.html

7 years ago* configure.ac (--with-lcms2, --without-lcms2): New options.
Eli Zaretskii [Thu, 14 Sep 2017 19:22:29 +0000 (22:22 +0300)]
* configure.ac (--with-lcms2, --without-lcms2): New options.

7 years ago; * etc/NEWS: Reword the lcms2 entry.
Eli Zaretskii [Thu, 14 Sep 2017 18:35:31 +0000 (21:35 +0300)]
; * etc/NEWS: Reword the lcms2 entry.

7 years agoAvoid 64-bit compilation warnings in unexw32.c
Eli Zaretskii [Thu, 14 Sep 2017 17:46:59 +0000 (20:46 +0300)]
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.

7 years agoFix warnings about formats in printf-like functions on MS-Windows
Eli Zaretskii [Thu, 14 Sep 2017 17:38:42 +0000 (20:38 +0300)]
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.

7 years agoSupport lcms2 in MS-Windows builds
Eli Zaretskii [Thu, 14 Sep 2017 16:37:35 +0000 (19:37 +0300)]
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.

7 years agoPort renameat_noreplace to openSUSE 12.3
Paul Eggert [Thu, 14 Sep 2017 14:23:13 +0000 (07:23 -0700)]
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.

7 years agoPrefer HTTPS to FTP and HTTP in documentation
Paul Eggert [Wed, 13 Sep 2017 22:52:52 +0000 (15:52 -0700)]
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.

7 years agoPrefer HTTPS to HTTP for gnu.org
Paul Eggert [Wed, 13 Sep 2017 22:46:16 +0000 (15:46 -0700)]
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.

7 years agoAdd tests for color.el
Simen Heggestøyl [Thu, 7 Sep 2017 18:40:12 +0000 (20:40 +0200)]
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.

7 years agoMake gnutls-verify-error work again with url-retrieve-synchronously
Lars Ingebrigtsen [Wed, 13 Sep 2017 18:10:51 +0000 (20:10 +0200)]
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.

7 years agoImprove backward compatibility of tramp-tests
Michael Albinus [Wed, 13 Sep 2017 18:10:40 +0000 (20:10 +0200)]
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'.

7 years ago* lisp/net/trampver.el (customize-package-emacs-version-alist):
Michael Albinus [Wed, 13 Sep 2017 18:10:10 +0000 (20:10 +0200)]
* lisp/net/trampver.el (customize-package-emacs-version-alist):

Add Tramp version integrated in Emacs 25.3.

7 years agoAdd clarification to if-let* docstring
Mark Oteiza [Wed, 13 Sep 2017 17:25:41 +0000 (13:25 -0400)]
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.

7 years agoMake fully qualified domain names more fully qualified
Lars Ingebrigtsen [Wed, 13 Sep 2017 16:08:34 +0000 (18:08 +0200)]
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.

7 years agoRemove unused file lib/getopt_.h
Paul Eggert [Wed, 13 Sep 2017 15:47:33 +0000 (08:47 -0700)]
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.

7 years agoRemove "baroque" use of prefix argument from gensym
Mark Oteiza [Wed, 13 Sep 2017 14:38:05 +0000 (10:38 -0400)]
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.

7 years agoProvide an lcms2 feature
Mark Oteiza [Wed, 13 Sep 2017 14:36:05 +0000 (10:36 -0400)]
Provide an lcms2 feature

* src/lcms.c (syms_of_lcms2): Provide "lcms2".

7 years agoAdd lcms2 interface
Mark Oteiza [Wed, 13 Sep 2017 14:27:37 +0000 (10:27 -0400)]
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.

7 years ago; Fix previous commit
Mark Oteiza [Wed, 13 Sep 2017 14:19:59 +0000 (10:19 -0400)]
; 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.

7 years agoAdd other D series white points and some simple conversions
Mark Oteiza [Wed, 13 Sep 2017 14:00:39 +0000 (10:00 -0400)]
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.

7 years agoPermit non-integral color gradients
Mark Oteiza [Wed, 13 Sep 2017 13:59:37 +0000 (09:59 -0400)]
Permit non-integral color gradients

* lisp/color.el (color-gradient): Float the step-number.

7 years agoProtect against malformed MIME messages that cause inf-loop (bugfix)
Katsumi Yamaoka [Wed, 13 Sep 2017 10:04:14 +0000 (10:04 +0000)]
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.

7 years agoMerge from Gnulib
Paul Eggert [Wed, 13 Sep 2017 09:07:03 +0000 (02:07 -0700)]
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.

7 years agoCall vc-resynch-buffer in vc-git-resolve-when-done
Dmitry Gutov [Tue, 12 Sep 2017 23:30:45 +0000 (02:30 +0300)]
Call vc-resynch-buffer in vc-git-resolve-when-done

* lisp/vc/vc-git.el (vc-git-resolve-when-done):
Call vc-resynch-buffer on the current file (bug#28121).
Move its autoload to before this function.

7 years agoAllow write-contents-functions to short-circuit buffer save
Eric Abrahamsen [Tue, 12 Sep 2017 23:06:12 +0000 (16:06 -0700)]
Allow write-contents-functions to short-circuit buffer save

Bug#28412

* lisp/files.el (basic-save-buffer): Re-arrange function so that
  write-contents-functions are run earlier. If they return non-nil,
  consider the buffer saved without requiring the buffer to be
  visiting a file.
  (save-some-buffers): This function should consider any buffer with a
  buffer-local value for write-contents-functions eligible for
  saving.
* test/lisp/files-tests.el (files-test-no-file-write-contents): New
  test.
* doc/lispref/files.texi (Saving Buffers): Mention in docs.
* etc/NEWS: And in NEWS.

7 years ago* etc/NEWS.25: Copy from emacs-25 etc/NEWS.
Paul Eggert [Tue, 12 Sep 2017 19:55:29 +0000 (12:55 -0700)]
* etc/NEWS.25: Copy from emacs-25 etc/NEWS.

7 years agoLess chatter for ’make info/dir’
Paul Eggert [Tue, 12 Sep 2017 19:17:41 +0000 (12:17 -0700)]
Less chatter for ’make info/dir’

* Makefile.in (${srcdir}/info/dir): Tweak shell command so
that an ordinary make says just "GEN info/dir" rather than
also having a seemingly-unrelated mv line.

7 years agoTweak Gnus doc re gnus-copy-file
Paul Eggert [Tue, 12 Sep 2017 19:15:22 +0000 (12:15 -0700)]
Tweak Gnus doc re gnus-copy-file

* doc/misc/gnus.texi (Saving Articles):
Document behavior with directory name targets (Bug#27986).
Problem reported by Katsumi Yamaoka in:
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00216.html

7 years agoUpdate uses of if-let and when-let
Mark Oteiza [Tue, 12 Sep 2017 17:08:47 +0000 (13:08 -0400)]
Update uses of if-let and when-let

* lisp/dom.el (dom-previous-sibling):
* lisp/emacs-lisp/package.el (package--with-work-buffer):
(package--sort-deps-in-alist, package--sort-by-dependence):
(package-install-from-archive, package-install):
(package-menu-execute, package-menu--populate-new-package-list):
* lisp/filenotify.el (file-notify--rm-descriptor):
(file-notify--event-watched-file, file-notify--event-file-name):
(file-notify--event-file1-name, file-notify-rm-watch):
(file-notify-valid-p):
* lisp/gnus/message.el (message-toggle-image-thumbnails):
* lisp/gnus/nnimap.el (nnimap-request-move-article):
* lisp/ibuf-ext.el (ibuffer-repair-saved-filters):
* lisp/mpc.el (mpc-format):
* lisp/net/eww.el (eww-tag-meta, eww-process-text-input):
(eww-save-history):
* lisp/net/shr.el (shr-tag-base, shr-tag-object, shr-make-table-1):
* lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
* lisp/svg.el (svg-remove):
* lisp/textmodes/css-mode.el (css--named-color):
(css--colon-inside-funcall):
* lisp/textmodes/sgml-mode.el (html-current-buffer-classes):
(html-current-buffer-ids): Use if-let* and when-let* instead.

7 years agoImplement and-let*
Mark Oteiza [Tue, 12 Sep 2017 16:44:45 +0000 (12:44 -0400)]
Implement and-let*

This also includes changes to if-let and when-let.  The single tuple
special case is ambiguous, and binding a symbol to nil is not as
useful as binding it to its value outside the lexical scope of the
binding.  (Bug#28254)
* etc/NEWS: Mention.
* lisp/emacs-lisp/subr-x.el (internal--listify):
(internal--build-binding-value-form): Extend to account for
solitary symbols and (EXPR) items in binding varlist.
(if-let*, when-let*): Nix single tuple case and incumbent
bind-symbol-to-nil behavior.
(and-let*): New macro.
(if-let, when-let): Mark obsolete.  Redefine in terms of if-let*, so
they implicitly gain the new features without breaking existing code.
* test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of
single-tuple special case, lack of binding solitary symbols to nil,
and the introduction of uninterned symbols for (EXPR) bindings.  Add
SRFI-2 test suite adapted to Elisp.

7 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 12 Sep 2017 16:29:45 +0000 (19:29 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

7 years agoFix minor typos in the Emacs manual
Eli Zaretskii [Tue, 12 Sep 2017 16:28:41 +0000 (19:28 +0300)]
Fix minor typos in the Emacs manual

* doc/emacs/text.texi (Org Organizer):
* doc/emacs/ack.texi (Acknowledgments): Fix spelling of Org nodes.

7 years agoMerge Emacs 25.3 fixes
Paul Eggert [Tue, 12 Sep 2017 16:24:43 +0000 (09:24 -0700)]
Merge Emacs 25.3 fixes

The security patches released for Emacs 25.3 were less drastic
than what we had immediately put into master.  Adjust master to
match 25.3 (Bug#28350).
* lisp/textmodes/enriched.el (enriched-translations):
Re-enable FUNCTION and display translations that are safe.
(enriched-handle-display-prop): Bring back.
(enriched-decode-display-prop): Bring back, but disable
the unsafe part.

7 years agoDon't match C++ template delims starting within a token. FIxes bug #28418.
Alan Mackenzie [Tue, 12 Sep 2017 16:19:52 +0000 (16:19 +0000)]
Don't match C++ template delims starting within a token.  FIxes bug #28418.

* lisp/progmodes/cc-engine.el (c-restore-<>-properties): After failing an
attempted match from the start of a token (in particular, "<<"), move to the
next token rather than the nex character before searching for the next "<".

7 years agoMove gensym to core Elisp
Mark Oteiza [Tue, 12 Sep 2017 15:08:00 +0000 (11:08 -0400)]
Move gensym to core Elisp

* doc/lispref/symbols.texi (Creating Symbols): Mention gensym right
after make-symbol.
* etc/NEWS: Mention.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Alias to
gensym-counter.
(cl-gensym): Alias to gensym.
* lisp/emacs-lisp/cl.el: Remove gensym from list of aliases.
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper):
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture):
(ert--expand-should-1, ert--expand-should):
(ert--should-error-handle-error):
* lisp/emacs-lisp/generator.el (cps--gensym):
* lisp/emacs-lisp/gv.el (setf):
* lisp/emacs-lisp/inline.el (inline--do-letlisteval):
* lisp/emacs-lisp/pcase.el (pcase--make-docstring, pcase-dolist):
(pcase--funcall, pcase--u1): Use gensym.
* lisp/subr.el (gensym-counter): New variable.
(gensym): New function, assimilated from cl-lib.

7 years agoFix cl-gentemp
Mark Oteiza [Tue, 12 Sep 2017 15:00:58 +0000 (11:00 -0400)]
Fix cl-gentemp

* lisp/emacs-lisp/cl-macs.el (cl--gentemp-counter): New variable.
(cl-gentemp): Use it.  Change prefix to "T".

7 years agognus-score-file-name: Do not append empty suffix.
Sam Steingold [Tue, 12 Sep 2017 14:31:13 +0000 (10:31 -0400)]
gnus-score-file-name: Do not append empty suffix.

7 years agoExtend tramp-tests according to bug#27986
Michael Albinus [Tue, 12 Sep 2017 09:20:49 +0000 (11:20 +0200)]
Extend tramp-tests according to bug#27986

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Extend tests.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Specifiy error symbol in `should-error'.

7 years agoAdd cl-print method for hash tables
Mark Oteiza [Tue, 12 Sep 2017 02:20:41 +0000 (22:20 -0400)]
Add cl-print method for hash tables

* lisp/emacs-lisp/cl-print.el (cl-print-object): New method.

7 years agoAdd docstrings to cl-print entry points
Mark Oteiza [Tue, 12 Sep 2017 02:16:14 +0000 (22:16 -0400)]
Add docstrings to cl-print entry points

* lisp/emacs-lisp/cl-print.el (cl-print-compiled): Fix docstring.
(cl-prin1, cl-prin1-to-string): Add docstrings.

7 years ago; Fix previous commit
Mark Oteiza [Tue, 12 Sep 2017 01:23:38 +0000 (21:23 -0400)]
; Fix previous commit

The printer otherwise includes the 0x prefix.
* lisp/emacs-lisp/cl-print.el: Add 0x to format.

7 years agoImprove reproducibility of generated leim-list.el
Glenn Morris [Mon, 11 Sep 2017 22:11:37 +0000 (18:11 -0400)]
Improve reproducibility of generated leim-list.el

* lisp/international/quail.el (quail-update-leim-list-file):
Sort the quail directory listing, for more stable output.

7 years ago; * lisp/files.el (basic-save-buffer-2): Fix typo.
Philipp Stephani [Mon, 11 Sep 2017 20:11:41 +0000 (22:11 +0200)]
; * lisp/files.el (basic-save-buffer-2): Fix typo.

7 years agoInclude sxhash of object with printed bytecode
Mark Oteiza [Mon, 11 Sep 2017 20:06:06 +0000 (16:06 -0400)]
Include sxhash of object with printed bytecode

This printing, while succint, is rather opaque.  At least give an
immediate clue of whether different byte code printouts are for the
same or different byte code objects.
* lisp/emacs-lisp/cl-print.el (cl-print-object): Add object sxhash to
printed token "#<bytecode>".

7 years agoUpdate documentation of 'max-lisp-eval-depth'
Eli Zaretskii [Mon, 11 Sep 2017 16:48:56 +0000 (19:48 +0300)]
Update documentation of 'max-lisp-eval-depth'

* doc/lispref/eval.texi (Eval): Update the documented default
value of 'max-lisp-eval-depth'.

7 years agoAnother place to produce debugging output in etags
Eli Zaretskii [Mon, 11 Sep 2017 16:44:38 +0000 (19:44 +0300)]
Another place to produce debugging output in etags

* lib-src/etags.c (Ruby_functions): One more place to print
debugging output under --debug.

7 years agoImprove documentation of etags-related features
Eli Zaretskii [Mon, 11 Sep 2017 16:40:43 +0000 (19:40 +0300)]
Improve documentation of etags-related features

* doc/emacs/maintaining.texi (Looking Up Identifiers): Document
'xref-prompt-for-identifier'.  (Bug#28403)
(Etags Regexps): Document \D back references in etags regexps.

7 years agoFix macOS compatibility versions for vibrant dark theme (bug#28415)
Alan Third [Mon, 11 Sep 2017 16:15:13 +0000 (17:15 +0100)]
Fix macOS compatibility versions for vibrant dark theme (bug#28415)

* src/nsterm.m (ns_set_appearance, EmacsView::initFrameFromEmacs):
Change macOS compatibility from 10.9 to 10.10.

7 years agoFurther optimization in Tramp's file name decomposition
Michael Albinus [Mon, 11 Sep 2017 15:12:32 +0000 (17:12 +0200)]
Further optimization in Tramp's file name decomposition

* lisp/net/tramp.el (tramp-syntax): Recompute all file name
components.  Call `custom-set-variables' after loading.
(tramp-build-prefix-format, tramp-build-prefix-regexp)
(tramp-build-method-regexp)
(tramp-build-postfix-method-format)
(tramp-build-postfix-method-regexp)
(tramp-build-prefix-ipv6-format)
(tramp-build-prefix-ipv6-regexp)
(tramp-build-postfix-ipv6-format)
(tramp-build-postfix-ipv6-regexp)
(tramp-build-postfix-host-format)
(tramp-build-postfix-host-regexp)
(tramp-build-file-name-regexp)
(tramp-build-completion-file-name-regexp): New defuns.
(tramp-prefix-format, tramp-prefix-regexp)
(tramp-method-regexp, tramp-postfix-method-format)
(tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
(tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
(tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
(tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp)
(tramp-file-name-structure, tramp-file-name-regexp)
(tramp-completion-file-name-regexp): Convert defuns into defvars.
(tramp-prefix-regexp-alist)
(tramp-postfix-method-regexp-alist)
(tramp-prefix-ipv6-regexp-alist)
(tramp-postfix-ipv6-regexp-alist)
(tramp-postfix-host-regexp-alist)
(tramp-remote-file-name-spec-regexp-alist): Remove.
(tramp-build-remote-file-name-spec-regexp)
(tramp-build-file-name-structure): Simplify.
(tramp-completion-file-name-regexp-alist): New defconst.
(tramp-tramp-file-p, tramp-dissect-file-name)
(tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name)
(tramp-rfn-eshadow-update-overlay-regexp)
(tramp-register-file-name-handlers)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-dissect-file-name, tramp-clear-passwd):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
(tramp-compute-multi-hops): Use variables but functions for
file name components.

* test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
Use variables but functions for file name components.