]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoUnify three font info structures
Robert Pluim [Sat, 26 Jan 2019 11:31:02 +0000 (12:31 +0100)]
Unify three font info structures

* src/ftfont.h (struct font_info): New type, unifies similar types
from ftcrfont.c, ftfont.c and xftfont.c
* src/xftfont.c (struct xftfont_info): Remove, replace with struct
font_info.  Adjust all uses.
* src/ftcrfont.c (struct ftcrfont_info): Likewise.
* src/ftfont.c (struct ftfont_info): Likewise.

5 years agoMinor fixes for last change
Eli Zaretskii [Fri, 8 Feb 2019 07:53:32 +0000 (09:53 +0200)]
Minor fixes for last change

* etc/NEWS: Announce the change in EWW download behavior.

* lisp/net/eww.el (eww-download): Doc fix.  (Bug#34291)

5 years agoDownload of URL in EWW falls back on current URL
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.

5 years agoMinor fix for unexec builds.
Eli Zaretskii [Thu, 7 Feb 2019 15:32:47 +0000 (17:32 +0200)]
Minor fix for unexec builds.

* src/emacs.c (main): Fix assertions and logic for pdump
loading in builds that can both unexec and pdump.

5 years ago; Simplify last change.
Eli Zaretskii [Thu, 7 Feb 2019 15:27:18 +0000 (17:27 +0200)]
; Simplify last change.

5 years agoAvoid segfaults on MS-Windows in enexec'ed Emacs
Eli Zaretskii [Thu, 7 Feb 2019 15:23:57 +0000 (17:23 +0200)]
Avoid segfaults on MS-Windows in enexec'ed Emacs

* src/emacs.c (main) [WINDOWSNT]: Fix logic of using dynamic
heap in unexec case.  (Bug#34277)

5 years agoAvoid unnecessary consing in project--files-in-directory
Dmitry Gutov [Thu, 7 Feb 2019 11:22:47 +0000 (14:22 +0300)]
Avoid unnecessary consing in project--files-in-directory

* lisp/progmodes/project.el (project--remote-file-names): New function.
(project--files-in-directory): Use it.

5 years agoAdd vc-hg-revert-switches
Ian Dunn [Thu, 7 Feb 2019 09:26:04 +0000 (12:26 +0300)]
Add vc-hg-revert-switches

* lisp/vc/vc-hg.el (vc-hg-revert-switches): New option.
(vc-hg-revert): Use it.

5 years agoRename multifile.el to fileloop.el
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

5 years ago; project-ignores: Add some TODOs
Dmitry Gutov [Wed, 6 Feb 2019 09:25:09 +0000 (12:25 +0300)]
; project-ignores: Add some TODOs

5 years agoRevert "Fix typo in add-hook doc string"
Aurelien Aptel [Thu, 7 Feb 2019 08:57:15 +0000 (09:57 +0100)]
Revert "Fix typo in add-hook doc string"

This reverts commit 7fd2ad755e7fa599697648ac4c971e834de75bf3.

5 years agoMake window choice in xref commands configurable
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.

5 years agoAdd dwim function for inserting @ref variants
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.

5 years agoFix typo in add-hook doc string
Aurelien Aptel [Wed, 6 Feb 2019 16:44:51 +0000 (17:44 +0100)]
Fix typo in add-hook doc string

* lisp/subr.el (add-hook): fix typo in doc string.

5 years agoUnbreak interactive invocation of temacs on MS-Windows
Eli Zaretskii [Wed, 6 Feb 2019 15:56:44 +0000 (17:56 +0200)]
Unbreak interactive invocation of temacs on MS-Windows

* src/emacs.c (main) [WINDOWSNT]: Allow to invoke temacs
interactively without the --temacs= option.

5 years agoPrevent segfaults when running inside docker
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>.

5 years agoFix Bug#34196
Michael Albinus [Wed, 6 Feb 2019 08:07:39 +0000 (09:07 +0100)]
Fix Bug#34196

* lisp/autorevert.el (auto-revert-buffers): Handle buffers with a
remote default-directory only, when they are connected.  (Bug#34196)

* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
Set "connected" property.

* lisp/net/tramp.el (tramp-process-actions): Revert change from
2019-02-04.  Bug#34196 will be solved in autorevert.el.

5 years agoFix network stream tests
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.

5 years ago* make-dist: Prefer a temporary manifest file.
Glenn Morris [Tue, 5 Feb 2019 03:50:44 +0000 (19:50 -0800)]
* make-dist: Prefer a temporary manifest file.

This prevents the manifest cluttering up the build tree,
and possibly getting stale if --no-update is used.

5 years agoAvoid segfaults due to image cache being cleared during redisplay
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.

5 years agoDon't map imaps to 993 anymore except on old Windows versions
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.

5 years agoSupport (locale-info 'paper) on MS-Windows
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'.

* etc/NEWS: Update the locale-info entry.

5 years agoAllow doc-view to open password-protected PDF files (bug#33684)
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.

5 years agoFix Bug#34196
Michael Albinus [Mon, 4 Feb 2019 15:03:43 +0000 (16:03 +0100)]
Fix Bug#34196

* lisp/net/tramp.el (tramp-process-actions): Disable `global-auto-revert-mode'
temporarily.  (Bug#34196)

5 years agoImprove Tramp host name completion
Michael Albinus [Mon, 4 Feb 2019 15:02:46 +0000 (16:02 +0100)]
Improve Tramp host name completion

* lisp/net/tramp-rclone.el (tramp-default-host-alist): Add empty host.

* lisp/net/tramp.el (tramp-parse-auth-sources): Require :port.

5 years agoUse IPv6 localhost when family is 'ipv6
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.

5 years ago* lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251)
Juri Linkov [Sun, 3 Feb 2019 21:00:29 +0000 (23:00 +0200)]
* lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251)

* lisp/tar-mode.el (tar--try-jka-compr): New function copied from
archive-try-jka-compr.

* lisp/arc-mode.el (archive-try-jka-compr): Set buffer-multibyte to t
instead of let-binding coding-system-for-read to 'no-conversion.

* test/data/decompress/tg.tar.gz:
* test/data/decompress/zg.zip: New fixtures.

* test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-gz):
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-gz): New tests.

* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
(diff-mode-test-font-lock-syntax-one-line): Skip unless shell and
diff executables are found.

5 years agoWork on accept-process-output in Tramp
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'.

5 years agoSupport (locale-info 'paper) on GNU platforms
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.

5 years ago* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test.
Juri Linkov [Sat, 2 Feb 2019 21:23:16 +0000 (23:23 +0200)]
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test.

(diff-mode-test-font-lock-syntax-one-line): New test for one line.

* test/data/vc/diff-mode/hello_world.c:
* test/data/vc/diff-mode/hello_world_1.c:
* test/data/vc/diff-mode/hello_emacs.c:
* test/data/vc/diff-mode/hello_emacs_1.c: New fixtures.

* lisp/vc/diff-mode.el (diff-syntax-fontify): Move remove-overlays
from diff-syntax-fontify-hunk.  (Bug#33567)
(diff-syntax-fontify-hunk): Remove VISIT arg from insert-file-contents.

5 years agoUpdate from Gnulib
Paul Eggert [Sat, 2 Feb 2019 21:13:45 +0000 (13:13 -0800)]
Update from Gnulib

This incorporates:
2019-02-02 dtoastr, ftoastr, ldtoastr: port to c-strtod changes
2019-02-01 c-strtod, c-strtold: use the bug fixes
2019-01-30 strtold: New module
* doc/misc/texinfo.tex, lib/ftoastr.c, lib/regexec.c, lib/stdlib.in.h:
* m4/stdlib_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/c-strtod.m4: Remove.

5 years agoFix unlikely user-full-name integer overflow
Paul Eggert [Sat, 2 Feb 2019 18:23:48 +0000 (10:23 -0800)]
Fix unlikely user-full-name integer overflow

* src/editfns.c (Fuser_full_name):
Don’t assume uid fits into fixnum.

5 years agoPrevent segfault in bootstrap-emacs on MinGW
Eli Zaretskii [Sat, 2 Feb 2019 15:12:13 +0000 (17:12 +0200)]
Prevent segfault in bootstrap-emacs on MinGW

* src/emacs.c (main) [WINDOWSNT]: Fix logic of determining by
argv[0] whether to use the static heap.  (Bug#34277)

5 years agoFix Bug#34221
Felicián Németh [Sat, 2 Feb 2019 12:22:53 +0000 (13:22 +0100)]
Fix Bug#34221

* lisp/progmodes/project.el (project--files-in-directory):
Support remote files.  (Bug#34221)

5 years agoFix window splitting behavior of 'display-buffer-at-bottom'
Martin Rudalics [Sat, 2 Feb 2019 09:16:45 +0000 (10:16 +0100)]
Fix window splitting behavior of 'display-buffer-at-bottom'

* lisp/window.el (display-buffer-at-bottom): Never split an
arbitrary bottom window.  Try to split the frame's main
window instead (Bug#33870).

5 years agoFix bugs caused by running window change functions during redisplay
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).

5 years ago* .gitignore: Add MANIFEST.
Glenn Morris [Sat, 2 Feb 2019 01:59:15 +0000 (17:59 -0800)]
* .gitignore: Add MANIFEST.

5 years ago* make-dist: Avoid "Bad fd number" error with dash.
Glenn Morris [Sat, 2 Feb 2019 01:56:25 +0000 (17:56 -0800)]
* make-dist: Avoid "Bad fd number" error with dash.

5 years ago* make-dist: Remove references to src/stamp-h.in.
Glenn Morris [Sat, 2 Feb 2019 01:50:59 +0000 (17:50 -0800)]
* make-dist: Remove references to src/stamp-h.in.

This file was removed two years ago in 2f89350.

5 years ago* make-dist: Fix --no-update with no pre-existing MANIFEST.
Glenn Morris [Sat, 2 Feb 2019 01:36:32 +0000 (17:36 -0800)]
* make-dist: Fix --no-update with no pre-existing MANIFEST.

5 years agoRestore SETFATTR substitution
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.

5 years agoMake make-dist more automatic
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.

5 years ago* configure.ac (emacs_config_features): Add pdumper and unexec.
Glenn Morris [Fri, 1 Feb 2019 21:44:47 +0000 (16:44 -0500)]
* configure.ac (emacs_config_features): Add pdumper and unexec.

5 years agoRename CANNOT_DUMP to HAVE_UNEXEC
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.

5 years agoOmit some linker hacks if not doing unexec
Paul Eggert [Fri, 1 Feb 2019 20:05:28 +0000 (12:05 -0800)]
Omit some linker hacks if not doing unexec

* configure.ac (LDFLAGS, LD_SWITCH_SYSTEM_TEMACS):
Omit some funky linker flags if not supporting unexec.

Use macOS linker hacks only if needed
* configure.ac: On darwin, link with -fno-pie and -headerpad
only if configuring with unexec.

5 years agoStop using macOS -prebind option
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

5 years agoMerge from origin/emacs-26
Paul Eggert [Fri, 1 Feb 2019 16:40:53 +0000 (08:40 -0800)]
Merge from origin/emacs-26

6c6b540711 Correct the docs of inserting kmacro counter
32555daf4c * doc/misc/calc.texi (Algebraic Tutorial): Fix a typo.  (B...

5 years ago; Merge from origin/emacs-26
Paul Eggert [Fri, 1 Feb 2019 16:40:53 +0000 (08:40 -0800)]
; Merge from origin/emacs-26

The following commit was skipped:

af525f44d5 ; Auto-commit of loaddefs files.

5 years agoMerge from origin/emacs-26
Paul Eggert [Fri, 1 Feb 2019 16:40:52 +0000 (08:40 -0800)]
Merge from origin/emacs-26

7ba8f80398 Avoid errors in 'rmail-get-new-mail'
9c8412a0b8 Fix process-contact bug with TCP connections

# Conflicts:
# src/process.c

5 years agoCorrect the docs of inserting kmacro counter
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)

5 years ago* doc/misc/calc.texi (Algebraic Tutorial): Fix a typo. (Bug#34273)
Nicholas Drozd [Fri, 1 Feb 2019 14:06:50 +0000 (08:06 -0600)]
* doc/misc/calc.texi (Algebraic Tutorial): Fix a typo.  (Bug#34273)

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Feb 2019 12:33:38 +0000 (07:33 -0500)]
; Auto-commit of loaddefs files.

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Feb 2019 11:24:20 +0000 (06:24 -0500)]
; Auto-commit of loaddefs files.

5 years agoMake the rx operators \? and \?? behave correctly
Mattias Engdegård [Wed, 16 Jan 2019 13:57:12 +0000 (14:57 +0100)]
Make the rx operators \? and \?? behave correctly

* 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.

5 years agoAvoid errors in 'rmail-get-new-mail'
Eli Zaretskii [Fri, 1 Feb 2019 09:16:13 +0000 (11:16 +0200)]
Avoid errors in 'rmail-get-new-mail'

* lisp/mail/rmail.el (rmail-insert-inbox-text): Don't assume
the Rmail protocol is always a string when calling
'rmail-remote-proto-p'.  (Bug#34252)

5 years agojs--re-search-backward-inner: Fix infloop
Dmitry Gutov [Fri, 1 Feb 2019 00:01:39 +0000 (03:01 +0300)]
js--re-search-backward-inner: Fix infloop

Fix JS indentation infloop reported in
https://github.com/mooz/js2-mode/issues/513.

* lisp/progmodes/js.el (js--re-search-backward-inner): Account for
multiline string literals.
* test/manual/indent/js.js: New test example.

5 years agoPrefer static to extern where either will do
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.

5 years agoWiden modiff counts to avoid wraparound
Paul Eggert [Thu, 31 Jan 2019 18:29:50 +0000 (10:29 -0800)]
Widen modiff counts to avoid wraparound

Widen modification counts to at least 64 bits, to make
wraparound practically impossible.
* doc/lispref/buffers.texi (Buffer Modification):
Don’t say the modification-count can wrap around.
* src/buffer.c (Frestore_buffer_modified_p, Fbuffer_swap_text)
(modify_overlay):
* src/insdel.c (insert_1_both, insert_from_string_1)
(insert_from_gap, insert_from_buffer_1)
(adjust_after_replace, replace_range, replace_range_2)
(del_range_2, modify_text):
* src/textprop.c (modify_text_properties):
Use modiff_incr instead of incrementing directly.
(Fbuffer_modified_tick, Fbuffer_chars_modified_tick):
Don’t assume modification counts fit into fixnums.
* src/buffer.h (struct buffer_text, struct buffer):
* src/cmds.c (internal_self_insert):
* src/fileio.c (Finsert_file_contents):
* src/indent.c (last_known_column_modified):
* src/keyboard.c (command_loop_1):
* src/marker.c (cached_modiff):
* src/syntax.c (find_start_modiff, parse_sexp_propertize)
(find_defun_start):
* src/window.h (struct window):
Use modiff_count for modification counts.
* src/editfns.c (Fsubst_char_in_region):
Copy instead of incrementing modification counts,
since integer overflow checking is not needed here.
* src/lisp.h (modiff_count): New type.
(modiff_incr, modiff_to_integer): New inline functions.
* src/pdumper.c (dump_buffer): Update hash.

5 years agoMinor pdumper simplification
Paul Eggert [Thu, 31 Jan 2019 15:30:32 +0000 (07:30 -0800)]
Minor pdumper simplification

* src/pdumper.c (dump_roots, pdumper_load): Simplify initialization.
(dump_bitset_init, pdumper_load): Omit unnecessary assignments.
(dump_bitset_destroy): Remove; never called.  All callers removed.
(dump_do_dump_relocation, pdumper_load): Add FIXME comment.
(pdumper_load): Simplify by assuming C99.  Remove unused local.

5 years agoFix process-contact bug with TCP connections
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.

5 years agoMerge from origin/emacs-26
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

# Conflicts:
# doc/emacs/custom.texi

5 years agoFix problem in filenotify-tests
Michael Albinus [Wed, 30 Jan 2019 14:30:04 +0000 (15:30 +0100)]
Fix problem in filenotify-tests

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Adapt `accept-process-output' argument.

* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Remove :unstable tag.

5 years ago* lisp/net/tramp-rclone.el (tramp-rclone-mounted-p): Fix thinko.
Michael Albinus [Wed, 30 Jan 2019 14:29:29 +0000 (15:29 +0100)]
* lisp/net/tramp-rclone.el (tramp-rclone-mounted-p): Fix thinko.

5 years ago; Fix previous commit
Michael Albinus [Wed, 30 Jan 2019 09:51:48 +0000 (10:51 +0100)]
; Fix previous commit

5 years ago* test/lisp/net/tramp-tests.el
Michael Albinus [Wed, 30 Jan 2019 08:28:43 +0000 (09:28 +0100)]
* test/lisp/net/tramp-tests.el

(tramp-test43-asynchronous-requests): Tag it :unstable also for
emba.  Adapt `accept-process-output' arguments.

5 years ago* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Michael Albinus [Tue, 29 Jan 2019 21:17:06 +0000 (22:17 +0100)]
* test/lisp/filenotify-tests.el (file-notify--deftest-remote):

Tag as :unstable.

5 years agoMove some descriptions to the right section
Robert Pluim [Tue, 29 Jan 2019 10:05:12 +0000 (11:05 +0100)]
Move some descriptions to the right section

* etc/NEWS: Move ibuffer and gnus change descriptions to
mode-specific section.

5 years agoFix documentation of pdump file installation
Eli Zaretskii [Tue, 29 Jan 2019 16:58:54 +0000 (18:58 +0200)]
Fix documentation of pdump file installation

* doc/lispref/internals.texi (Building Emacs): Correct the
directory where the pdump file is installed.  (Bug#34244)

5 years agoMinor copyedits in last manual change
Eli Zaretskii [Tue, 29 Jan 2019 16:49:50 +0000 (18:49 +0200)]
Minor copyedits in last manual change

* doc/emacs/custom.texi (Authentication): Improve markup,
indexing, and wording.

5 years agoImprove documentation of face numbers
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.

5 years agoAdapt `accept-process-output' arguments in tramp-tests
Michael Albinus [Tue, 29 Jan 2019 16:26:14 +0000 (17:26 +0100)]
Adapt `accept-process-output' arguments in tramp-tests

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test31-interrupt-process)
(tramp-test32-shell-command)
(tramp--test-shell-command-to-string-asynchronously)
(tramp-test43-asynchronous-requests):
Adapt `accept-process-output' arguments.

5 years ago; Tramp cleanup
Michael Albinus [Tue, 29 Jan 2019 16:25:36 +0000 (17:25 +0100)]
; Tramp cleanup

* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Handle `non-essential'.

* lisp/net/tramp-archive.el: Increase `max-specpdl-size' when
loading tramp-gvfs.

* lisp/net/tramp-rclone.el (tramp-rclone-mounted-p): Reorder for
better traces.
(tramp-rclone-maybe-open-connection): Handle `non-essential'.

* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory)
(tramp-find-inline-encoding): Simplify check.

* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory)
(tramp-smb-handle-insert-directory): Simplify check.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
Simplify check.
(tramp-sudoedit-maybe-open-connection): Handle `non-essential'.

* lisp/net/tramp.el (tramp-handle-load, tramp-wait-for-regexp):
Simplify check.
(tramp-action-login, tramp-action-password, tramp-action-yesno)
(tramp-action-yn, tramp-action-terminal): Return explicitly t.
(tramp-process-one-action, tramp-process-actions): Adapt docstring.

5 years agoSmall fixes
Juri Linkov [Mon, 28 Jan 2019 21:17:04 +0000 (23:17 +0200)]
Small fixes

* lisp/generic-x.el (etc-passwd-generic-mode): Add comment.  (Bug#34225)

* 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.

5 years ago* src/Makefile.in (clean): Delete versioned pdmp files.
Glenn Morris [Mon, 28 Jan 2019 20:55:57 +0000 (15:55 -0500)]
* src/Makefile.in (clean): Delete versioned pdmp files.

Else build number increments without limit even in clean builds.

5 years agoMore checks for live buffers.
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.

5 years ago* lisp/generic-x.el (etc-passwd-generic-mode): Support backups of passwd,
Juri Linkov [Mon, 28 Jan 2019 20:18:20 +0000 (22:18 +0200)]
* lisp/generic-x.el (etc-passwd-generic-mode): Support backups of passwd,

group and shadow /etc files.  (Bug#34225)

5 years agoFix last change in xfaces.c
Eli Zaretskii [Mon, 28 Jan 2019 20:03:05 +0000 (22:03 +0200)]
Fix last change in xfaces.c

* src/xfaces.c (init_xfaces): Don't rely of 'face'
property of a face to be a natural number.

5 years ago* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults): Adapt test.
Michael Albinus [Mon, 28 Jan 2019 15:33:47 +0000 (16:33 +0100)]
* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults): Adapt test.

5 years agoAdapt accept-process-output timeouts in Tramp
Michael Albinus [Mon, 28 Jan 2019 15:33:27 +0000 (16:33 +0100)]
Adapt accept-process-output timeouts in Tramp

* lisp/net/tramp.el (tramp-accept-process-output):
Make timeout optional.  Do not set explicit timer.
(tramp-action-out-of-band, tramp-process-one-action)
(tramp-wait-for-regexp, tramp-interrupt-process):
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
* lisp/net/tramp-smb.el (tramp-smb-action-get-acl)
(tramp-smb-action-set-acl, tramp-smb-wait-for-output):
* tramp-sudoedit.el (tramp-sudoedit-action-sudo):
Adapt `accept-process-output' calls wrt timeouts.

5 years agoFix bug with face-id after restoring from pdump
Eli Zaretskii [Mon, 28 Jan 2019 15:24:04 +0000 (17:24 +0200)]
Fix bug with face-id after restoring from pdump

* src/xfaces.c (init_xfaces): New function.
* src/emacs.c (main) [HAVE_PDUMPER]: If dumped with pdumper,
call init_xfaces.  (Bug#34226)
* src/lisp.h (init_xfaces) [HAVE_PDUMPER]: Add prototype.

* test/lisp/faces-tests.el (faces--test-face-id): New test for
bug#34226.

5 years agolinks: also link pdmp
Sam Steingold [Mon, 28 Jan 2019 14:56:47 +0000 (09:56 -0500)]
links: also link pdmp

5 years agoDetect when we hit limit in backward search in c-just-after-func-arglist-p
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.

5 years agoUpdate from Gnulib
Paul Eggert [Mon, 28 Jan 2019 00:20:03 +0000 (16:20 -0800)]
Update from Gnulib

This incorporates:
2019-01-26 getloadavg: Add support for Android
2019-01-24 fchownat: Fix compilation error on Android 4.3
2019-01-24 mbtowc: Fix compilation error on Android 4.3
2019-01-24 random: Fix compilation error on Android 4.3
2019-01-24 renameat: Fix compilation error on Android 4.3
2019-01-24 unlinkat: Fix compilation error on Android 4.3
2019-01-19 gettext: support disabling use of VLAs
2019-01-17 sys_stat: Fix warning on OS/2 kLIBC
2019-01-17 fcntl: Fix syntax error (regression from 2018-10-05)
2019-01-10 verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++
2018-12-22 stdioext: port to newer 32-bit Android
2018-12-16 libc-config: Support HP-UX cc in C99 mode.
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/cdefs.h, lib/fcntl.c, lib/getloadavg.c, lib/gettext.h:
* lib/regexec.c, lib/stdio-impl.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/sys_stat.in.h, lib/unistd.in.h, lib/verify.h, m4/stdlib_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

5 years agoforward-line now works with bignums
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.

5 years ago* doc/emacs/custom.texi (Authentication): Refer to the "Help for users" node.
Michael Albinus [Sun, 27 Jan 2019 17:14:44 +0000 (18:14 +0100)]
* doc/emacs/custom.texi (Authentication): Refer to the "Help for users" node.

5 years agoImprove pdump load diagnostics
Eli Zaretskii [Sun, 27 Jan 2019 15:55:27 +0000 (17:55 +0200)]
Improve pdump load diagnostics

* src/emacs.c (load_pdump): Improve diagnostics when pdump
file fails to load correctly.

5 years ago* src/emacs.c (load_pdump): Fix a thinko in last change.
Eli Zaretskii [Sat, 26 Jan 2019 17:48:33 +0000 (19:48 +0200)]
* src/emacs.c (load_pdump): Fix a thinko in last change.

5 years agoNew node Authentication in the Emacs manual
Michael Albinus [Sat, 26 Jan 2019 15:46:54 +0000 (16:46 +0100)]
New node Authentication in the Emacs manual

* doc/emacs/custom.texi (Customization):
* doc/emacs/emacs.texi (Top): Add node Authentication.

5 years agoImprove pdump file search and 'pdumper-stats'
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.

5 years agoFix face initializations in pdump'ed Emacs
Eli Zaretskii [Sat, 26 Jan 2019 10:07:27 +0000 (12:07 +0200)]
Fix face initializations in pdump'ed Emacs

* src/dispnew.c (init_display_interactive): Call init_faces_initial
in the daemon if dumped with pdumper. (Bug#34114)

5 years ago* lisp/loadup.el (load-file-name): Set back to nil
Stefan Monnier [Fri, 25 Jan 2019 21:15:22 +0000 (16:15 -0500)]
* lisp/loadup.el (load-file-name): Set back to nil

5 years agoAdjust previous electric.el and elec-pair.el change
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.

* lisp/electric.el (electric-indent-post-self-insert-function):
Remove lexical variable.

5 years agoFix a loop in c-fl-decl-start. This fixes bug #34186.
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.

5 years agoUse minibuffer-default in completion-all-sorted-completions (bug#34083)
João Távora [Thu, 24 Jan 2019 18:04:52 +0000 (18:04 +0000)]
Use minibuffer-default in completion-all-sorted-completions (bug#34083)

* lisp/minibuffer (completion-all-sorted-completions): Sort with the
default on top.

5 years ago; Fix recent changes in ELisp manual
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.

5 years ago; Document input-event-functions
Phillip Lord [Fri, 25 Jan 2019 08:59:06 +0000 (08:59 +0000)]
; Document input-event-functions

5 years agoMake tabulated-list-mode-map inherit from special-mode-map
Alex Branham [Mon, 21 Jan 2019 15:50:11 +0000 (09:50 -0600)]
Make tabulated-list-mode-map inherit from special-mode-map

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Use
  'make-composed-keymap'.

Bug #30452

5 years agoFix LaTeX output of month and day from cal-tex.el
Eli Zaretskii [Fri, 25 Jan 2019 08:45:25 +0000 (10:45 +0200)]
Fix LaTeX output of month and day from cal-tex.el

* lisp/calendar/cal-tex.el (cal-tex-cursor-week-iso)
(cal-tex-week-hours): Escape a lone blank, to make it through
LaTeX.  (Bug#34148)

5 years agoAvoid elisp crash for OpenPGP User IDs with no e-mail address
Daniel Kahn Gillmor [Fri, 18 Jan 2019 08:12:07 +0000 (03:12 -0500)]
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)

Copyright-paperwork-exempt: yes

5 years ago; * etc/NEWS: Mention changes in image-transform-* variables.
Eli Zaretskii [Fri, 25 Jan 2019 08:33:01 +0000 (10:33 +0200)]
; * etc/NEWS: Mention changes in image-transform-* variables.