Eli Zaretskii [Sat, 21 Jul 2018 09:28:11 +0000 (12:28 +0300)]
Improve doc strings of several variables in keyboard.c
* src/keyboard.c (syms_of_keyboard) <debug-on-event>
<attempt-stack-overflow-recovery>
<attempt-orderly-shutdown-on-fatal-signal>: Make sure the first
sentence of the doc string fits on a single line.
Michael Albinus [Fri, 20 Jul 2018 08:56:41 +0000 (10:56 +0200)]
Fix (Bug#32218). Do not merge with master
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.4.26.2".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 26.2.
* lisp/net/tramp.el (tramp-handle-file-truename):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename): Fix problem
with trailing slash. (Bug#32218)
Eli Zaretskii [Fri, 20 Jul 2018 08:44:36 +0000 (11:44 +0300)]
Improve documentation of 'pcase-defmacro rx'
* lisp/emacs-lisp/rx.el (rx): Clarify and improve the doc string.
For the details, see the discussion starting at
http://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00399.html.
Eli Zaretskii [Thu, 19 Jul 2018 17:44:32 +0000 (20:44 +0300)]
Fix TTY colors breakage by 'clear-face-cache'
Without examining the right frame, 'tty-color-24bit' was erroneously
treating a GUI frame as a 24-bit TTY frame.
* lisp/term/tty-colors.el (tty-color-24bit): Accept optional
argument DISPLAY and pass it to display-color-cells. Doc fix.
(tty-color-define, tty-color-desc): Pass the FRAME argument to
tty-color-24bit. (Bug#32072)
Eli Zaretskii [Tue, 17 Jul 2018 16:58:27 +0000 (19:58 +0300)]
Avoid assertion violations in gnutls.c
* src/gnutls.c (Fgnutls_hash_digest, gnutls_symmetric)
(Fgnutls_hash_mac): Check CONSP before invoking XCDR. (Bug#32187)
Report values of invalid arguments when signaling an error.
Michael Albinus [Fri, 13 Jul 2018 12:28:12 +0000 (14:28 +0200)]
Use consistent function names in thread-tests.el
* test/src/thread-tests.el (threads-call-error, threads-custom)
(threads-errors, threads-sticky-point, threads-signal-early):
Rename, using naming convention to prefix with "threads-".
Match w32 paths in grep sans --null hits (Bug#32051)
* lisp/progmodes/grep.el (grep-regexp-alist): Add an optional part to
match paths starting with C: (other drive letters).
* test/lisp/progmodes/compile-tests.el
(compile-tests--grep-regexp-testcases)
(compile-tests--grep-regexp-tricky-testcases)
(compile-test-grep-regexps): New tests.
(compile--test-error-line): Return `compilation-message'.
* src/process.c (Fmake_network_process): On 2018-07-09 "Explicitly
reject :server and :nowait (Bug#31903)", the sense of the SERVER check
was accidentally reversed so that we ended up looking for the wrong
ADDRESS. Reported by T.V Raman in
<https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00437.html>.
Miciah Masters [Mon, 11 Dec 2017 01:14:09 +0000 (20:14 -0500)]
Save the server alias on reconnect (Bug#29657)
rcirc does not retain the server alias on reconnect. As a result, rcirc
fails to re-use server and channel buffers when an alias is used. Further
problems may ensue when aliases are used to differentiate multiple
connections to the same host, for example when using a single IRC bouncer
or proxy to connect to multiple IRC networks.
Save the server alias when connecting to a server so that reconnect will
retain the alias.
* lisp/net/rcirc.el (rcirc-connect): Include server-alias when setting
rcirc-connection-info.
* doc/lispref/lists.texi (Cons Cells, Building Lists):
* doc/lispref/sequences.texi (Vector Functions): Use the more
popular term "proper", rather than "true", to qualify nil-terminated
lists.
For discussion, see the following emacs-devel subthreads:
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00112.html
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00138.html
John Shahid [Sat, 23 Jun 2018 15:12:44 +0000 (11:12 -0400)]
Avoid turning on the global-minor-mode recursively
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Clear
the buffer-list inside MODE-enable-in-buffers to avoid enabling the
mode recursively. (Bug#31793)
Noam Postavsky [Fri, 29 Jun 2018 23:58:58 +0000 (19:58 -0400)]
Stop using indent-line-to in lisp-indent-line (Bug#32014)
This is partial revert of "Remove ignored argument from
lisp-indent-line", because `indent-line-to' doesn't respect field
boundaries.
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Use delete-region
and indent-to instead of `indent-line-to'.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-with-read-only-field): Expect to pass.
Don't merge to master, we will fix indent-line-to there instead.
* src/process.c (Fmake_network_process): Explicitly check for and
signal an error when passed both :server and :nowait non-nil. In
Emacs 25, :nowait would be ignored in this case, but as of Emacs 26.1
this gives an error, albeit an unclear one. Also remove obsolete
comment regarding configurations lacking non-blocking mode, the
corresponding code was removed in 2012-11-17 "Assume POSIX 1003.1-1988
or later for fcntl.h."
Michael Albinus [Mon, 9 Jul 2018 14:03:49 +0000 (16:03 +0200)]
Fix Bug#32090
* lisp/files-x.el (connection-local-normalize-criteria): Do not
use PROPERTIES anymore.
(connection-local-get-profiles): Rewrite, in order to accept any
property as optional. (Bug#32090)
(connection-local-set-profiles):
Adapt ´connection-local-normalize-criteria' call.
Mention the NSM in the gnutls variable doc strings
* gnutls.el (gnutls-algorithm-priority): Mention the Network
Security Manager here since this variable is an obvious place
for people concerned about network security to look.
(gnutls-verify-error): Ditto.
(gnutls-min-prime-bits): Ditto.
Michael Albinus [Sun, 8 Jul 2018 11:02:19 +0000 (13:02 +0200)]
Fix Bug#32084
* test/lisp/net/dbus-tests.el (dbus-test02-register-service-own-bus):
Unset $DISPLAY when calling dbus-launch, in order to avoid
possible X11 authentication errors. (Bug#32084)
Suggested by Eli Zaretskii <eliz@gnu.org> in the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00171.html
https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00206.html
* doc/lispref/sequences.texi (Sequence Functions): Mention that
'length' signals a 'wrong-type-argument' also when given a
non-sequencep argument.
Eli Zaretskii [Tue, 3 Jul 2018 19:16:20 +0000 (22:16 +0300)]
Speed up 'replace-buffer-contents' some more
* src/editfns.c (EXTRA_CONTEXT_FIELDS): New members beg_a and beg_b.
(Freplace_buffer_contents): Set up ctx.beg_a and ctx.beg_b.
(buffer_chars_equal): Use ctx->beg_a and ctx->beg_b instead of
calling BUF_BEGV, which is expensive. This speeds up the recipe
in bug#31888 by 30%.
Martin Rudalics [Sun, 1 Jul 2018 08:22:59 +0000 (10:22 +0200)]
Document internal use of 'above-suspended' z-group frame parameter
* src/w32fns.c (w32_dialog_in_progress, x_set_z_group):
* src/xterm.c (x_set_z_group): Clarify the internal use of
'above-suspended' when setting a frame's 'z-group' parameter.
Gemini Lasswell [Wed, 20 Jun 2018 20:58:33 +0000 (13:58 -0700)]
Increase max-lisp-eval-depth adjustment while in debugger (bug#31919)
* src/eval.c (call_debugger): Increase the amount of extra Lisp
evaluation depth given to the debugger to allow it to call cl-print.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Add a comment
to suggest updating call_debugger when changing print-level.
Eli Zaretskii [Fri, 29 Jun 2018 13:55:20 +0000 (16:55 +0300)]
Speed up replace-buffer-contents
* src/editfns.c (EXTRA_CONTEXT_FIELDS): Add a_unibyte and
b_unibyte members.
(rbc_quitcounter): New static variable.
(Freplace_buffer_contents): Initialize a_unibyte, b_unibyte, and
rbc_quitcounter. Inhibit modification hooks if they were not
already inhibited. Use rarely_quit to allow user to quit, to
avoid calling maybe_quit too frequently (which hurts performance).
Remove redundant assertions (which hurt performance too much).
Call signal_after_change and update_compositions after all the
changes are done.
(buffer_chars_equal): Remove redundant assertions (which hurt
performance). Avoid using BUF_FETCH_CHAR_AS_MULTIBYTE, which
hurts performance by referencing Lisp symbols; instead, use
lower-level macros with explicit tests to select which macro to
use. (Bug#31888)
Dmitry Gutov [Thu, 28 Jun 2018 00:05:19 +0000 (03:05 +0300)]
; Update some commentary
* lisp/vc/vc-git.el (vc-git-state): Remove outdated commentary.
(vc-git-dir-status-goto-stage): Move a TODO here.
(vc-git-conflicted-files): From here.
(vc-git-find-file-hook): Add a FIXME.
Noam Postavsky [Sat, 16 Jun 2018 22:59:43 +0000 (18:59 -0400)]
Detect a non-list package archive content properly (Bug#22311)
* lisp/emacs-lisp/package.el (package--download-one-archive): Use
`read' instead of `read-from-string'; the latter always returns a
cons, so the `listp' check on its return value doesn't make sense. It
was changed from `read' to `read-from-string' in 2015-04-01 "*
emacs-lisp/package.el: Implement asynchronous refreshing", but that
change was not needed because `read' works fine on strings as well as
buffers.
Before ido.el switch to lexical-binding, it was possible for other
packages to modify the 'fallback' variables declared inside
'ido-file-internal' and 'ido-buffer-internal'.
* lisp/ido.el (ido-fallback): New variable.
(ido-buffer-internal, ido-file-internal): Reset ido-fallback to nil
before prompting user. Use ido-fallback when ido-exit is 'fallback'.
(ido-fallback-command): Add optional FALLBACK-COMMAND argument.
Karl Fogel [Mon, 25 Jun 2018 17:23:23 +0000 (12:23 -0500)]
Tighten a cross-reference in documentation
* doc/lispref/internals.texi (Writing Emacs Primitives): Switch to
a simple parenthetical cross-reference, following up to my
commit 9a53b6d426 of 2018-06-24.
See discussion:
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00826.html
From: Eli Zaretskii
Subject: Re: [Emacs-diffs] \
emacs-26 9a53b6d: Say how to override a primitive interactive spec
To: Karl Fogel CC: Stefan Monnier, Emacs Devel
Date: Mon, 25 Jun 2018 17:41:53 +0300
Message-Id: <83r2kvrkr2.fsf@gnu.org>
Karl Fogel [Sun, 24 Jun 2018 12:10:43 +0000 (07:10 -0500)]
Say how to override a primitive interactive spec
* doc/lispref/internals.texi (Writing Emacs Primitives): Mention that
the `interactive-form' property can be used to override a primitive
interactive specification, and refer to the detailed documentation
for setting that property.
From this thread on Emacs Devel:
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00923.html
From: Eli Zaretskii
To: Karl Fogel CC: Juri Linkov, Emacs Devel
Subject: Re: [Emacs-diffs] \
master b88e7c8: Make transpose-regions interactive (Bug#30343)
Date: Thu, 29 Mar 2018 14:38:15 +0300
Message-Id: <834lkzdsd4.fsf@gnu.org>
Michael Albinus [Sun, 24 Jun 2018 08:24:26 +0000 (10:24 +0200)]
Fix Bug#31941
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): In case of
FILENAME being a directory, check whether `copy-directory' could
be avoided. Suggested by Stephen Nutt <stnutt@gmail.com>. (Bug#31941)
(tramp-do-copy-or-rename-file-directly): Call "cp" with "-r".
Leo Liu [Tue, 12 Jun 2018 04:24:09 +0000 (12:24 +0800)]
Fix previous change in minibuffer-default-add-dired-shell-commands
The mailcap minibuffer completion used dynamic binding. Locally set
a dynamic variable.
* lisp/dired-aux.el (minibuffer-default-add-dired-shell-commands):
Store list of files in 'minibuffer-completion-table'. (Bug#31794)
Eli Zaretskii [Sat, 23 Jun 2018 11:03:10 +0000 (14:03 +0300)]
Improve responsiveness while in 'replace-buffer-contents'
* src/editfns.c (buffer_chars_equal): Avoid calling
buf_charpos_to_bytepos when the buffer is plain-ASCII.
Suggested by Milan Stanojević <mstanojevic@janestreet.com>.
Call maybe_quit to improve responsiveness.
(Freplace_buffer_contents): Call maybe_quit. Warn in the doc
string that the function could be slow. (Bug#31888)
Eli Zaretskii [Fri, 22 Jun 2018 18:25:55 +0000 (21:25 +0300)]
Fix a typo in emacs-lisp-intro.texi
* doc/lispintro/emacs-lisp-intro.texi (kill-ring-yank-pointer):
Add a missing quote. Reported by Jean-Christophe Helary
<brandelune@gmail.com> in emacs-devel.
Noam Postavsky [Wed, 20 Jun 2018 12:40:51 +0000 (08:40 -0400)]
Change index of ";" to better reflect it's usage (Bug#31623)
* doc/lispref/objects.texi (Comments): "; for commenting" fits better
with the following text about how a semicolon begins a comment. Also
mention that only unescaped semicolons start a comment.
Noam Postavsky [Tue, 12 Jun 2018 22:41:46 +0000 (18:41 -0400)]
Fix #'fun handling inside `labels' (Bug#31792)
* lisp/emacs-lisp/cl.el (labels): Apply the equivalent of the
cl-labels change from 2015-01-16 "* lisp/emacs-lisp/cl-macs.el: Fix
last change".
* test/lisp/emacs-lisp/cl-tests.el (labels-function-quoting): New
test.
* lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Improve docstring,
link to relevant manual page.
* doc/misc/cl.texi (Function Bindings): Don't imply that function
cells of symbols are modified by cl-flet. Don't claim that cl-flet or
cl-labels affect references of the form (quote FUNC).
Aaron Jensen [Thu, 24 May 2018 10:45:03 +0000 (03:45 -0700)]
Prevent errant scroll on mouse click (Bug#31546)
* src/nsterm.m (ns_mouse_position): Use correct frame when determining
mouse position.
* lisp/mouse.el (mouse-drag-track): Only account for mode-line height
if `mode-line-format' is non-nil.