The second argument of `run-with-idle-timer' is Boolean, i.e. only nil
and non-nil values are distinguished. Passing a number here is
confusing. Pass a descriptive symbol instead.
* lisp/frame.el (blink-cursor-mode, blink-cursor-check): Use
:repeat symbol instead of number for second argument of
`run-with-idle-timer'
Philipp Stephani [Tue, 27 Sep 2016 18:47:23 +0000 (20:47 +0200)]
Make querying to kill processes customizable
Introduce a new customization option, `confirm-kill-processes', that
users can set to nil if they don't want Emacs to nag them about killing
processes.
* lisp/files.el (confirm-kill-processes): New customization option.
(save-buffers-kill-emacs): Use customization option.
* test/lisp/files-tests.el
(files-test--save-buffers-kill-emacs--confirm-kill-processes): Add
test for new customization option.
* doc/emacs/entering.texi (Exiting): Document new user option.
* doc/lispref/processes.texi (Query Before Exit): Document new
user option.
Eli Zaretskii [Sat, 1 Oct 2016 08:14:05 +0000 (11:14 +0300)]
Bump Emacs version to 26.0.50
* README:
* configure.ac:
* etc/NEWS:
* etc/refcards/ru-refcard.tex:
* msdos/sed2v2.inp:
* src/msdos.c: Increment Emacs version to 26.0.50.
* etc/NEWS.25: New file, copied from etc/NEWS with post-25.1 stuff
moved to etc/NEWS.
Eli Zaretskii [Sat, 1 Oct 2016 07:12:53 +0000 (10:12 +0300)]
Avoid compilation warning on MinGW
* src/w32.c: Include string.h, needed for the prototype of
'strerror', shadowed by 'sys_strerror'. This avoids a compiler
warning about "no previous prototype". The string.h header
must be included after ms-w32.h, but before "#undef strerror".
Paul Eggert [Fri, 30 Sep 2016 19:14:04 +0000 (12:14 -0700)]
Limit <config.h>’s includes
This follows up on recent problems with the fact that config.h
includes stdlib.h etc.; some files need to include stdlib.h later.
config.h generally should limit itself to includes that are
universally safe; outside of MS-Windows, only stdbool.h makes
the cut among the files currently included. So, move the
other includes to just the files that need them (Bug#24506).
* configure.ac (config_opsysfile): Remove, as this generic hook
is no longer needed.
* lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c:
* src/w32proc.c (_GNU_SOURCE):
Remove, as it’s OK for config.h to do this now.
* src/conf_post.h: Include <ms-w32.h>, instead of the generic
config_opsysfile, for simplicity as this old way of configuring is
now done only for the MS-Windows port. Do not include <ms-w32.h>
if DEFER_MS_W32_H, for the benefit of the few files that want its
effects later. Do not include <alloca.h>, <string.h>, or
<stdlib.h>. Other files modified to include these headers as
needed, or to not include headers that are no longer needed.
* src/lisp.h: Include <alloca.h> and <string.h> here, since
some of the inline functions need them.
* src/regex.c: Include <alloca.h> if not emacs. (If emacs,
we can rely on SAFE_ALLOCA.) There is no longer any need to
worry about HAVE_ALLOCA_H.
* src/unexmacosx.c: Rely on config.h not including stdlib.h.
* src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H):
Define before including <config.h> first, and include <ms-w32.h>
after the troublesome headers.
* src/eval.c (syms_of_eval) <debugger-stack-frame-as-list>: New
variable.
* lisp/cus-start.el (standard): Add debugger-stack-frame-as-list.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Adjust
backtrace processing for the value of debugger-stack-frame-as-list.
* lisp/emacs-lisp/edebug.el (edebug-backtrace): Adjust backtrace
processing for the value of debugger-stack-frame-as-list.
* doc/lispref/debugging.texi (Internals of Debugger): Document
debugger-stack-frame-as-list.
* etc/NEWS: Mention 'debugger-stack-frame-as-list'.
Paul Eggert [Fri, 30 Sep 2016 03:09:37 +0000 (20:09 -0700)]
Fix problems found by static checking --with-ns
This is for Fedora 24 when configured with --enable-gcc-warnings.
Although it does not fix all the problems, it fixes many of them.
* src/frame.c (XParseGeometry):
* src/nsterm.m (mouseDown:):
Mark locals with UNINIT to pacify --enable-gcc-warnings.
* src/image.c (PIX_MASK_DRAW, DefaultDepthOfScreen):
Remove unused macros.
(slurp_file xbm_scan, xbm_read_bitmap_data, xbm_load_image)
(xbm_file_p, xbm_load, xpm_scan, xpm_make_color_table_v)
(xpm_put_color_table_v, xpm_get_color_table_v)
(xpm_make_color_table_h, xpm_put_color_table_h)
(xpm_get_color_table_h, xpm_load_image, xpm_load)
(pbm_next_char, pbm_scan_number, pbm_load, svg_load)
(svg_load_image):
* src/nsfns.m (x_get_string_resource):
* src/nsimage.m (ns_image_from_XBM):
Fix pointer signedness problems.
* src/image.c (xpm_load_image, x_build_heuristic_mask, pbm_load)
(imagemagick_load_image): Omit unused locals.
* src/nsfns.m (ns_send_types, ns_return_types, ns_drag_types)
(Fx_open_connection):
* src/nsfont.m (ns_antialias_threshold):
Move extern decl to nsterm.h so it can be checked.
* src/nsmenu.m (svcsMenu, dockMenu):
Move to the only file that uses them, so they can be static.
* src/nsterm.h (find_and_call_menu_selection):
* src/nsterm.m (x_set_frame_alpha):
Omit duplicate decls.
* src/nsterm.h (ns_dump_glyphstring): Mark as EXTERNALLY_VISIBLE.
* src/nsfns.m (ns_tooltip, ns_display_info_for_name)
(ns_set_name_as_filename, x_set_menu_bar_lines)
(x_set_tool_bar_lines, x_set_internal_border_width):
* src/nsterm.m (ns_drag_types, ns_draw_text_decoration):
Now static.
* src/nsfns.m (ns_lisp_to_cursor_type, ns_cursor_type_to_lisp):
* src/nsterm.m (ns_free_indexed_color, ns_color_to_lisp):
Remove; unused.
* src/nsfont.m (ns_dump_glyphstring):
* src/nsterm.m (hide_bell, ns_get_color, ns_color_to_lisp)
(ns_clear_frame, keyDown:):
Fix signedness problem with printf arg.
* src/nsterm.h (ns_input_events, ns_finish_events):
* src/nsterm.m (ns_finish_events, hide_bell):
Prototype the decls.
* src/nsterm.m (NSMenuDidBeginTrackingNotification):
Omit unnecessary decl.
(dockMenu):
(mainMenu) [NS_IMPL_COCOA]: Now static, and in this file.
(ns_dumpglyphs_box_or_relief, changeFont:, initFrameFromEmacs:)
(toggleFullScreen:): Use FACE_FROM_ID instead of
FACE_FROM_ID_OR_NULL in contexts where the caller expects the
result to be non-null.
(applicationShouldTerminate:): Fix misleading indentation.
Paul Eggert [Mon, 26 Sep 2016 20:39:17 +0000 (13:39 -0700)]
Merge from origin/emacs-25
9fc9988 Improve documentation of 'expand-abbrev' and wrapper hooks c14a1d4 Minor copyedits of MS-Windows installation instructions f281924 Fix display of cursor when 'blink-cursor-delay' has small value
Paul Eggert [Mon, 26 Sep 2016 20:37:36 +0000 (13:37 -0700)]
; Merge from origin/emacs-25
The following commits were skipped:
7cb120e Improve the doc string of 'format' 3a9866e Improve doc strings in whitespace.el 2e2469b Improve detectability of 'next-logical-line' and 'previous-lo... 16e6207 Fix (next-frame nil t) crash (Bug#24281) 3f539c0 Fix debugging of string-match-p errors f746a92 Fix region display while dragging mouse df4f812 Fix 'vertical-motion' and 'posn-at-point' under 'visual-line-... 9135bd7 Improve display of tex-verbatim and Info quoted e0dd65c Document how to check for ImageMagick support dc1e0ac Run find-function-after-hook after finding a symbol
Paul Eggert [Mon, 26 Sep 2016 20:32:28 +0000 (13:32 -0700)]
Merge from origin/emacs-25
0ffc9ce Update admin/authors.el 0ad7410 Update Antinews in ELisp manual ea0f750 Fix comments on window height macros 0bbdeed Fix 'url-http-create-request' when cookies are used 0045998 Fix cross reference in frames.texi 1392894 ; * etc/DEBUG: Minor copyedits. 304a5c8 ; * etc/DEBUG: Improve documentation of getting control to GDB. 56bf7d7 Fix regexp-opt documentation (bug #17862) 803ad6f ; Fix documentation of seq-subseq ed4530d * lisp/emacs-lisp/gv.el (gv-ref): Fix example of PLACE in doc... 88ea396 ; Spelling fixes 17197d0 Fix tags-query-replace docstring 80a7f8b Clarify documentation of precision in format specs 88a5052 Improve and clarify documentation of subprocesses 89eb09f * etc/PROBLEMS: Mention gnutls-cli 3.5.3 (Bug#24247).
Eli Zaretskii [Mon, 26 Sep 2016 16:02:01 +0000 (19:02 +0300)]
Improve documentation of 'expand-abbrev' and wrapper hooks
* lisp/simple.el (filter-buffer-substring-functions)
(buffer-substring--filter): Add a link to 'with-wrapper-hook' as
the place to look for documentation of wrapper hooks.
* lisp/minibuffer.el (completion-in-region-functions)
(completion--in-region): Add a link to 'with-wrapper-hook' as the
place to look for documentation of wrapper hooks.
* lisp/abbrev.el (expand-abbrev, abbrev--default-expand): Clarify
the doc strings. (Bug#24540)
* doc/lispref/text.texi (Buffer Contents): Mention
'with-wrapper-hook's doc string as the place to learn about that
obsolete facility.
* lisp/textmodes/css-mode.el (css-class-list-function): New variable
holding the function to call for retrieving completions of class
names.
(css-id-list-function): New variable holding the function to call for
retrieving completions of IDs.
(css--foreign-completions): New function for retrieving completions
from other buffers.
(css--complete-selector): Support completing HTML class names and IDs
from other buffers in addition to completing HTML tags.
* lisp/textmodes/sgml-mode.el (html--buffer-classes-cache): New
variable holding a cache for `html-current-buffer-classes'.
(html--buffer-ids-cache): New variable holding a cache for
`html-current-buffer-ids'.
(html-current-buffer-classes): New function returning a list of class
names used in the current buffer.
(html-current-buffer-ids): New function returning a list of IDs used
in the current buffer.
(html-mode): Set `css-class-list-function' and `css-id-list-function'
to `html-current-buffer-classes' and `html-current-buffer-ids'
respectively.
Paul Eggert [Sat, 24 Sep 2016 09:35:13 +0000 (02:35 -0700)]
Improve integer overflow handling a bit
* src/charset.c (read_hex): Use INT_LEFT_SHIFT_OVERFLOW for clarity.
The machine code is the same on my platform.
* src/doprnt.c (doprnt):
* src/emacs-module.c (module_funcall):
* src/font.c (font_intern_prop):
* src/keyboard.c (Frecursion_depth):
* src/lread.c (read1):
Use WRAPV macros instead of checking overflow by hand.
* src/editfns.c (hi_time, time_arith, decode_time_components):
* src/emacs-module.c (Fmodule_load):
Simplify by using FIXNUM_OVERFLOW_P.
* src/emacs-module.c: Include intprops.h.
* src/xdisp.c (percent99): New function.
(decode_mode_spec): Use it to simplify overflow avoidance and
formatting of %p and %P.
Eli Zaretskii [Fri, 23 Sep 2016 14:25:55 +0000 (17:25 +0300)]
Fix display of cursor when 'blink-cursor-delay' has small value
* lisp/frame.el (blink-cursor-check, blink-cursor-mode):
Protect ourselves against too small values of blink-cursor-delay.
This avoids erratic display of the cursor, or even failure to
display it, when user types text at high speed or leans on a key
to invoke the keyboard auto-repeat feature. (Bug#24372)
Noam Postavsky [Sat, 6 Aug 2016 02:11:00 +0000 (22:11 -0400)]
Fix debugging of string-match-p errors
* src/eval.c (call_debugger): Bind inhibit-changing-match-data to nil so
that debugger code that needs to do regexp match won't break
(Bug #23949, Bug #24166, Bug#16294).
Eli Zaretskii [Sat, 30 Jul 2016 08:32:02 +0000 (11:32 +0300)]
Fix region display while dragging mouse
* lisp/mouse.el (mouse-drag-track): Reset deactivate-mark in the
buffer of the drag event, to allow mark to be set and the region
be shown as we drag the mouse. (Bug#24030)
Eli Zaretskii [Sat, 21 May 2016 09:35:08 +0000 (12:35 +0300)]
Fix 'vertical-motion' and 'posn-at-point' under 'visual-line-mode'
* src/xdisp.c (move_it_in_display_line_to): Don't assume we can
wrap on a whitespace character if it's followed by another
whitespace character. When returning under WORD_WRAP for a screen
line that is continued, restore to wrap point when atpos/atx
position would be displayed on the next screen line due to
line-wrap. (Bug#23570)
Paul Eggert [Fri, 13 May 2016 20:30:33 +0000 (13:30 -0700)]
Improve display of tex-verbatim and Info quoted
Problem reported by Glenn Morris (Bug#19889).
* doc/emacs/display.texi (Standard Faces):
* doc/lispref/display.texi (Basic Faces):
* etc/NEWS: Mention fixed-pitch-serif.
* lisp/faces.el (face-font-family-alternatives):
New family alias Monospace Serif.
(fixed-pitch-serif): New face, which uses the new family.
* lisp/info.el (Info-quoted):
* lisp/textmodes/tex-mode.el (tex-verbatim): Use the new face.
* test/lisp/legacy/font-parse-tests.el (font-parse-tests--data):
Add test case for Monospace Serif.
Run find-function-after-hook after finding a symbol
* lisp/emacs-lisp/find-func.el (find-library):
* lisp/help-mode.el (help-function-def, help-variable-def):
Run `find-function-after-hook' inside the help-function of the
buttons (bug#22583).
* etc/NEWS: Mention the change.
Eli Zaretskii [Fri, 23 Sep 2016 08:27:18 +0000 (11:27 +0300)]
Improve documentation of overlay priorities
* doc/lispref/display.texi (Overlay Properties): Minor copyedits.
By popular demand, mention the '(PRIMNARY . SECONDARY)' form of
overlay properties used for the region. (Bug#20253)
Eli Zaretskii [Fri, 23 Sep 2016 08:08:34 +0000 (11:08 +0300)]
Fix 'dired-compress-files'
* lisp/dired-aux.el (dired-do-compress-to): Make sure the archive
file name is fully expanded by running it through
'expand-file-name'. Suggested by Drew Adams <drew.adams@oracle.com>.
(Bug#24486) Doc fix.
* lisp/dired.el: Regenerated changes in autoloads.
Eli Zaretskii [Fri, 23 Sep 2016 07:52:07 +0000 (10:52 +0300)]
Update commentary of STRING_CHAR and FETCH_MULTIBYTE_CHAR
* src/character.h (STRING_CHAR):
* src/buffer.h (FETCH_MULTIBYTE_CHAR): Update commentary: these
two macros no longer do any character unification, so the caveats
in those comments are no longer pertinent.
Paul Eggert [Wed, 21 Sep 2016 22:17:20 +0000 (15:17 -0700)]
Port recent flexmember changes to NetBSD
The NetBSD library supports localtime_rz directly, and without
this change 'configure' omitted the flexmember test that is marked
as conditional on localtime_rz. Emacs now needs to use
flexmember.m4 even when localtime_rz works.
Problem reported by Thomas Klausner.
* admin/merge-gnulib (GNULIB_MODULES): Add flexmember.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
Eli Zaretskii [Wed, 21 Sep 2016 15:10:29 +0000 (18:10 +0300)]
Fix tagging of DEFUN by etags
* lib-src/etags.c (C_entries): Tag DEFUN twice: once with its C
name, and then again with its Lisp name. This restores the
ability to find Lisp primitives by their C name, which was lost
when the etags back-end was switched to a more strict search
criteria.
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6:
* test/etags/CTAGS.good: Adapt to the changes in etags.c wrt
tagging DEFUN.
Eli Zaretskii [Wed, 21 Sep 2016 15:00:18 +0000 (18:00 +0300)]
Avoid resetting track-mouse by mouse clicks
* lisp/mouse.el (mouse-drag-line, mouse-drag-track): Don't assume
the previous value of track-mouse is nil; instead, save and
restore the previous value. (Bug#24480)
Paul Eggert [Tue, 20 Sep 2016 15:30:17 +0000 (08:30 -0700)]
Use flexmembers on IBM XL C for AIX
This removes a workaround where Emacs did not use flexible
array members when compiled with IBM XL C. Instead, avoid
the problem by making the aliasing issues more obvious to
this compiler.
* admin/merge-gnulib: Don’t remove m4/flexmember.m4.
* m4/flexmember.m4: Copy from gnulib.
* configure.ac (AC_C_FLEXIBLE_ARRAY_MEMBER): Remove workaround.
* src/alloc.c (allocate_string_data): Rephrase to avoid aliasing
problem that would otherwise mess up code generated for flexible
array members by IBM XL C for AIX, V12.1.
* src/conf_post.h (FLEXIBLE_ARRAY_MEMBER): Remove; now done
by gnulib code.
Michael Albinus [Mon, 19 Sep 2016 12:21:35 +0000 (14:21 +0200)]
Fix a problem with Tramp when the temporary dir isn't C:/Temp on w32
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name): Don't use
`tramp-drop-volume-letter' any longer, it causes collateral
damages. Reported by Chris Zheng <chriszheng99@gmail.com>.
Paul Eggert [Sat, 17 Sep 2016 22:06:24 +0000 (15:06 -0700)]
Port January __morecore changes to AIX 7.1
* src/vm-limit.c (__MALLOC_HOOK_VOLATILE, __morecore)
(__after_morecore_hook):
* src/ralloc.c (__morecore):
Declare if DOUG_LEA_MALLOC is not defined, not if HAVE_MALLOC_H is
not defined. <malloc.h> does not declare these in AIX 7.1.
Paul Eggert [Sat, 17 Sep 2016 18:05:07 +0000 (11:05 -0700)]
Define _GNU_SOURCE in files delaying config.h
Problem reported by Richard Copley in:
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00440.html
* src/w32.c, src/w32notify.c, src/w32proc.c (_GNU_SOURCE):
Define early.
Eli Zaretskii [Sat, 17 Sep 2016 16:12:46 +0000 (19:12 +0300)]
Update the bidi test code and data
* test/manual/BidiCharacterTest.txt: Import the version from
Unicode Standard 9.0.0.
* test/manual/biditest.el (biditest-generate-testfile): Allow 'x'
in the 4th field of the test data.
Alan Mackenzie [Sat, 17 Sep 2016 12:43:54 +0000 (12:43 +0000)]
Improve accuracy of line/column numbers in byte compiler's warning messages.
* lisp/emacs-lisp/bytecomp.el (byte-compile-set-symbol-position): ensure new
value of byte-compile-last-position is not lower than old value.
(byte-compile-function-warn): call byte-compile-set-symbol-position.
Eli Zaretskii [Sat, 17 Sep 2016 09:20:09 +0000 (12:20 +0300)]
Document that desktop file overrides frame parameters
* doc/emacs/misc.texi (Saving Emacs Sessions):
* doc/emacs/frames.texi (Frame Parameters): Document that frame
parameters restored by desktop.el take precedence over the
customizations in the init file, and explain how to countermand
that. For the details of the issue, see
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00318.html.
Paul Eggert [Sat, 17 Sep 2016 01:01:39 +0000 (18:01 -0700)]
Define _GNU_SOURCE in unexmacosx.c
Problem reported by Bob Halley in:
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00427.html
* src/unexmacosx.c (_GNU_SOURCE): Define if not already defined.
Alan Mackenzie [Fri, 16 Sep 2016 10:47:55 +0000 (10:47 +0000)]
C Mode: Fix mis-fontification of macro invocation as function declaration
This happened with a macro invocation which was followed by a statement block
in braces.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): CASE 11: distinguish
between contexts nil and top, being less permissive in the former case.
(c-just-after-func-arglist-p): call c-forward-decl-or-cast-1 with context top.
Paul Eggert [Thu, 15 Sep 2016 22:25:33 +0000 (15:25 -0700)]
Prefer now-standard int width macros
* src/data.c (ULL_WIDTH):
* src/lisp.h (EMACS_INT_WIDTH, BITS_PER_BITS_WORD):
* src/lread.c (read_integer):
* src/term.c (produce_glyphless_glyph):
* src/xterm.c (x_send_scroll_bar_event):
Use *_WIDTH macros instead of CHAR_BIT * sizeof.
* src/data.c (ULL_WIDTH): Rename from BITS_PER_ULL for consistency
with the *_WIDTH standard macros. All uses changed.
* src/gmalloc.c (INT_BIT): Remove. All uses replaced with INT_WIDTH.
* src/lisp.h (EMACS_INT_WIDTH): Rename from BITS_PER_EMACS_INT
for consistency with the *_WIDTH standard macros. All uses changed.
(BITS_PER_CHAR): Remove; all uses replaced by CHAR_BIT. This must
be the same as CHAR_WIDTH and avoids confusion with Elisp
char-width, which counts columns not bits.
(BITS_PER_SHORT): Remove; all uses replaced by SHRT_WIDTH.
(BITS_PER_LONG): Remove; all uses replaced by LONG_WIDTH.
* src/lread.c: Do not include limits.h since CHAR_BIT is no longer
used directly.
Paul Eggert [Thu, 15 Sep 2016 18:50:23 +0000 (11:50 -0700)]
Update from gnulib
This incorporates:
2016-09-15 stdint: support new _WIDTH macros
2016-09-15 limits-h: new module
2016-09-15 sys_types: avoid glibc 2.25 warnings about major()
2016-09-15 extensions: port to more ISO C TSes
2016-09-13 intprops: new macro TYPE_WIDTH
2016-09-13 extensions: port to recent ISO C TRs
* .gitignore: Add lib/limits.h.
* doc/misc/texinfo.tex, lib/ftoastr.h, lib/intprops.h:
* lib/stdint.in.h, m4/extensions.m4, m4/stdint.m4, m4/stdio_h.m4:
* m4/sys_types_h.m4: Copy from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/limits.in.h, m4/limits-h.m4: New files, copie from gnulib.
* nt/gnulib.mk: Merge changes from lib/gnulib.mk.