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.
Michael Albinus [Thu, 15 Sep 2016 07:24:07 +0000 (09:24 +0200)]
Rework fixing Bug#24432
* lisp/net/tramp.el (tramp-get-buffer): Set connection property
"process-buffer" in order to mark connection as active.
* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-set-connection-property)
(tramp-dump-connection-properties): Do not use "active" property.
(tramp-list-connections): Use "process-buffer" property.
* lisp/net/tramp-cmds.el (tramp-cleanup-connection): Flush process
properties prior deletion of process.
Eli Zaretskii [Wed, 14 Sep 2016 17:46:59 +0000 (20:46 +0300)]
Avoid compiler warning on MS-Windows due to clone_file
* src/fileio.c (clone_file): Condition on !WINDOWSNT, since the
call to it is not compiled in that build, and having it defined
causes compiler warnings.
Eli Zaretskii [Wed, 14 Sep 2016 17:41:04 +0000 (20:41 +0300)]
Avoid aborts in GC due to abort_on_gc
* src/lisp.h:
* src/print.c (Fprin1_to_string):
* src/eval.c (signal_or_quit):
* src/alloc.c (garbage_collect_1): Remove declarations, setting,
and testing the value of abort_on_gc. It is no longer needed, and
using it causes rare aborts in GC for no good reason. (Bug#23912)
Michael Albinus [Wed, 14 Sep 2016 09:49:56 +0000 (11:49 +0200)]
Fix Bug#24432
* lisp/net/tramp-cache.el (tramp-get-hash-table): Initialize a
connection as inactive.
(tramp-set-connection-property): Make the connection active.
(tramp-dump-connection-properties): Don't save "active" property.
(tramp-list-connections): List only active connections. (Bug#24432)
* lisp/net/sieve-manage.el (sieve-manage-ignore-starttls):
Rename from sieve-manage-ignore-broken-tls. If it is set,
sieve-manage will never use STARTTLS even if the server says
it is capable (but may be broken).
dired-jump: Expand file-name before dired-goto-file call
Command dired-goto-file requires its argument to be an absolute
file name. Interactively FILE-NAME is read with read-file-name,
which could return an abbreviated file name (Bug#24409).
* lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME.
Clarify in doc string the meaning of arg FILE-NAME.
sieve-manage.el: Allow user to avoid STARTTLS capability test (bug#24422)
* lisp/net/sieve-manage.el
(sieve-manage-ignore-broken-tls): New user option.
(sieve-manage-open-server):
Don't test STARTTLS capability if the option is set (bug#24422).
Fix compiler thinking width and height may be unitialised in frame.c
This fixes the following warning:
frame.c: In function ‘x_set_frame_parameters’:
frame.c:3329:25: error: ‘width’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
adjust_frame_size (f, width_change ? width : -1,
^
* src/frame.c (x_set_frame_parameters): Drop width_changed and
height_changed variables in favour of storing that information in
width and height variables.
Fix compiler thinking tmpdir may be unitialised in emacsclient
This fixes the following warning:
emacsclient.c: In function ‘set_local_socket’:
/usr/include/x86_64-linux-gnu/bits/string3.h:111:3: error:
‘tmpdir’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
^
emacsclient.c:1197:17: note: ‘tmpdir’ was declared here
const char *tmpdir;
* lib-src/emacsclient.c (set_local_socket): Get rid of use_tmpdir
variable and instead use tmpdir being non-NULL as sign that it should
be used.