Alan Mackenzie [Thu, 10 Mar 2016 11:42:32 +0000 (11:42 +0000)]
Clarify the documentation of nested comments.
* doc/lispref/syntax.texi (Syntax Flags): State that only comments of the same
style are recognized inside nestable comments.
(Low-Level Parsing): Clarify that parsing will stop after the start or end of
UNNESTED comments.
Martin Rudalics [Tue, 8 Mar 2016 07:51:38 +0000 (08:51 +0100)]
Optionally reuse tooltip frames instead of deleting/recreating them.
* src/frame.c (tooltip_reuse_hidden_frame): New option.
* src/w32fns.c (x_create_tip_frame): Remove argument TEXT. Fix
handling of dividers.
(x_hide_tip): New function.
(Fx_show_tip): Try to reuse old tooltip frame when
`tooltip-reuse-hidden-frame' is non-nil and frame parameters
have not changed. Insert STRING here instead of passing it to
x_create_tip_frame. Compute size of tooltip window with
Fwindow_text_pixel_size. Obey Vw32_tooltip_extra_pixels when
padding tooltip window.
(Fx_hide_tip): Call x_hide_tip.
(Vw32_tooltip_extra_pixels): New variable.
* src/xdisp.c (Fwindow_text_pixel_size): Don't return negative y
value. Fix doc-string.
* src/xfns.c (x_create_tip_frame): Remove argument TEXT. Call
make_frame with mini_p argument false.
(x_hide_tip): New function.
(Fx_show_tip): Try to reuse old tooltip frame when
`tooltip-reuse-hidden-frame' is non-nil and frame parameters
have not changed. Insert STRING here instead of passing it to
x_create_tip_frame. Compute size of tooltip window with
Fwindow_text_pixel_size.
(Fx_hide_tip): Call x_hide_tip.
* lisp/cus-start.el (tooltip-reuse-hidden-frame): Add
customization entry.
Paul Eggert [Tue, 8 Mar 2016 02:54:25 +0000 (18:54 -0800)]
Assume getaddrinfo in C code
* admin/CPP-DEFINES, configure.ac: Remove HAVE_GETADDRINFO, HAVE_H_ERRNO.
All uses removed.
* doc/lispref/processes.texi (Network, Network Processes), etc/NEWS:
Say that port numbers can be integer strings.
* lib-src/pop.c (h_errno) [!WINDOWSNT && !HAVE_H_ERRNO]: Remove decl.
(socket_connection): Assume HAVE_GETADDRINFO.
* lisp/mpc.el (mpc--proc-connect):
* lisp/net/network-stream.el (open-network-stream):
It’s now OK to use integer strings as port numbers.
* src/process.c (conv_numerical_to_lisp) [!HAVE_GETADDRINFO]: Remove.
(Fmake_network_process): Assume HAVE_GETADDRINFO.
Ken Brown [Sun, 6 Mar 2016 17:08:39 +0000 (12:08 -0500)]
Fix Cygwin-w32 build
* src/w32fns.c (funhook, setup_w32_kbdhook, remove_w32_kbdhook):
Define only if WINDOWSNT, and update all uses accordingly.
* src/w32term.h (check_w32_winkey_state, setup_w32_kbdhook)
(remove_w32_kbdhook): Declare only if WINDOWSNT.
(w32_kbdhook_active): Define as 0 if not WINDOWSNT.
Eli Zaretskii [Sun, 6 Mar 2016 16:52:32 +0000 (18:52 +0200)]
Unbreak the MinGW64 build
* nt/inc/ms-w32.h [MINGW_W64]: Undefine HAVE_GAI_STRERROR. See
http://lists.gnu.org/archive/html/emacs-devel/2016-03/msg00130.html
for the details. Reported by Angelo Graziosi
<angelo.graziosi@alice.it>.
* lisp/net/gnutls.el (gnutls-negotiate): Make negotiation blocking.
* src/gnutls.c (Fgnutls_boot): Provide a new keyword,
:complete-negotiation, to specify that we want complete
negotiation even if the socket is non-blocking.
(gnutls_try_handshake): Complete negotiation if given that keyword.
Eli Zaretskii [Sat, 5 Mar 2016 10:12:58 +0000 (12:12 +0200)]
Implement getaddrinfo fallback for MS-Windows
See http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01602.html
for more details.
* nt/mingw-cfg.site (ac_cv_func_getaddrinfo)
(ac_cv_func_gai_strerror): Set to "yes", as the configure script's
test program is not smart enough to auto-detect these.
* nt/inc/sys/socket.h (getaddrinfo, freeaddrinfo): Redirect to
sys_getaddrinfo and sys_freeaddrinfo. Provide prototypes for
sys_getaddrinfo and sys_freeaddrinfo.
* src/w32.c (init_winsock): Try loading getaddrinfo and
freeaddrinfo from ws2_32.dll.
(sys_getaddrinfo, sys_freeaddrinfo): New functions.
* lib-src/pop.c [WINDOWSNT]: Include winsock2.h, not winsock.h,
and also ws2tcpip.h.
(getaddrinfo, freeaddrinfo) [WINDOWSNT]: Redirect to
sys_getaddrinfo and sys_freeaddrinfo, respectively.
(load_ws2, sys_getaddrinfo, sys_freeaddrinfo) [WINDOWSNT]: New
functions.
John Wiegley [Fri, 4 Mar 2016 07:53:38 +0000 (23:53 -0800)]
Merge from origin/emacs-25
d6f6b7d * etc/AUTHORS: Update the AUTHORS file 5cf7c39 authors.el updates a26f193 ; fix changelog entries fbc85c7 ; make change-history-commit 06da00c Fix Bug#22859 ab30bf5 ; * src/w32proc.c: Update the commentary to sys_select. 1481029 Fix reordering of bidi text in an isolate inside an override 60e0596 Document c-guess-basic-syntax in the CC Mode manual.
John Wiegley [Fri, 4 Mar 2016 07:53:08 +0000 (23:53 -0800)]
Merge from origin/emacs-25
b13cab6 Add a eww command to toggle paragraph direction 4e46128 * nextstep/WISHLIST: Merge into etc/TODO and remove. 9e078e5 Fix char signedness issue in bidi code 064adf6 * lib-src/pop.c (socket_connection): Fix format string. 14060a9 Avoid inflooping in thing-at-point-looking-at 098d47b * lisp/emacs-lisp/derived.el (define-derived-mode): Revert
indent change. b5db8e0 etc/PROBLEMS: Mention problems with using file descriptors ec10ef9 * lisp/apropos.el (apropos-variable): Doc fix. (Bug#22813). d2dd614 Remove unneeded workaround in xftfont.c 9b7593c ; * etc/NEWS: Reflect latest changes in saveplace. fde0cd1 * lisp/saveplace.el (save-place-local-mode): New minor mode 06a872b Fix redisplay on a TTY after 'make-frame' 95f5a43 Make double-click-1 work with unbalanced parens in CC Mode.
Fixes bug#5560. 7d206fc Input method polish-slash should not use keyboard translation 8be32cf Fix an assertion 040e0d6 Fix 'toggle-save-place' 5244db2 * src/keyboard.c: Don't inadvertently set immediate_echo (bug#22581)
John Wiegley [Fri, 4 Mar 2016 07:52:27 +0000 (23:52 -0800)]
Merge from origin/emacs-25
e6a3819 Update HISTORY section in readme for the NextStep interface. f67f1ed ; * doc/lispref/modes.texi (Font Lock Basics): Minor rewording. 7c81a0b Improve documentation of 'save-place-mode' cab3f0a Allocate glyph matrices for the initial frame e01c72f Fix white space in last checkin 370eb67 Make `insert-pair' always leave the cursor where documented b594393 etc/NEWS: Mention the new second parameter to `package-install'
John Wiegley [Fri, 4 Mar 2016 07:52:26 +0000 (23:52 -0800)]
Merge from origin/emacs-25
bd58c13 Improve documentation of focus-related hooks 00a4720 Further improve doc string of 'disable-point-adjustment' c582def Further adaptions in file-notify-tests.el for w32notify a1585e1 Don't bug out on localised dates in gnus-icalendar
John Wiegley [Fri, 4 Mar 2016 07:52:26 +0000 (23:52 -0800)]
Merge from origin/emacs-25
6620944 (cl-union): Do not ignore :test argument when lists are equal. 17dd3fb Add `isearch' to `basic-faces' c1ec743 Make $, : and @ "prefix characters" in ruby-mode e72a26e Make find-tag-default-bounds more strict 1bc0e0a Minor fixes in filenotify.el
Alain Schneble [Thu, 3 Mar 2016 05:31:11 +0000 (05:31 +0000)]
Fix issue of inserting images on some systems
* lisp/net/shr.el (shr-tag-img): Construct a non-empty range
to pass to shr-image-fetched, to indicate where to insert the
image. Fixes the issue introduced with commit 80852f843e69b81618f29cfb9aa4b074946cb3c4
(bug#22789).
Paul Eggert [Wed, 2 Mar 2016 22:31:01 +0000 (14:31 -0800)]
emacs-module.h slight simplification
* src/emacs-module.c (emacs_init_function, emacs_subr): Move here ...
* src/emacs-module.h: ... from here, as they don’t need to be public.
(enum emacs_arity): Remove useless enum tag. The enum value is
used in ptrdiff_t contexts.
* src/emacs-module.c (CHECK_USER_PTR): Fix typo in previous change.
Paul Eggert [Wed, 2 Mar 2016 18:47:27 +0000 (10:47 -0800)]
emacs-module.c simplification and tuneup
* src/emacs-module.c (CHECK_USER_PTR): New function.
(module_get_user_ptr, module_set_user_ptr)
(module_get_user_finalizer, module_set_user_finalizer): Use it.
(module_make_global_ref, module_copy_string_contents)
(module_make_string, module_vec_set, module_vec_get): Omit
unnecessary runtime tests. For example, vector sizes are always
fixnums, so we don’t need to test that they are in fixnum range.
This is possible in all functions where we catch signals anyway.
* emacs-module.c (module_make_global_ref, module_funcall)
(module_copy_string_contents, module_make_string): Use xsignal0
and CHECK macros for argument checks.
Paul Eggert [Wed, 2 Mar 2016 18:21:45 +0000 (10:21 -0800)]
Deterministic build improvements
* configure.ac (BUILD_DETAILS): Rename from DETERMINISTIC_DUMP,
and negate its sense. Use it via AC_SUBST, not AC_DEFINE,
and have its value be either empty or --no-build-details.
All uses changed. Change option to --disable-build-details.
* doc/lispref/cmdargs.texi (Initial Options):
Document --no-build-details.
* doc/lispref/internals.texi (Building Emacs):
* etc/NEWS:
Document --disable-build-details.
* doc/lispref/intro.texi (Version Info): Say that
emacs-build-time can be nil.
* lisp/erc/erc-compat.el (erc-emacs-build-time):
Now nil if details are omitted.
* lisp/erc/erc.el (erc-cmd-SV):
* lisp/version.el (emacs-build-time):
Now nil if no build details.
(emacs-version):
Output build time only if build details.
* src/Makefile.in (BUILD_DETAILS): New macro.
(temacs, bootstrap-emacs): Use it.
* src/emacs.c (build_details): New var.
(standard_args, main): Support --no-build-details.
(Vdeterministic_dump): Remove; all uses replaced
by !build_details.
(syms_of_emacs): Set Vbuild_details to a boolean, not
to a Lisp_Object.
* src/lisp.h (build_details): New decl.
* src/sysdep.c (init_system_name): When !build_details,
set system-name to nil, not to "elided".
* configure.ac (DETERMINISTIC_DUMP): New configuration option.
* lisp/version.el (emacs-build-time): Add a comment to make the
build time deterministic if requested.
(emacs-build-system): Make variable deterministic if requested.
* src/emacs.c (main): Initialize `deterministic-dump' from the
configuration option.
(syms_of_emacs): New constant `deterministic-dump'.
* src/sysdep.c (init_system_name): Use a constant
if a deterministic dump is requested.
Eli Zaretskii [Tue, 1 Mar 2016 16:41:04 +0000 (18:41 +0200)]
Fix reordering of bidi text in an isolate inside an override
* src/bidi.c (bidi_resolve_explicit): Override the orig_type value
of FSI with either LRI or RLI, as determined by the first strong
directional character in the isolate. This prevents failure to
isolate when the FSI...PDI text is inside a directional override.
(Bug#22786)
Alan Mackenzie [Tue, 1 Mar 2016 15:01:46 +0000 (15:01 +0000)]
Document c-guess-basic-syntax in the CC Mode manual.
* doc/misc/cc-mode.texi (Syntactic Analysis): Document the function, adding
pxrefs to Custom Line-Up and Other Indentation.
(Custom Line-Up): Add a note on using c-guess-basic-syntax with a pxref to
Syntactic Analysis.
* lisp/net/eww.el (eww-display-html): Default bidi rendering
to nil, so that possibly more Arabic web pages render
correctly (bug#22786).
(eww-setup-buffer): Ditto.
Alan Mackenzie [Mon, 29 Feb 2016 21:51:32 +0000 (21:51 +0000)]
Handle "noise" macros and compiler directives.
* lisp/progmodes/cc-langs.el (c-symbol-char-key): New language variable.
* lisp/progmodes/cc-vars.el (c-noise-macro-names)
(c-noise-macro-with-parens-names): New customizable variables.
(c-noise-macro-name-re, c-noise-macro-with-parens-name-re): New variables.
(c-make-noise-macro-regexps): New function.
* lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Adapt to treat
members of c-noise-macro-names as whitespace.
(c-forward-noise-clause): New function.
(c-forward-keyword-prefixed-id, c-forward-type, c-forward-declarator)
(c-forward-decl-or-cast-1, c-backward-over-enum-header)
(c-guess-basic-syntax CASE 5A.3, CASE 5A.5, CASE 9A):
Handle "noise clauses" in parallel with, e.g., "hangon key clauses".
* lisp/progmodes/cc-fonts.el (c-complex-decl-matchers): Handle "noise clauses"
in parallel with "prefix-spec keywords".
* lisp/progmodes/cc-mode.el (c-mode, c++-mode, objc-mode): call
c-make-noise-macro-regexps to initialize the internal variables.
* doc/misc/cc-mode.texi ("Noise Macros"): New section documenting the new
facilities.
Paul Eggert [Mon, 29 Feb 2016 17:39:45 +0000 (09:39 -0800)]
Stop calling res_init
Emacs shouldn’t need to call res_init any more, now that nscd or
equivalent is everywhere. On modern systems, calling res_init
simply slows Emacs down. On ancient systems lacking nscd Emacs
will still work well enough with this change; it’s just that it
won’t respond to changes in /etc/resolv.conf.
* configure.ac (HAVE_RES_INIT): Remove. Worry about -lresolv only
when configured --with-hesiod. Hesiod is still used; see, e.g.:
https://soylentnews.org/meta/article.pl?sid=15/07/13/0255214
* src/Makefile.in (LIBRESOLV): Remove. All uses removed.
* lisp/textmodes/flyspell.el (flyspell-sort): New function (bug#2405).
(flyspell-sort-corrections-functionx): New variable.
(flyspell-sort-corrections-alphabetically): New function.
(flyspell-notify-misspell): Use them.
(flyspell-auto-correct-word): Ditto.
(flyspell-emacs-popup): Ditto.
(flyspell-xemacs-popup): Ditto. Suggested by Sebastien Delafond.