Michael Albinus [Wed, 31 Oct 2018 19:04:04 +0000 (20:04 +0100)]
Remote file name completion is also performed by auth-sources search
* doc/misc/tramp.texi (File name completion): User and host name
completion is also performed by auth-sources search.
* etc/NEWS: Document remote file name completion using auth-sources.
* lisp/net/tramp.el (tramp-completion-use-auth-sources):
New user option.
(tramp-parse-auth-sources): New defun.
(tramp-get-completion-function): Call it.
Gemini Lasswell [Wed, 31 Oct 2018 04:15:51 +0000 (21:15 -0700)]
Add regression test for Bug#33014
Backport from master.
* test/src/eval-tests.el:
(eval-tests-byte-code-being-evaluated-is-protected-from-gc): New test.
(eval-tests-33014-var): New variable.
(eval-tests-33014-func, eval-tests-33014-redefine): New functions.
Paul Eggert [Wed, 31 Oct 2018 04:14:10 +0000 (21:14 -0700)]
Refer to bytecode constant vectors (Bug#33014)
Backport from master.
* src/bytecode.c (exec_byte_code): Save VECTOR into stack slot
so that it survives GC. The stack slot was otherwise unused,
so this doesn’t cost us memory, only a store insn.
Paul Eggert [Wed, 31 Oct 2018 03:57:46 +0000 (20:57 -0700)]
Improve fix for Bug#33014
Although the previously-applied fix worked for its platform,
it doesn’t suffice in general.
* src/bytecode.c (exec_byte_code): Save VECTOR into stack slot
so that it survives GC. The stack slot was otherwise unused,
so this doesn’t cost us memory, only a store insn.
* src/eval.c (Ffuncall): Do not make FUN volatile, reverting
2018-10-14T19:12:04Z!gazally@runbox.com. Adding ‘volatile’
does not suffice, since storage for a volatile local can be
reclaimed after its last access (e.g., by tail recursion
elimination), which would make VECTOR invisible to GC.
Alan Mackenzie [Tue, 30 Oct 2018 11:43:13 +0000 (11:43 +0000)]
Fix C++ Mode dynamic error with string delimiters.
Fixes bug #33163
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings):
Use the correct variable `end' in place of the wrong `c-new-END'.
(c-after-change-re-mark-unbalanced-strings): Correct a logic error whilst
skipping over comments.
Gemini Lasswell [Sun, 14 Oct 2018 19:12:04 +0000 (12:12 -0700)]
Keep a stack reference to bytecode objects being executed (Bug#33014)
* src/eval.c (Ffuncall): Make local variable 'fun' volatile.
* test/src/eval-tests.el
(eval-tests-byte-code-being-evaluated-is-protected-from-gc):
Add regression test for Bug#33014.
(eval-tests-33014-var): New variable.
(eval-tests-33014-func, eval-tests-33014-redefine): New functions.
Add index entries for more isearch commands/bindings (Bug#32990)
* doc/emacs/search.texi (Basic Isearch): Index isearch-exit,
isearch-abort, isearch-cancel, isearch-repeat-forward,
isearch-repeat-backward and their bindings.
(Repeat Isearch): Index isearch-ring-advance,
isearch-ring-retreat and isearch-edit-string.
(Special Isearch): Index isearch-quote-char,
isearch-char-by-name and their bindings. Index
isearch-query-replace and isearch-query-replace-regexp, and
the latter's binding. Explain what
isearch-query-replace-regexp does. Index isearch-complete.
(Word Search): Index isearch-toggle-word.
Juri Linkov [Sat, 27 Oct 2018 20:27:54 +0000 (23:27 +0300)]
* lisp/isearch.el (lazy-highlight-buffer): New defcustom. (Bug#29360)
(lazy-highlight-buffer-max-at-a-time): New defcustom.
(isearch-lazy-highlight-buffer): New defvar.
(isearch-lazy-highlight-new-loop): Don't check changes in window
boundaries when lazy-highlight-buffer is non-nil.
Move code that extends start/end to match whole string at point
here from isearch-lazy-highlight-search.
(isearch-lazy-highlight-search): Add args string and bound
like in other search functions. Move calculation of bound
to isearch-lazy-highlight-update.
(isearch-lazy-highlight-match): New function with code extracted from
isearch-lazy-highlight-update to be called also from
isearch-lazy-highlight-buffer-update.
(isearch-lazy-highlight-update): Reuse the values returned from
window-group-start and window-group-end. At the end schedule the
timer to call isearch-lazy-highlight-buffer-update when
isearch-lazy-highlight-buffer is non-nil.
(isearch-lazy-highlight-buffer-update): New function.
Eli Zaretskii [Sat, 27 Oct 2018 10:18:33 +0000 (13:18 +0300)]
Improve documentation of 'process-connection-type'
* doc/lispref/processes.texi (Asynchronous Processes): Clarify
better when it is advisable to use pipes for communicating
with subprocesses. (Bug#33050)
Unify prompt for gnupg passphrase between GNU/Linux and MS-Windows.
* lisp/epg.el (epg--start): Use 'raw-text' for coding system instead
of 'binary', in order to avoid spurious carriage return on Microsoft
Windows and MS-DOS when prompting for a password. (Bug#33040)
Daniel Pittman [Wed, 5 Sep 2018 13:44:58 +0000 (09:44 -0400)]
Add support in emacsclient for EMACS_SOCKET_NAME
If the '--socket-name' argument is unspecified, the environment
variable 'EMACS_SOCKET_NAME' is now consulted with the same
semantics. This mirrors the behavior of the '--server-file' argument,
and allows for easier configuration of emacsclient when the socket is
in a location other than 'TMPDIR' or '/tmp'.
* emacsclient.c (set_socket): Add support for the
EMACS_SOCKET_NAME environment variable. (Bug#33095)
Eli Zaretskii [Sat, 27 Oct 2018 09:14:35 +0000 (12:14 +0300)]
Doc fix of 'gnus-fetch-old-headers'
* lisp/gnus/gnus-sum.el (gnus-fetch-old-headers): Avoid
treating 'some' and 'invisible' as symbols that need to be
hyperlinked. Reported by Robert Pluim <rpluim@gmail.com>.
(Bug#33090)
Eli Zaretskii [Sat, 27 Oct 2018 08:24:53 +0000 (11:24 +0300)]
Improve documentation of X resource loading
* doc/emacs/cmdargs.texi (Initial Options):
* doc/emacs/frames.texi (Frame Parameters):
* doc/emacs/xresources.texi (Resources): Document the
'--no-x-resources' command-line option and the fact that X
resources override .emacs settings of frame parameters.
(Bug#32975)
Federico Tedin [Fri, 26 Oct 2018 17:16:50 +0000 (13:16 -0400)]
Subject: (mouse-drag-and-drop-region): Simplify and remove assumptions
* lisp/mouse.el (mouse-drag-and-drop-region): Use insert-for-yank for
insertion, remove rectangular-region-specific variables.
Use text-property-not-all.
* lisp/rect.el (rectangle-dimensions): New function.
(rectangle-position-as-coordinates): Use the usual 1-origin for lines.
* doc/emacs/search.texi (Basic Isearch): Index
'isearch-delete-char', its keybinding and the isearch "input
item" concept, and define the latter.
(Error in Isearch): Clarify the different uses of DEL and
C-M-w during isearch.
* lisp/isearch.el (isearch-delete-char): Correct its
documentation and link to the Info node '(emacs)Basic Isearch'
which explains less technically how this function works in
everyday usage.
Alan Third [Sun, 14 Oct 2018 18:12:00 +0000 (19:12 +0100)]
Fix some NS drawing issues (bug#32932)
* src/nsterm.m (ns_clip_to_rect):
(ns_reset_clipping): Remove gsaved variable and associated code.
(ns_flush_display): Remove function.
(ns_copy_bits): use translateRectsNeedingDisplayInRect:by: to copy any
pending drawing actions along with the image.
([EmacsView windowWillResize:toSize:]): Remove unneeded call.
([EmacsView drawRect:]): Remove redundant call to ns_clear_frame_area,
and optimize the exposed rectangles.
(ns_draw_window_cursor): Remove unneeded disabling of screen updates.
Robert Pluim [Tue, 23 Oct 2018 10:19:19 +0000 (12:19 +0200)]
Correct typo in GNU ELPA url
* doc/misc/efaq.texi (Packages that do not come with Emacs):
Correct typo in GNU ELPA url (Bug#33072). Change other url
references to use https scheme.
Paul Eggert [Tue, 23 Oct 2018 02:31:15 +0000 (19:31 -0700)]
Improve rounding in recent timer fix
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Use more-precise arithmetic to handle some boundary cases better
when rounding errors occur (Bug#33071).
* test/lisp/emacs-lisp/timer-tests.el:
(timer-next-integral-multiple-of-time-3):
New test, to test one of the boundary cases.
(timer-next-integral-multiple-of-time-2):
Redo so as to not assume a particular way of rounding 0.01.
Paul Eggert [Mon, 22 Oct 2018 17:54:45 +0000 (10:54 -0700)]
Fix epg bug with (TICKS . HZ) timestamp
Problem reported by Joseph Mingrone in:
https://lists.gnu.org/r/emacs-devel/2018-10/msg00380.html
* lisp/epg.el (epg--time-from-seconds): Just use a seconds count;
don’t generate an obsolete-format timestamp.
A few tweaks to the previous code for corner case problems, and a new
feature, which is to move the +/- signs to the left fringe.
(diff--font-lock-cleanup, diff--filter-substring): New functions.
(diff-mode): Use them.
(diff--font-lock-refined): Mark the overall overlays as `diff-mode
fine` as well, so they get properly cleaned up when changing mode.
(diff-fringe-add, diff-fringe-del, diff-fringe-rep, diff-fringe-nul):
New bitmaps.
(diff--font-lock-prettify): Move the +/- signs to the fringe.
(diff-wiggle): Use 'user-error'.
This fixes Bug#32630: since "dired-aux" moved to lexical binding mode,
the free variable TO in the constructed HELP-FORM got out of scope of
the surrounding 'let'.
* lisp/dired-aux.el (dired-create-files): Make the binding of
HELP-FORM a string.
Michael Albinus [Sat, 20 Oct 2018 11:38:31 +0000 (13:38 +0200)]
Expand host names in Tramp's ad-hoc multi-hop file names
* doc/misc/tramp.texi (Quick Start Guide): Improve wording.
(Change file name syntax): Say, that `tramp-file-name-regexp' is
not constant.
(Ad-hoc multi-hops): Explain host name expansion.
* etc/NEWS: Mention that host names in Tramp ad-hoc multi-hop file
names must match the previous hop for methods like "su" or "sudo".
Fix typos.
* lisp/net/tramp.el (tramp-find-method, tramp-find-user):
Adapt docstring.
(tramp-find-host): Mark default value.
(tramp-dissect-file-name): Expand host name for hops.
(tramp-dissect-hop-name, tramp-make-tramp-hop-name): New defuns.
(tramp-clear-passwd): Simplify.
Alan Mackenzie [Fri, 19 Oct 2018 17:44:31 +0000 (17:44 +0000)]
In edebug in GUIs, move focus to the selected frame.
Thus when entering edebug, the focus will be moved to the frame with the
source being debugged, and when its finished, the focus will move back.
Commands edebug-visit-eval-list (`E') and edebug-bounce-point (`p') have been
likewise amended.
* src/keyboard.c (readable_events): Handle FOCUS_OUT_EVENT as an invisible
event. This prevents input-pending-p returning t when one of these events
arrives, and thus obviates an instant termination of sit-for when there's no
"real" event waiting.
* lisp/emacs-lisp/edebug.el (edebug-focus-frame): New function.
(edebug-default-enter, edebug--display-1, edbug-where, edebug-bounce-point)
(edebug-visit-eval-list): Call edebug-focus-frame to move focus into the
window newly selected by edebug-pop-to-buffer.
Paul Eggert [Fri, 19 Oct 2018 16:06:52 +0000 (09:06 -0700)]
Fix struct thread alignment on FreeBSD x86
Problem reported by Joseph Mingrone in:
https://lists.gnu.org/r/emacs-devel/2018-10/msg00238.html
While we’re at it, apply a similar fix to struct Lisp_Subr; this
removes the need for GCALIGNED_STRUCT_MEMBER and thus can shrink
struct Lisp_Subr a bit.
* configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Bring back this macro.
Although used only for performance (not to actually align
structures), we might as well take advantage of it.
* src/lisp.h (GCALIGNED_STRUCT_MEMBER): Remove; all uses removed.
(union Aligned_Lisp_Subr): New type, like struct Lisp_Subr but aligned.
* src/lisp.h (XSUBR, DEFUN):
* src/lread.c (defsubr): Use it. All callers changed.
* src/thread.c (union aligned_thread_state): New type.
(main_thread): Now of this type, so it’s aligned.
All uses changed.
* src/xmenu.c (syms_of_xmenu) [USE_GTK || USE_X_TOOLKIT]:
Adjust to union Aligned_Lisp_Subr change.
Alan Mackenzie [Fri, 19 Oct 2018 09:54:31 +0000 (09:54 +0000)]
In follow mode windows in a GUI, don't display inactive cursors
This is done by setting cursor-in-non-selected-windows buffer locally.
* lisp/follow.el (follow-hide-ghost-cursors): New customizable option.
(follow-mode): Create and set, or kill buffer-local copy of
cursor-in-non-selected-windows when the mode gets enabled or disabled.
(follow-prev-buffer): New variable.
(follow-adjust-window): Manipulate cursor-in-non-selected-windows when the
current buffer changes, to ensure that cursors stay visible in non-selected
follow window groups.
Martin Rudalics [Fri, 19 Oct 2018 06:51:03 +0000 (08:51 +0200)]
Have 'split-window' handle 'up' and 'down' values (Bug#32790)
* lisp/window.el (split-window): Handle values of 'up' and 'down'
for SIDE argument (Bug#32790).
(window-in-direction): Amend doc-string as of yesterday's change.
Martin Rudalics [Thu, 18 Oct 2018 07:11:30 +0000 (09:11 +0200)]
Have 'window-in-direction' handle 'up' and 'down' values (Bug#32790)
* lisp/window.el (window-in-direction): Handle values of 'up'
and 'down' for DIRECTION argument (Bug#32790). Suggested by
Juri Linkov <juri@linkov.net>.
* lisp/windmove.el (windmove-find-other-window): Don't convert
first argument of 'window-in-direction'.
Paul Eggert [Thu, 18 Oct 2018 00:55:43 +0000 (17:55 -0700)]
Bring back nocombreloc if dumping
Without this patch, Emacs dumps core on Fedora 28 x86-64
when configured via "CC='gcc -m32' --enable-gcc-warnings
--without-imagemagick --without-gif --with-modules
PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig".
and then when run normally in a windowing system.
'make check' and 'emacs -nw' work OK even without the patch.
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Prepend
-znocombreloc if supported and if dumping. This mostly
reverts 2018-06-15T21:37:39!eggert@cs.ucla.edu "Remove old
combreloc hack".
Juri Linkov [Wed, 17 Oct 2018 22:24:43 +0000 (01:24 +0300)]
* lisp/mail/smtpmail.el (smtpmail-send-queued-mail): Load file with .el suffix.
For the case when load-prefer-newer is t, ensure loading the right file
by explicitly adding the .el suffix. Use the same variable names
as in the function smtpmail-send-it. (Bug#33055)
Eli Zaretskii [Wed, 17 Oct 2018 15:19:47 +0000 (18:19 +0300)]
Avoid assertion violation when comparing with main-thread
* src/thread.c (unmark_main_thread): New function.
* src/lisp.h (unmark_main_thread): Prototype it.
* src/alloc.c (garbage_collect_1): Call it after sweeping.
(Bug#33073)
* test/src/thread-tests.el (threads-test-bug33073): New test.
Federico Tedin [Wed, 17 Oct 2018 06:34:51 +0000 (08:34 +0200)]
Allow two mouse functions to work with Rectangle Mark mode
* lisp/mouse.el (mouse-save-then-kill): Make
mouse-save-then-kill work with rectangular regions, including
when mouse-drag-copy-region is set to t. (Bug#31240)
(mouse-drag-and-drop-region): Allow dragging and dropping
rectangular regions. (Bug#31240)
* rect.el (rectangle-intersect-p)
(rectangle-position-as-coordinates): New functions.
Glenn Morris [Tue, 16 Oct 2018 15:08:04 +0000 (08:08 -0700)]
Merge from origin/emacs-26
73babba (origin/emacs-26) Clarify documentation of fractional vertica... b20c51d * lisp/isearch.el (isearch-cmds): Recall absent isearch--stat... 700acbd doc/lispref/edebug.texi (Specification List) Remove obstrusiv... 1902450 Fix wording in module API documentation e724a8f Fix redisplay of glyphless characters 8fc892d Update --without-toolkit-scroll-bars doc 80e0bfa Call GTK functions only on GTK scrollbars 91c4c46 Update the description of startup in ELisp manual 18b42c6 Use the 'line-number' face for line-number fields past EOB a6ab8db Ensure NS frame is redrawn correctly after scroll