Nick Drozd [Sat, 2 Feb 2019 18:35:02 +0000 (12:35 -0600)]
Download of URL in EWW falls back on current URL
* lisp/net/eww.el (eww-download): If there's no URL at point,
download the current URL instead. Previous behavior was to
signal an error if there was no URL at point. (Bug#34291)
* doc/misc/eww.texi (Basics): Update documentation.
Dmitry Gutov [Thu, 7 Feb 2019 09:20:09 +0000 (12:20 +0300)]
Rename multifile.el to fileloop.el
* lisp/multifile.el: Rename to fileloop.el as discussed in
https://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00475.html.
Update symbol prefixes and all callers
Juri Linkov [Mon, 4 Feb 2019 22:52:25 +0000 (22:52 +0000)]
Make window choice in xref commands configurable
Previously, it wasn't easy to tell xref.el commands like
xref-find-definitions or xref-find-definitions-other-window how to
choose a window for the *xref* buffer or how to find windows for
displaying the results after choosing a candidate. This patch makes
that task easier, but keeps the current behaviour intact.
Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/progmodes/xref.el (xref--show-pos-in-buf): Simplify.
Robert Pluim [Tue, 5 Feb 2019 19:38:39 +0000 (20:38 +0100)]
Add dwim function for inserting @ref variants
* lisp/textmodes/texinfo.el (texinfo-insert-dwim-@ref): New function.
Insert @ref variant based on surrounding context.
(texinfo-mode-map): Add binding for texinfo-insert-dwim-@ref.
* etc/NEWS: Describe new texinfo dwim reference functionality.
Eli Zaretskii [Wed, 6 Feb 2019 15:31:26 +0000 (17:31 +0200)]
Prevent segfaults when running inside docker
* src/coding.c (syms_of_coding): New symbol Qus_ascii.
(reset_coding_after_pdumper_load): Call
set-safe-terminal-system-internal to set up
safe_terminal_coding after restoring from pdump file.
Reported by Philippe Vaucher <philippe.vaucher@gmail.com>.
Robert Pluim [Tue, 5 Feb 2019 12:47:27 +0000 (13:47 +0100)]
Fix network stream tests
* test/lisp/net/network-stream-tests.el
(make-ipv6-tcp-server-with-unspecified-port): Skip if IPv6 is not available.
(make-ipv6-tcp-server-with-specified-port): Likewise.
(echo-server-with-local-ipv6): Likewise.
Eli Zaretskii [Mon, 4 Feb 2019 17:42:33 +0000 (19:42 +0200)]
Avoid segfaults due to image cache being cleared during redisplay
* src/xdisp.c (redisplay_internal): Set the
inhibit_clear_image_cache flag of a frame while its windows
are being redisplayed, and reset the flag after the call top
update_frame returns.
* src/image.c (clear_image_cache): Do nothing if the frame's
inhibit_clear_image_cache flag is set. (Bug#34256)
* src/frame.h (struct frame): New flag inhibit_clear_image_cache.
Robert Pluim [Sun, 27 Jan 2019 15:13:46 +0000 (16:13 +0100)]
Don't map imaps to 993 anymore except on old Windows versions
'open-network-stream' will do the imaps service lookup itself, and
using 993 forced the user to use the numeric value in .authinfo for
certificate lookups.
* lisp/gnus/nnimap.el (nnimap-map-port): Only do mapping for Windows
XP or earlier.
* etc/NEWS: Describe imaps mapping change.
Eli Zaretskii [Mon, 4 Feb 2019 16:05:59 +0000 (18:05 +0200)]
Support (locale-info 'paper) on MS-Windows
* src/w32proc.c (LOCALE_IPAPERSIZE): Define if undefined.
(nl_langinfo): Support _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
like glibc does.
* src/fns.c (Flocale_info): Update the doc string.
* nt/inc/langinfo.h: Add _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
to the enumeration.
(_NL_PAPER_WIDTH, _NL_PAPER_HEIGHT): Define namesake macros.
* nt/mingw-cfg.site (emacs_cv_langinfo__nl_paper_width): Set
to 'yes'.
* doc/lispref/nonascii.texi (Locales): Update the
documentation of 'locale-info' for the argument of 'paper'.
Federico Tedin [Sun, 3 Feb 2019 16:48:31 +0000 (13:48 -0300)]
Allow doc-view to open password-protected PDF files (bug#33684)
* lisp/doc-view.el (doc-view-ghostscript-options): Removed "-sDEVICE"
option.
(doc-view-ghostscript-device): New customizable variable, passed as
"-sDEVICE" option to GhostScript.
(doc-view-pdf-password-protected-ghostscript-p): New function.
(doc-view-pdf->png-converter-ghostscript): Can now open
password-protected PDF files.
(doc-view-pdfdraw-program-subcommand): New function.
(doc-view-pdf-password-protected-pdfdraw-p): New function.
(doc-view-pdf->png-converter-mupdf): Can now open password-protected
PDF files.
* etc/NEWS: Mention new doc-view-mode feature.
Robert Pluim [Thu, 31 Jan 2019 13:20:32 +0000 (14:20 +0100)]
Use IPv6 localhost when family is 'ipv6
This fixes Bug#34193
* src/process.c (Fmake_network_process): Explicitly use ::1 when
using IPv6 with 'local. Update docstring.
* test/lisp/net/network-stream-tests.el
(make-ipv6-tcp-server-with-unspecified-port):
(make-ipv6-tcp-server-with-specified-port): Test creating ipv6
local server.
(make-server): Add optional family argument, default ipv4
(echo-server-with-local-ipv4): Test connecting to 'local ipv4
(echo-server-with-local-ipv6): Test connecting to 'local ipv6
* doc/lispref/processes.texi (Network Processes): Describe
behavior when using 'local.
* etc/NEWS: Document new 'make-network-process' behavior when
connecting to 'local with ipv6.
Michael Albinus [Sun, 3 Feb 2019 10:07:36 +0000 (11:07 +0100)]
Work on accept-process-output in Tramp
* lisp/net/tramp.el (tramp-accept-process-output): Rework timer
handling.
(tramp-call-process): Adapt VEC if nil.
(tramp-interrupt-process): Use `tramp-accept-process-output'.
(tramp-process-lines): New defun.
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names): Use it.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
Use timeout 0 in `tramp-accept-process-output'.
* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Move up.
(tramp-test29-start-file-process, tramp-test30-make-process)
(tramp-test32-shell-command)
(tramp--test-shell-command-to-string-asynchronously): Use it.
(tramp-test35-remote-path): Suppress warning.
(tramp--test-asynchronous-requests-timeout): New defconst.
(tramp-test43-asynchronous-requests): Skip if not the only test.
Use `tramp--test-asynchronous-requests-timeout'.
Remove instrumentation. Use `start-process-shell-command' for
watchdog. Add timeout in timer function. Print status messages.
Remove file operations from sentinel. Suppress timers in
`accept-process-output'.
Paul Eggert [Sat, 2 Feb 2019 21:23:04 +0000 (13:23 -0800)]
Support (locale-info 'paper) on GNU platforms
* configure.ac (HAVE_LANGINFO__NL_PAPER_WIDTH): New macro.
* src/fns.c (Flocale_info) [HAVE_LANGINFO__NL_PAPER_WIDTH]:
Get paper width and height from locale.
Martin Rudalics [Sat, 2 Feb 2019 08:43:34 +0000 (09:43 +0100)]
Fix bugs caused by running window change functions during redisplay
* src/xdisp.c (redisplay_internal): Run window change
functions before updating the display so changes induced by
these functions can get caught by redisplay (Bug#34138).
* src/window.c (run_window_change_functions): Bind
Qinhibit_redisplay to avoid that the minibuffer window gets
resized while running window change functions (Bug#34179,
Bug#34260).
Paul Eggert [Sat, 2 Feb 2019 01:07:13 +0000 (17:07 -0800)]
Restore SETFATTR substitution
* configure.ac (SETFATTR): Restore the AC_SUBST of this
that was inadvertently removed when pdumper support was added.
Need for ./configure --with-dumping=unexec on Fedora 29.
Paul Eggert [Fri, 1 Feb 2019 23:17:48 +0000 (15:17 -0800)]
Make make-dist more automatic
Simplify make-dist maintenance by having it generate its
list of files more automatically. Put the list of distributed
files into a file MANIFEST that can be used in the unusual
situations when you’re making a distribution without having
access to a Git repository.
* make-dist (top_level_ChangeLog): Now nonempty if the
distribution tarball will contain a ChangeLog, instead of
being nonempty when a ChangeLog is requested, Git is present
and a readable ChangeLog exists. The new interpretation makes
the script a bit easier to follow.
(possibly_non_vc_files, info_files, mkdir_verbose)
(file_to_skip, MANIFEST_subdir_sed, tempsubdirs):
New variables.
(MANIFEST): Update and use this file, which now records what
files are distributed.
(top_level, subdir, files, file): Remove.
Paul Eggert [Fri, 1 Feb 2019 21:03:18 +0000 (13:03 -0800)]
Rename CANNOT_DUMP to HAVE_UNEXEC
* configure.ac (CANNOT_DUMP): Remove. All uses removed,
or changed to the negative of with_unexec.
(HAVE_UNEXEC): New macro. All uses of CANNOT_DUMP changed
to the negative of this macro.
Paul Eggert [Fri, 1 Feb 2019 16:45:20 +0000 (08:45 -0800)]
Stop using macOS -prebind option
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Remove -prebind,
which has been obsolete and ineffective since Mac OS X 10.4 (2005),
which was never necessary for correct operation, and which now
generates annoying warnings. Problem reported by Robert Pluim in:
https://lists.gnu.org/r/emacs-devel/2019-01/msg00761.html
Eli Zaretskii [Fri, 1 Feb 2019 15:34:23 +0000 (17:34 +0200)]
Correct the docs of inserting kmacro counter
* doc/emacs/kmacro.texi (Keyboard Macro Counter): Correct the
description of the affect "C-u" has on inserting the macro
counter. Define "previous counter value".
* lisp/kmacro.el (kmacro-insert-counter)
(kmacro-start-macro-or-insert-counter): Fix the doc strings
regarding the effect of "C-u". (Bug#34263)
* lisp/emacs-lisp/rx.el (rx-kleene):
Treat \? and \?? like ? and ?? (Bug#34100).
* test/lisp/emacs-lisp/rx-tests.el: Add tests for all repetition operators.
Paul Eggert [Thu, 31 Jan 2019 23:31:41 +0000 (15:31 -0800)]
Prefer static to extern where either will do
* src/charset.c (charset_table_size):
* src/pdumper.c (dump_private):
* src/sysdep.c (init_sigsegv):
* src/window.c (old_selected_window):
Now static.
* src/charset.c (charset_table_size):
Now int, since the value always fits in int.
* src/gtkutil.c (xg_gtk_initialized): Now present only if
HAVE_XWIDGETS, to make it clearer that this is an xwidgets
hack. All uses changed.
* src/lread.c (ndefsubr): Remove; unused.
* src/pdumper.h: Use usual GNU indenting style for functions,
since my static-vs-extern checking hack relies on it.
(dump_public): Always declare; simpler and doesn’t hurt.
(pdumper_handle_page_fault): Remove unused decl.
Paul Eggert [Wed, 30 Jan 2019 23:11:17 +0000 (15:11 -0800)]
Fix process-contact bug with TCP connections
This fixes a regression from Emacs 25.3 (Bug#34134).
* src/process.c (server_accept_connection):
Set host correctly, fixing a bug introduced in
2017-09-16T21:29:18Z!eggert@cs.ucla.edu
when working around a GCC bug.
Glenn Morris [Wed, 30 Jan 2019 17:12:15 +0000 (09:12 -0800)]
Merge from origin/emacs-26
b94d767 (origin/emacs-26) Minor copyedits in last manual change 73508e6 Improve documentation of face numbers bf235ce * doc/emacs/custom.texi (Authentication): Refer to the "Help ... ceccb3c New node Authentication in the Emacs manual 9078f34 Fix a loop in c-fl-decl-start. This fixes bug #34186. a177fe7 Fix LaTeX output of month and day from cal-tex.el 90177d7 Avoid elisp crash for OpenPGP User IDs with no e-mail address 68e55a0 image-mode: Do not use default scaling (bug#33990) b6c762a create-image: Expand documentation (bug#33990) 928d342 Improve documentation of 'isearch-filter-predicate' 9034dd6 Fix cursor column positioning on Grep hits
Eli Zaretskii [Tue, 29 Jan 2019 16:28:13 +0000 (18:28 +0200)]
Improve documentation of face numbers
* doc/lispref/display.texi (Face Functions): Mention where the
face number is used and that it depends on the 'face' property
of the face symbol. Improve indexing.
* lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): Set overlay
property 'diff-mode to 'syntax. (Bug#33567)
(diff-syntax-fontify-props): Reset buffer-file-name to nil.
Juri Linkov [Mon, 28 Jan 2019 20:27:22 +0000 (22:27 +0200)]
More checks for live buffers.
* lisp/dired-x.el (dired-jump): Check if archive/tar superior buffer
was killed by the user.
* lisp/progmodes/ruby-mode.el (ruby-flymake--helper): Check if source buffer
was killed by the user immediately after visiting and before process finishes.
Alan Mackenzie [Mon, 28 Jan 2019 10:54:42 +0000 (10:54 +0000)]
Detect when we hit limit in backward search in c-just-after-func-arglist-p
This fixes a bug reported by Yasushi SHOJI <yasushi.shoji@gmail.com> to
emacs-devel on 2018-11-26, where wrong analysis and fontification occurred.
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Add new parameter
HIT-LIM which, if non-nil causes the function to return nil rather than 'same
when we reach the backward search limit without finding the beginning of
statement.
(c-just-after-func-arglist-p): Supply argument t to this new parameter in call
to c-beginning-of-statement-1.
Paul Eggert [Sun, 27 Jan 2019 23:49:53 +0000 (15:49 -0800)]
forward-line now works with bignums
* src/cmds.c (Fforward_line): Support bignum arg.
(scan_newline): Return void since no caller was using the
return value.
* src/search.c (find_newline, scan_newline_from_point)
(find_newline1): Return the number of newlines counted, not
the count shortage, so that the return value always fits in
ptrdiff_t even if the original count was a bignum. All
callers changed.
* test/src/cmds-tests.el (forward-line-with-bignum): New test.
Eli Zaretskii [Sat, 26 Jan 2019 10:08:56 +0000 (12:08 +0200)]
Improve pdump file search and 'pdumper-stats'
* src/pdumper.c (pdumper_record_wd): New function.
(pdumper_load): Use xstrdup instead of strdup, as on
MS-Windows the latter uses the wrong heap. Don't free a
NULL pointer.
* src/emacs.c (load_pdump): Support the use case where the
Emacs binary was renamed: look in exec-directory for the
pdump file whose base name is derived from the Emacs binary,
in addition to just emacs.pdmp.
(main): Call pdumper_record_wd to prepend CWD to the pdump
file name.
* src/fileio.c (file_name_absolute_p): Now extern.
* src/lisp.h (file_name_absolute_p): Add prototype.
* src/pdumper.h (pdumper_record_wd): Add prototype.
* doc/emacs/cmdargs.texi (Initial Options): Update the
documentation of where Emacs looks for the dump file.
João Távora [Fri, 25 Jan 2019 13:04:13 +0000 (13:04 +0000)]
Adjust previous electric.el and elec-pair.el change
This fixes a serious bug introduced previously
electric-pair-inhibit-if-helps-balance and
electric-pair-skip-if-helps-balance, whereby "innocent" markers were
being pushed by those function's new save-change-and-restore
semantics. The fix can probably still be improved.
It also adds comments to parts of the code, where deemed necessary.
* lisp/elec-pair.el (electric-pair--insert): Add comment.
(electric-pair--save-literal-point-excursion): New helper macro.
(electric-pair-inhibit-if-helps-balance)
(electric-pair-skip-if-helps-balance): Don't use
insert-before-markers since it may hurt other markers that have
nothing to do with the 'save-excursion'.
(electric-pair-post-self-insert-function): Use
electric-pair--save-literal-point-excursion.
Alan Mackenzie [Fri, 25 Jan 2019 16:14:00 +0000 (16:14 +0000)]
Fix a loop in c-fl-decl-start. This fixes bug #34186.
* lisp/progmodes/cc-mode.el (c-fl-decl-start) In the pair of operations
c-syntactic-skip-backward and c-forward-syntactic-ws, ensure the latter
doesn't come back to the position before the former, and break out of the
enclosing loop if it does.
Eli Zaretskii [Fri, 25 Jan 2019 09:14:32 +0000 (11:14 +0200)]
; Fix recent changes in ELisp manual
* doc/lispref/commands.texi (Using Interactive): Add a period
at the end of a sentence.
(Event Input Misc): Fix typo and leave 2 spaces between
sentences.
Avoid elisp crash for OpenPGP User IDs with no e-mail address
* lisp/gnus/mml-sec.el (mml-secure-check-user-id): Verify that
there is an e-mail address in the current User ID before trying
to downcase it. (Bug#34121)