João Távora [Mon, 3 Dec 2018 11:45:24 +0000 (11:45 +0000)]
Make octave.el's cache a multiple-entry hash-table
Provide a way for the user to flush the cache manually.
* lisp/progmodes/octave.el (octave-eldoc-flush-cache): New function.
(octave-eldoc-function-signatures): Use new hash-table cache.
(octave-eldoc-cache): Now a hash-table.
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
Alan Mackenzie [Mon, 15 Oct 2018 19:48:25 +0000 (19:48 +0000)]
In follow mode, prevent the cursor resting on a partially displayed line
This fixes bug #32848
* lisp/follow.el (follow-adjust-window): If point ends up in a partially
displayed line in a left hand or middle window, move it one line forward, to
prevent unwanted scrolling should make-cursor-line-fully-visible be non-nil.
Alan Mackenzie [Mon, 15 Oct 2018 19:04:05 +0000 (19:04 +0000)]
Clarify documentation of fractional vertical scrolling and some doc strings
* doc/lispref/windows.texi (vertical scrolling): Clarify the meaning of
vertical scrolling by referring to tall screen lines, images, and the display
action. Clarify an ambiguous English tense.
* src/window.c (window-vscroll, set-window-vscroll): Amend doc strings to
refer to display.
Paul Eggert [Mon, 15 Oct 2018 05:55:37 +0000 (00:55 -0500)]
Update lib/regex from glibc via Gnulib
This syncs recent refactorings from glibc, and incorporates:
2018-10-15 libc-config: merge from glibc
2018-10-15 regex: depend on libc-config
* .gitignore: Do not ignore m4/_*.m4.
* lib/cdefs.h: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/libc-config.h, m4/__inline.m4: New files, copied from Gnulib.
* lib/regcomp.c, lib/regex.c, lib/regex_internal.c:
* lib/regex_internal.h, lib/regexec.c:
Copy from glibc via Gnulib.
Paul Eggert [Mon, 15 Oct 2018 03:10:48 +0000 (22:10 -0500)]
Update from Gnulib
This is minor refactoring that should not affect Emacs builds.
It incorporates:
2018-10-12 Make better use of Autoconf
* m4/environ.m4, m4/fsusage.m4, m4/manywarnings.m4, m4/socklen.m4:
Copy from Gnulib.
Paul Eggert [Sun, 14 Oct 2018 16:51:32 +0000 (09:51 -0700)]
Fix lisp_eval_depth in unwind-protect cleanup
Problem reported by Paul Pogonyshev (Bug#33034).
* src/lisp.h (union specbinding): New member unwind.eval_depth.
* src/eval.c (record_unwind_protect, set_unwind_protect): Set it.
(do_one_unbind): Use it.
Eli Zaretskii [Sat, 13 Oct 2018 16:47:01 +0000 (19:47 +0300)]
Fix redisplay of glyphless characters
* src/conf_post.h (bool_bf): Use 'unsigned int' in the MinGW
builds. Suggested by Tom Tromey <tom@tromey.com>. (Bug#33017)
* src/dispnew.c (scrolling_window): Update commentary
regarding xwidget builds.
Eli Zaretskii [Sat, 13 Oct 2018 08:36:04 +0000 (11:36 +0300)]
Update the description of startup in ELisp manual
* doc/lispref/os.texi (Startup Summary): Remove stale
reference to window-system-initialization-alist. Reported by
Zhang Haijun <ccsmile2008@outlook.com>.
Eli Zaretskii [Sat, 13 Oct 2018 07:13:10 +0000 (10:13 +0300)]
Improve 'json-insert' so it doesn't cons a string from JSON
* src/json.c (struct json_buffer_and_size): New member
inserted_bytes.
(json_insert): Instead of creating a string and inserting it
into the current buffer, copy the unibyte text into the gap.
(struct json_insert_data): New member inserted_bytes.
(json_insert_callback): Update commentary. Pass the
inserted_bytes value to json_insert and on its return copy the
updated value back into DATA.
(Fjson_insert): Decode the unibyte text inserted into the gap.
Call before-change-functions and after-change-functions only
once, before and after processing the insertion of the entire
JSON representation.
* test/src/json-tests.el (json-insert/throw): Adapt to the
modified implementation of json-insert: it no longer calls the
modification hooks once for each inserted chunk of JSON
representation.
Eli Zaretskii [Sat, 13 Oct 2018 06:44:09 +0000 (09:44 +0300)]
Use the 'line-number' face for line-number fields past EOB
* src/xdisp.c (get_phys_cursor_geometry): Treat rows at and
beyond ZV specially. Don't let the cursor exceed the
vertical dimensions of the row.
(maybe_produce_line_number): Use the 'line-number' face
instead of 'default' for blank fields beyond ZV. Don't update
the IT metrics when displaying blank line-number fields beyond
ZV. (Bug#32337)