Michael Albinus [Mon, 31 Dec 2018 11:18:41 +0000 (12:18 +0100)]
Precise documentation of Tramp ad-hoc proxies
* doc/misc/tramp.texi (Ad-hoc multi-hops): Remove superfluous
first entry about %h and %u. Describe, how to remove ad-hoc proxy
definitions.
(Cleanup remote connections): Mention, that also ad-hoc proxy
definitions are removed.
* etc/NEWS: Mention default host names in Tramp ad-hoc proxies.
Paul Eggert [Mon, 31 Dec 2018 03:00:09 +0000 (19:00 -0800)]
Fix assertion-violations on non-integers
These bugs were introduced after bignums were added.
* src/data.c (cons_to_unsigned, cons_to_signed):
* src/xdisp.c (calc_line_height_property):
Invoke integer_to_intmax and integer_to_uintmax only on integers.
Glenn Morris [Mon, 31 Dec 2018 01:02:40 +0000 (17:02 -0800)]
Merge from origin/emacs-26
82c82b1 (origin/emacs-26) In user manual fix value of default frame h... 2e8825d Improve documentation of 'file-local-name' and related APIs 11f0635 ; Remove comment in esh-proc.el
Glenn Morris [Mon, 31 Dec 2018 00:57:36 +0000 (16:57 -0800)]
Merge from origin/emacs-26
3abebeb * lisp/files.el (cd): Fix last change. (Bug#33791) 7a60a4f Fix remote directories in Eshell on MS-Windows 822a2d0 Fix :type 'group' in defcustom a731c56 Fix NS fringe bitmap drawing bug (bug#33864) 0c52459 Fix commentary in dispnew.c c9fdd1b Improve accept-process-process doc 9578c2a Fix a simple bug in display-buffer-use-some-frame 0f9be72 Clarify thread switching while waiting for process output 24ddea0 Improve process doc. with respect to handling of large input ... 2931016 ; Cosmetic changes in etc/NEWS 85516b8 Minor copyedits in landmark.el
Martin Rudalics [Sun, 30 Dec 2018 14:47:16 +0000 (15:47 +0100)]
Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
* src/window.c (save_window_save): When setting the marker
insertion type of saved window points treat a buffer local
value of 'unbound' for 'window-point-insertion-type' like
nil (Bug#33871).
Eli Zaretskii [Sat, 29 Dec 2018 15:34:57 +0000 (17:34 +0200)]
Improve documentation of 'file-local-name' and related APIs
* doc/lispref/files.texi (Unique File Names)
(Magic File Names, File Name Expansion): Improve documentation
of the "local part" of a remote file name.
* doc/lispref/processes.texi (Synchronous Processes)
(Asynchronous Processes): State explicitly that program and
file names passed to functions that start remote processes
need to be relative or obtained by 'file-local-name'.
* lisp/files.el (file-local-name):
* lisp/simple.el (start-file-process, process-file): Improve
the documentation of the "local part" of a remote file name,
and its use in APIs that start remote processes.
Handle raw bytes, and LF in ranges, in rx `any' argument strings
* lisp/emacs-lisp/rx.el (rx-check-any-string): Rewrite to handle raw bytes
in unibyte strings and accept LF as range endpoints (Bug#33205).
* test/lisp/emacs-lisp/rx-tests.el: Add tests for the above.
Martin Rudalics [Sat, 29 Dec 2018 09:51:35 +0000 (10:51 +0100)]
Avoid that unwind_format_mode_line messes up buffer points (Bug#32777)
* src/xdisp.c (format_mode_line_unwind_data): Before
temporarily selecting a window on another frame, separately save
the point of that window's buffer too.
(unwind_format_mode_line): After undoing the temporary
selection of a window on another frame, separately restore the
buffer point of that window. This is needed since the
operation that deselects that window will have stored back the
point of that window into its buffer's point which is wrong
since that window was never "officially" selected (Bug#32777).
Dmitry Gutov [Sat, 29 Dec 2018 00:13:54 +0000 (02:13 +0200)]
project-find-file: Move the common parent directory to the prompt
* lisp/progmodes/project.el (project--completing-read-strict):
Extract the common parent directory of all files first
(https://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00444.html).
Paul Pogonyshev [Fri, 28 Dec 2018 04:10:47 +0000 (20:10 -0800)]
Accept 1-arg 'substring' calls in byte compiler
Those have been supported by the function implementation since
commit 2014-03-31T12:06:34Z!dmantipov@yandex.ru (Bug#33807).
* lisp/emacs-lisp/bytecomp.el: substring has 1-3 args, not 2-3.
Paul Eggert [Thu, 27 Dec 2018 20:52:45 +0000 (12:52 -0800)]
Improve accept-process-process doc
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output):
Document that (accept-process-output P) can return non-nil
even after P has exited, and that it can return nil even if P
is still running (Bug#33839).
Paul Eggert [Wed, 26 Dec 2018 09:11:58 +0000 (01:11 -0800)]
Port message-checksum to bignums
* lisp/gnus/message.el (message--rotate-fixnum-left): New function.
(message-checksum): Use it instead of assuming fixnum-only arithmetic.
This should fix Bug#33083.
to nil (bug#33838).
(isearch-lazy-highlight-new-loop)
(isearch-lazy-highlight-buffer-update): Don't set arg ELLIPSIS of
isearch-message to t to not reset the value of isearch-error.
Juri Linkov [Tue, 25 Dec 2018 21:49:13 +0000 (23:49 +0200)]
* lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): Add `*' to names
of ephemeral buffers like in " *org-src-fontification:%s*" from
`org-src-font-lock-fontify-block'. (Bug#33567)
(diff-header, diff-file-header): Tone down light background colors.
Michael Albinus [Tue, 25 Dec 2018 10:08:30 +0000 (11:08 +0100)]
Provide tramp-adb-handle-make-process
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Add `tramp-adb-handle-make-process' and
`tramp-handle-start-file-process'.
(tramp-adb-handle-make-process): New defun, derived from
`tramp-adb-handle-start-file-process'. (Bug#28691)
Michael Albinus [Mon, 24 Dec 2018 13:28:31 +0000 (14:28 +0100)]
Provide tramp-sh-handle-make-process
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add `tramp-sh-handle-make-process' and
`tramp-handle-start-file-process'.
(tramp-sh-handle-make-process): New defun, derived from
`tramp-sh-handle-start-file-process'. (Bug#28691)
* lisp/net/tramp.el (tramp-handle-start-file-process): New defun.
Dmitry Gutov [Mon, 24 Dec 2018 02:36:08 +0000 (04:36 +0200)]
execute-extended-command: Skip waiting in more cases
* lisp/simple.el (execute-extended-command): Don't wait when
there's no binding the current command, and the user doesn't want
to see "shorter" suggestions, or TYPED is nil anyway.
Philipp Stephani [Mon, 17 Dec 2018 20:47:46 +0000 (21:47 +0100)]
Add file name handler support for 'make-process' (Bug#28691)
* src/process.c (Fmake_process): Add new keyword argument
':file-handler'.
(syms_of_process) <make-process, :file-handler>: Define new symbols.
* lisp/files.el (file-name-non-special): Add support for
'make-process'.
* test/src/process-tests.el (make-process/file-handler/found)
(make-process/file-handler/not-found)
(make-process/file-handler/disable): New unit tests.
(process-tests--file-handler): New helper function.
* test/lisp/files-tests.el
(files-tests-file-name-non-special-make-process): New unit test.
* doc/lispref/files.texi (Magic File Names): Document that
'make-process' can invoke file name handlers.
* doc/lispref/processes.texi (Asynchronous Processes): Document
':file-handlers' argument to 'make-process'.
* etc/NEWS (Lisp Changes in Emacs 27.1): Mention new
:file-handler argument for 'make-process'.
Macroexpand before evaluating in eval-expression (bis)
* lisp/simple.el (eval-expression): Macroexpand before
evaluating. This repeats the fix made for Bug#20730 in
another branch of the code a few lines down.
Improve process doc. with respect to handling of large input (Bug#33191)
* src/process.c (Fprocess_send_region, Fprocess_send_string):
Document that process input longer than the process input
buffer may be split into bunches. Remove an outdated
reference to a 500 character split boundary.
* doc/lispref/processes.texi (Asynchronous Processes): Remove
mention of "stray character injections" in PTY processes. See
also the comment about ICANON in src/sysdep.c, function
child_setup_tty.
Michael Albinus [Fri, 21 Dec 2018 12:53:20 +0000 (13:53 +0100)]
Fix Bug#33735
* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
Delete empty lines. (Bug#33735)
(tramp-sh-inotifywait-process-filter): Use `string-match'.
(tramp-set-remote-path): Check for PIPE_BUF but PATH_MAX.
* test/lisp/filenotify-tests.el: Handle $REMOTE_FILE_NOTIFY_LIBRARY.
(file-notify--deftest-remote): Suppress vc-handled-backends.
(file-notify-test08-backup): Do not expect failure on hydra.
(Bug#33735).
Glenn Morris [Thu, 20 Dec 2018 15:51:17 +0000 (07:51 -0800)]
; Merge from origin/emacs-26
The following commits were skipped:
fda43a7 Skip a vc-bzr test if run as root 4370b8e ; Copyright year fix No need to merge to master 305aca0 Backport: Handle unread-command-events consistently (bug#23980)
Stefan Monnier [Thu, 20 Dec 2018 13:40:43 +0000 (08:40 -0500)]
* lisp/emacs-lisp/map.el: Add support for plists
(map--plist-p, map--plist-delete): New functions.
(map-elt, map-delete, map-length, map-into, map-put!, map-insert)
(map-apply, map-do): Handle the plist case.
* test/lisp/emacs-lisp/map-tests.el (with-maps-do): Add sample plist.
(test-map-put!): The behavior of map-put! is not the same for plists as
for alists.
Alan Mackenzie [Thu, 20 Dec 2018 12:21:16 +0000 (12:21 +0000)]
Check result from c-backward-token-2 to avoid infinite loop
This fixes bug #33784.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): While moving back
over enclosing parentheses, check that c-backward-token-2 actually moves.
Michael Albinus [Thu, 20 Dec 2018 10:07:15 +0000 (11:07 +0100)]
Fix Bug#33781
* lisp/net/tramp-sh.el (tramp-set-remote-path): Use a temporary
file for setting $PATH, if it exceeds PATH_MAX on the remote system.
(tramp-send-command-and-read): Ignore errors if NOERROR. (Bug#33781)
* test/lisp/net/tramp-tests.el (tramp-test34-remote-path): New test.
Glenn Morris [Wed, 19 Dec 2018 23:37:04 +0000 (18:37 -0500)]
Skip rather than fail in flymake tests
* test/lisp/progmodes/flymake-tests.el
(flymake-tests--wait-for-backends): Skip rather than fail if
backends are slow to respond. This always seems like a temporary
system glitch and not something that should be reported as a failure.
Eric Abrahamsen [Wed, 19 Dec 2018 22:11:14 +0000 (14:11 -0800)]
Make gnus-newsgroup-name local var available to gnus-summary-mode
* lisp/gnus/gnus-sum.el (gnus-summary-mode-group): New defvar for
passing gnus-newsgroup-name (a local variable) into the body of
gnus-summary-mode, so that it's available to gnus-summary-mode-hook.
Paul Eggert [Wed, 19 Dec 2018 21:42:21 +0000 (13:42 -0800)]
cl-make-random-state was not copying its arg
Problem reported by Xu Chunyang (Bug#33731).
* lisp/emacs-lisp/cl-extra.el (cl-make-random-state):
Use copy-sequence, not copy-tree, so that the record is copied.
* test/lisp/emacs-lisp/cl-extra-tests.el:
(cl-extra-test-cl-make-random-state): New test.
Paul Eggert [Wed, 19 Dec 2018 20:57:25 +0000 (12:57 -0800)]
Minor fixes/simplifications to time functions
* doc/lispintro/emacs-lisp-intro.texi (Files List): Simplify.
* doc/lispref/os.texi (Time of Day): Mention format-time-string
as an alternative to current-time-string.
* lisp/arc-mode.el (archive-unixdate, archive-unixtime):
Port better to future versions of Emacs where (COUNT . HZ)
will take precedence to (HI . LO).
* lisp/arc-mode.el (archive-unixtime):
* lisp/calendar/todo-mode.el (todo-insert-item--basic)
(todo-item-done, todo-read-time):
Prefer format-time-string to substringing current-time-string.
* lisp/calc/calc-forms.el (calc-time, calcFunc-now):
Prefer decode-time to parsing the output of current-time-string.
* lisp/emacs-lisp/cl-extra.el (cl--random-time):
Prefer encode-time to hashing the output of current-time-string.
* lisp/gnus/gnus-score.el (gnus-score-headers)
(gnus-score-adaptive):
Avoid stringifying and then reparsing timestamp.
* src/timefns.c (Fencode_time): Omit redundant assignment.
Glenn Morris [Wed, 19 Dec 2018 20:06:18 +0000 (15:06 -0500)]
Skip a vc-bzr test if run as root
* test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads):
Skip this test when run as root. This works around a race
condition in root-specific code in vc-mode-line when deleting a file.
; Do not merge to master, instead fix vc-mode-line there.
* src/keyboard.c (read_char): Events put into `unread-command-events'
with the form (t . EVENT) should always have the t stripped when read
out.
* test/src/keyboard-tests.el: New tests for `unread-command-events'.
Glenn Morris [Wed, 19 Dec 2018 02:18:31 +0000 (21:18 -0500)]
Restrict downcasing in elisp xref tests (bug#25534)
The tests happen to not fail at the moment because find-library-name
now has an extra feature, find-library--from-load-history, which
happens to do a case-insensitive regexp match; but still it seems
better not to rely on this.
* test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive):
New variable.
(xref-elisp-test-run, emacs-test-dir): Only downcase if the
filesystem seems to be case-insensitive.
Juri Linkov [Tue, 18 Dec 2018 23:10:09 +0000 (01:10 +0200)]
More font-lock improvements for diff-mode
* lisp/vc/diff-mode.el (diff-font-lock-keywords): Use diff-header face
for git index lines (like already used for bzr index lines).
Use diff-file-header face for binary file headers.
(diff-find-source-location): Use expand-file-name for vc-find-revision.
(diff--font-lock-prettify): Use diff-indicator-* faces for
left-fringe indicators.
(diff-syntax-fontify-props): Optimize to not use text-property-not-all
for font-lock-ensure.
* lisp/replace.el (occur-engine-line): Simplify to use font-lock-ensure
without text-property-not-all.
Juri Linkov [Tue, 18 Dec 2018 22:55:15 +0000 (00:55 +0200)]
Fontify one-line diffs without the final newline (bug#33567)
* lisp/vc/diff-mode.el (diff-hunk-text, diff-syntax-fontify-hunk):
Skip lines beginning with backslash like "\ No newline at end of file".
(diff-syntax-fontify-hunk): Use string-trim-right.
For one-line diffs use 1 explicitly in the list of line numbers.
Rob Browning [Tue, 18 Dec 2018 20:34:01 +0000 (15:34 -0500)]
Avoid test failures if directory name looks like a regexp
Taken from <https://sources.debian.org/patches/emacs/1:26.1+1-1>
* test/lisp/ibuffer-tests.el (ibuffer-filter-inclusion-3):
* test/lisp/net/tramp-tests.el (tramp-test42-remote-load-path):
Regexp-quote file names to avoid failures with directory names
of the form "build/emacs-i87jK3/emacs-26.1+1/...".
Paul Eggert [Tue, 18 Dec 2018 20:21:27 +0000 (12:21 -0800)]
Support (ash INTEGER BIGNUM)
* src/data.c (emacs_mpz_mul_2exp): 2nd arg is now a
nonnegative EMACS_INT not mp_bitcnt_t, to simplify checking.
(Fash): Support COUNT values that are bignums or that
exceed mp_bitcnt_t range.
* test/src/data-tests.el (data-tests-ash-lsh): Test this.