]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoAdd new icomplete-force-complete-and-exit-unless-directory command scratch/some-more-icomplete-hacks
João Távora [Mon, 4 Feb 2019 16:00:15 +0000 (16:00 +0000)]
Add new icomplete-force-complete-and-exit-unless-directory command

Useful if you want icomplete to behave a little more like Ido.

(define-key icomplete-minibuffer-map (kbd "RET")
'icomplete-force-complete-and-exit-unless-directory)

* lisp/icomplete.el
  (icomplete-force-complete-and-exit-unless-directory): New command.

5 years agoAdd new icomplete-force-complete-and-kill command
João Távora [Mon, 4 Feb 2019 15:38:12 +0000 (15:38 +0000)]
Add new icomplete-force-complete-and-kill command

* lisp/icomplete.el (icomplete-minibuffer-map): Add a new C-k
"filtered" command.
(icomplete-force-complete-and-kill): New command.

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.

5 years agoimage-mode: Make parameters buffer-local
Benjamin Riefenstahl [Sat, 12 Jan 2019 14:36:24 +0000 (15:36 +0100)]
image-mode: Make parameters buffer-local

Image parameters were treated as image specific, but because they
actually were global variables, their behaviour transfered to new
images.
* lisp/image-mode.el (image-transform-resize, image-transform-scale)
(image-transform-rotation): Declare with defvar-local.  (Bug#33990)

5 years agoimage-mode: Do not use default scaling (bug#33990)
Benjamin Riefenstahl [Mon, 14 Jan 2019 22:37:03 +0000 (23:37 +0100)]
image-mode: Do not use default scaling (bug#33990)

* lisp/image-mode.el (image-toggle-display-image): Set :scale == 1 so
that create-image does not apply additional scaling.

5 years agocreate-image: Expand documentation (bug#33990)
Benjamin Riefenstahl [Tue, 15 Jan 2019 16:00:04 +0000 (17:00 +0100)]
create-image: Expand documentation (bug#33990)

* lisp/image.el (create-image): Discuss default for :scale in the doc
string.

5 years agoSome fixes in tramp-smb.el
Michael Albinus [Thu, 24 Jan 2019 16:40:10 +0000 (17:40 +0100)]
Some fixes in tramp-smb.el

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_NOT_A_DIRECTORY".
(tramp-smb-maybe-open-connection): Respect ´non-essential'.  Do
not record smbserver-version.
(tramp-smb-wait-for-output): Improve reading pending output.

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Thu, 24 Jan 2019 16:39:40 +0000 (17:39 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years agoAvoid byte-compiler warning in starttls.el
Eli Zaretskii [Thu, 24 Jan 2019 15:01:20 +0000 (17:01 +0200)]
Avoid byte-compiler warning in starttls.el

* lisp/net/network-stream.el (starttls-open-stream): Declare
to avoid compilation warning.

5 years ago; Remove tramp-tests instrumentation
Michael Albinus [Thu, 24 Jan 2019 13:36:38 +0000 (14:36 +0100)]
; Remove tramp-tests instrumentation

5 years agoCheck for client certificates when using GnuTLS
Robert Pluim [Thu, 24 Jan 2019 10:34:34 +0000 (11:34 +0100)]
Check for client certificates when using GnuTLS

This fixes Bug#33780, and extends the documentation to describe how to
enable use of client certificates.

* lisp/net/network-stream.el (network-stream-certificate): Correct
order of parameters to plist-get.
(network-stream-open-tls): Pass all received parameters to
open-gnutls-stream as plist, not just :nowait.

* lisp/net/gnutls.el (open-gnutls-stream): Change optional nowait arg
to be plist.  Derive nowait and client certificate(s) and keys(s) from
plist (maybe via auth-source) and pass to gnutls-boot-parameters and
gnutls-negotiate.
(network-stream-certificate): Add declare-function form for it.

* doc/misc/auth.texi (Help for users): Describe format to use for
client key/cert specification.

* doc/misc/emacs-gnutls.texi (Help For Developers): Describe usage of
optional plist argument.  Add crossreference to description of
.authinfo format for client key/cert specification.

* etc/NEWS: Describe new client certificate functionality for
  'open-network-stream'.

* test/lisp/net/network-stream-tests.el: Add require of network-stream.
(connect-to-tls-ipv4-nowait): Bind network-security-level to 'low
in order to bypass nsm prompting.
(connect-to-tls-ipv6-nowait): Likewise.
(open-network-stream-tls-wait): New test.
(open-network-stream-tls-nowait): New test.
(open-network-stream-tls): New test.
(open-network-stream-tls-nocert): New test.
(open-gnutls-stream-new-api-default): New test.
(open-gnutls-stream-new-api-wait): New test.
(open-gnutls-stream-old-api-wait): New test.
(open-gnutls-stream-new-api-nowait): New test.
(open-gnutls-stream-old-api-nowait): New test.
(open-gnutls-stream-new-api-errors): New test.
The new tests exercise 'open-network-stream' and the old and new
api of 'open-gnutls-stream'.

5 years agoFix error in Tramp's encoding check
Michael Albinus [Thu, 24 Jan 2019 10:06:38 +0000 (11:06 +0100)]
Fix error in Tramp's encoding check

* lisp/net/tramp-sh.el (tramp-find-inline-encoding):
Use `tramp-get-connection-buffer'.

5 years ago; Fix typos in NEWS
Phillip Lord [Wed, 23 Jan 2019 22:52:23 +0000 (22:52 +0000)]
; Fix typos in NEWS

5 years agodoc-view-presentation, doc-view-fit-window-to-page, and use mutool
Stefan Monnier [Wed, 23 Jan 2019 22:27:21 +0000 (17:27 -0500)]
doc-view-presentation, doc-view-fit-window-to-page, and use mutool

* lisp/doc-view.el (doc-view-pdfdraw-program): Use "mutool" if available.
(doc-view-mode-map): Keep default 'g' binding of 'revert-buffer'.
Change 'r' binding to 'revert-buffer'.
(doc-view-revert-buffer): Make it an obsolete alias.
(doc-view--revert-buffer): Rename from doc-view-revert-buffer, change
calling convention for use in add-function.
(doc-view-fit-window-to-page): New command.
(doc-view-pdf->png-converter-mupdf): Make it work with "mutool".
(doc-view-mode): Use add-function for revert-buffer-function.
(doc-view-presentation-mode-map, doc-view-presentation--src-data):
New vars.
(doc-view-presentation-exit, doc-view-presentation-mode)
(doc-view-presentation--propagate-pn, doc-view-presentation):
New functions.

5 years agoAvoid having to build src/emacs when we just want to `make tags`
Stefan Monnier [Wed, 23 Jan 2019 21:02:11 +0000 (16:02 -0500)]
Avoid having to build src/emacs when we just want to `make tags`

* Makefile.in (TAGS tags): Remove `src` from the dependencies.
* src/Makefile.in (ctagsfiles1): Strip macuvs.h and fingerprint.c.

5 years ago; * src/Makefile.in: Fix wording of comment in last change.
Eli Zaretskii [Wed, 23 Jan 2019 19:54:51 +0000 (21:54 +0200)]
; * src/Makefile.in: Fix wording of comment in last change.

5 years agoFix build errors with pdump fingerprint on macOS
Eli Zaretskii [Wed, 23 Jan 2019 19:53:29 +0000 (21:53 +0200)]
Fix build errors with pdump fingerprint on macOS

* src/Makefile.in ($(lispsource)/international/charprop.el):
Remove macuvs.h from the target list, to avoid circular
dependency on macOS.  Reported by Alan Third <alan@idiocy.org>.

5 years ago; More instrumentation of tramp-tests.el for hydra
Michael Albinus [Wed, 23 Jan 2019 18:16:36 +0000 (19:16 +0100)]
; More instrumentation of tramp-tests.el for hydra

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Adapt docstring.

5 years agoRework last commit to icomplete and minibuffer.el.
Stefan Monnier [Wed, 23 Jan 2019 17:30:54 +0000 (12:30 -0500)]
Rework last commit to icomplete and minibuffer.el.

Rather than let minibuffer-force-complete set up cycling and then undoing it,
better tell it directly not to setup cycling.  Also be a bit more careful
to remove the transient map.
Additionally to bug#34077 and bug#34116, this also relates to bug#25644.

* lisp/minibuffer.el (completion--flush-all-sorted-completions):
Also take down the transient cycling map if applicable.
(minibuffer-force-complete): New arg dont-cycle.
Set completion-cycling to the actual function that takes down the
transient map rather than just t.
(minibuffer-force-complete-and-exit):
* lisp/icomplete.el (icomplete-force-complete): Use new dont-cycle arg.

5 years ago; Instrument tramp-tests.el for hydra.
Michael Albinus [Wed, 23 Jan 2019 17:07:40 +0000 (18:07 +0100)]
; Instrument tramp-tests.el for hydra.

5 years agoForce completion in icomplete with C-M-i, but don't cycle (bug#34077)
João Távora [Wed, 23 Jan 2019 16:30:41 +0000 (16:30 +0000)]
Force completion in icomplete with C-M-i, but don't cycle (bug#34077)

Cycling after forcing a completion with C-M-i in icomplete can be
confusing, as it leaves rotated prospects in the minibuffer.  In C-x
C-f, for example it is very difficult to understand if the prospects
refer to subdirectories of the directory being completed to, which
happens naturally when the completion is unique; or if they are a
cycled version of prospects that match the new completion pattern, in
case the completion happens to still match other items.

To resolve this confusion, never cycle with C-M-i in icomplete:
non-ambiguous cycling can be achieved with C-. and C-,

The former behaviour can still be restored with:

(define-key icomplete-minibuffer-map (kbd "C-M-i") 'minibuffer-force-complete)

* lisp/icomplete.el (icomplete-force-complete): New command.
(icomplete-minibuffer-map): Bind C-M-i to icomplete-force-complete.

5 years agoAvoid cycling in minibuffer-force-complete-and-exit (bug#34116)
João Távora [Wed, 23 Jan 2019 16:17:03 +0000 (16:17 +0000)]
Avoid cycling in minibuffer-force-complete-and-exit (bug#34116)

* lisp/minibuffer.el (minibuffer-force-complete-and-exit): Check
completion-cycling before minibuffer-force-complete.

5 years ago* src/keyboard.c (read_char): Use CALLN.
Paul Eggert [Wed, 23 Jan 2019 16:01:37 +0000 (08:01 -0800)]
* src/keyboard.c (read_char): Use CALLN.

5 years ago* src/emacs.c (load_pdump): Minor simplification.
Stefan Monnier [Wed, 23 Jan 2019 15:56:26 +0000 (10:56 -0500)]
* src/emacs.c (load_pdump): Minor simplification.

5 years agoFix compilation of pdumper.c with old buggy GCC
Eli Zaretskii [Wed, 23 Jan 2019 15:40:10 +0000 (17:40 +0200)]
Fix compilation of pdumper.c with old buggy GCC

* src/pdumper.c (emacs_ptr_at): Renamed from emacs_ptr, to
avoid compilation errors with GCC 4.7.  Reported by Martin
Rudalics <rudalics@gmx.at>.  All callers changed.

5 years ago* lisp/net/tramp.el (tramp-set-file-uid-gid): Fix thinko.
Michael Albinus [Wed, 23 Jan 2019 14:23:57 +0000 (15:23 +0100)]
* lisp/net/tramp.el (tramp-set-file-uid-gid): Fix thinko.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Adapt docstring.