Stefan Monnier [Sun, 10 Feb 2019 23:12:05 +0000 (18:12 -0500)]
* test/lisp/emacs-lisp/package-tests.el: Allow extra extras
(package-test--compatible-p): New function.
(package-test-desc-from-buffer, package-test-install-single): Use it.
(package-x-test-upload-buffer, package-x-test-upload-new-version):
Don't burp in presence of extra extras.
Document that [:cntrl:] does not match DEL (Bug#34391)
* doc/lispref/searching.texi (Character Classes):
* lisp/emacs-lisp/rx.el (rx):
Document that [:cntrl:] excludes DEL.
* test/src/regex-emacs-tests.el (regex-tests-PTESTS-whitelist):
Swap misplaced comments and fix wrong code for DEL.
João Távora [Sun, 10 Feb 2019 21:38:46 +0000 (21:38 +0000)]
Properly remove stale Flymake diagnostics on :region reports
Among other bugs fixed, modifying a list structure while iterating it
is a no-no. This would again cause duplicate diagnostics. See
https://github.com/joaotavora/eglot/issues/223 for an example.
* lisp/progmodes/flymake.el (Version): Bump to 1.0.5
(flymake--handle-report): Use cl-loop.
Tassilo Horn [Fri, 8 Feb 2019 19:39:00 +0000 (20:39 +0100)]
Impl. json-pretty-print with replace-region-contents + minimization
* lisp/json.el (json-pretty-print): Use the new
replace-region-contents. Add prefix arg for minimzation.
(json-pretty-print-buffer): Add prefix arg for minimzation.
(json-pretty-print-buffer-ordered): Add prefix arg for minimzation.
(json-pretty-print-ordered): Add prefix arg for minimzation.
Tassilo Horn [Fri, 8 Feb 2019 19:36:00 +0000 (20:36 +0100)]
Add new function replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Use lower value of
too_expensive and enable heuristic.
* lisp/subr.el (replace-region-contents): New convenient wrapper
function around replace-buffer-contents.
(package-generate-description-file): Make first line more informative.
(package-buffer-info): Include keywords, to more closely match
elpa.git's archive--metadata.
Glenn Morris [Fri, 8 Feb 2019 17:20:40 +0000 (09:20 -0800)]
Merge from origin/emacs-26
0cd7b52 (origin/emacs-26) Minor improvements to do strings in callproc.c b8c7017 Improve documentation of 'date-to-time' and 'parse-time-string' 46095a7 Fix downloading of URLs that end in a slash 3b60a0a * doc/misc/eww.texi (Basics): Fix eww keybindings. (Bug#34291) 8e22025 Fix process-thread docstring 459b669 Fix failures of vc-find-revision with non-ASCII file names e9ff190 * doc/lispref/tips.texi (Documentation Tips): Fix quotes. (B... 3e49a08 ; * src/coding.h (struct coding_system): Fix a typo in a comm... b657286 Add documentation for tabulated-list functions in the elisp m... 6e0f67b Fix URL in ucs-normalize.el ce3ae1f * etc/PROBLEMS: Amend entry for profiler bug #34235 to mentio...
Eli Zaretskii [Fri, 8 Feb 2019 08:33:13 +0000 (10:33 +0200)]
Improve documentation of 'date-to-time' and 'parse-time-string'
* doc/lispref/os.texi (Time Parsing): Document
'parse-time-string', and refer to it for the description of
the argument of 'date-to-time'.
* lisp/calendar/time-date.el (date-to-time): Refer in the doc
string to 'parse-time-string' for more information about the
format of the DATE argument. (Bug#34303)
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.
Nick Drozd [Sat, 2 Feb 2019 18:50:03 +0000 (12:50 -0600)]
Fix downloading of URLs that end in a slash
* lisp/net/eww.el (eww-download-callback): Fix download URL
file name. Previously this wasn't handling download URLs
correctly, resulting in all downloaded pages being named
"!", "!(1)", etc. (Bug#34291)
Eli Zaretskii [Fri, 8 Feb 2019 06:59:23 +0000 (08:59 +0200)]
Fix failures of vc-find-revision with non-ASCII file names
* lisp/vc/vc.el (vc-find-revision): Instead of binding
coding-system-for-write, make the buffer-file-coding-system of
the temporary buffer be no-conversion. This avoids the
unwanted side effect of not encoding the command-line
arguments of the VCS commands invoked by the backend.
(Bug#34350)
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.