Stefan Kangas [Sun, 14 Aug 2022 14:37:11 +0000 (16:37 +0200)]
Make gnus-iswitchb-completing-read obsolete
* lisp/gnus/gnus-util.el (gnus-iswitchb-completing-read): Make
obsolete. It depends on the obsolete library iswitchb.el.
(gnus-completing-read-function): Don't advertise above obsolete
function.
Paul Eggert [Sun, 14 Aug 2022 20:48:11 +0000 (13:48 -0700)]
Improve timefns speed on integers
* src/timefns.c (decode_lisp_time) [FASTER_TIMEFNS]:
Speed up when SPECIFIED_TIME is an integer.
(time_cmp) [FASTER_TIMEFNS]: Speed up when comparing integers.
Paul Eggert [Sun, 14 Aug 2022 18:11:30 +0000 (11:11 -0700)]
Fix selection preservation bug when USE_XCB
* src/xterm.c (x_preserve_selections) [USE_XCB]: Fix bug: use of
wrong ‘tem’ value. Found by GCC -Wanalyzer-use-of-uninitialized-value.
Move decl of local to make the (former) bug more obvious.
Michael Albinus [Sun, 14 Aug 2022 15:01:25 +0000 (17:01 +0200)]
Tramp code cleanup
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Use it.
* lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region):
New defalias.
* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file-name):
Fix root filename for cache.
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Adapt check for proper remote command.
* lisp/net/tramp-sh.el (tramp-open-shell): Add sanity check for
shell prompt.
(tramp-get-ls-command): Check, that argument "--color=never" has
the intended effect.
Stefan Kangas [Sun, 14 Aug 2022 14:17:31 +0000 (16:17 +0200)]
; Delete commented out manual section on emulation
This section has been commented out for close to a decade already. It
mostly deals with obsolete libraries, and there are separate manuals
for viper and edt.
* doc/emacs/misc.texi (Recursive Edit): Delete commented out section
on emulation.
Stefan Kangas [Sun, 14 Aug 2022 13:20:18 +0000 (15:20 +0200)]
Make Gnus FAQ more contemporary
* doc/misc/gnus-faq.texi (FAQ - Introduction): Fix timeline.
(FAQ - Changes): Delete outdated section.
(FAQ 5-5): Update to reflect that ispell.el and flyspell.el is
distributed with Emacs.
(FAQ 4-1, FAQ 4-7, FAQ 4-8, FAQ 4-14, FAQ 5-8, FAQ 5-10, FAQ 6-3)
(FAQ 7-2): Delete references to ancient versions of Gnus.
(FAQ 6-3): Delete reference to obsolete library nnir.el.
(FAQ - Glossary): Remove "Emacs" entry. This is self-explanatory, and
risks causing confusion; our docs never mean anything but "GNU Emacs"
when we say "Emacs".
Eli Zaretskii [Sun, 14 Aug 2022 12:47:59 +0000 (15:47 +0300)]
Further speedups of redisplay of long and truncated lines
* src/xdisp.c (mode_line_update_needed, redisplay_window)
(decode_mode_spec): Don't avoid calling current_column, as it is
now fast enough.
(redisplay_window) <optional_new_start>: Don't call 'move_it_to'
if its result will not be used.
(Flong_line_optimizations_p): New primitive.
* src/indent.c (Fcurrent_column): Doc fix.
(current_column, scan_for_column): When in a buffer with long
and/or truncated lines, quickly return an approximate value.
* src/window.c (Frecenter): Use the old text-mode code when the
buffer has very long lines.
* lisp/simple.el (line-move): Avoid costly calls to
'line-move-partial' and 'line-move-visual' when lines are
truncated and/or very long.
(move-beginning-of-line): Call 'line-beginning-position' instead
of the slower 'skip-chars-backward'.
Po Lu [Sun, 14 Aug 2022 01:39:08 +0000 (09:39 +0800)]
More fixes to MPX drag-and-drop interaction
* src/xterm.c (x_dnd_begin_drag_and_drop): Also initialize the
keyboard device used for drag-and-drop.
(handle_one_xevent): Verify deviceid in more places; also test
keyboard device before swallowing F1.
Stefan Monnier [Sat, 13 Aug 2022 16:03:22 +0000 (12:03 -0400)]
nadvice.el: Avoid exponential blow up in interactive-form recursion
* lisp/emacs-lisp/nadvice.el (advice--interactive-form): Sink the call
to `commandp` into the autoloaded function case since it's redundant in
the other branch.
(advice--make-interactive-form): Take just the interactive forms rather
than the actual functions as arguments.
(oclosure-interactive-form): Use `advice--interactive-form` rather than
`commandp` since we'd call `advice--interactive-form` afterwards anyway.
Stefan Kangas [Sat, 13 Aug 2022 15:40:17 +0000 (17:40 +0200)]
Update Gnus Installation FAQ
* doc/misc/gnus-faq.texi (FAQ 1-1, FAQ 1-2, FAQ 1-3, FAQ 1-4)
(FAQ 1-5): Update to reflect that Gnus is no longer released
separately from Emacs. Delete FAQ on Gnus 5.10, released in May 2003.
Eli Zaretskii [Sat, 13 Aug 2022 13:59:22 +0000 (16:59 +0300)]
Speed up display of long lines under 'truncate-lines'
* src/xdisp.c (partial_line_height): Return zero for long and
truncated lines.
(fast_move_it_horizontally): New function.
(hscroll_window_tree, display_line): Use
'fast_move_it_horizontally' in preference to
'move_it_in_display_line_to', when dealing with long and truncated
lines.
(redisplay_internal): Optimize "optimization 3" for long and
truncated lines.
* src/buffer.c (syms_of_buffer) <large-hscroll-threshold>: New
variable.
Eli Zaretskii [Sat, 13 Aug 2022 06:58:44 +0000 (09:58 +0300)]
Fix a recently-added Eshell test on MS-Windows
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/last-result-var-ext-cmd): Fix the test on
MS-Windows by making sure the internal 'format' command
is invoked. (Bug#57129)
Jim Porter [Wed, 10 Aug 2022 03:09:57 +0000 (20:09 -0700)]
Make '$?' and '$$' variables more consistent in Eshell
Previously, '$?' (last exit code) was only useful for external
commands, and '$$' (last result) was only useful for Lisp commands.
* lisp/eshell/esh-cmd.el (eshell-lisp-form-nil-is-failure): New
option.
(eshell-lisp-command): Set last exit code to 1 when the command
signals an error, and 2 if it returns nil (for Lisp forms only).
* lisp/eshell/esh-proc.el (eshell-sentinel): Set last result to t if
the command succeeded.
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/while-loop-lisp-form, esh-cmd-test/until-loop-lisp-form)
(esh-cmd-test/if-else-statement-lisp-form)
(esh-cmd-test/if-else-statement-lisp-form-2)
(esh-cmd-test/unless-else-statement-lisp-form): New tests.
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-status-var-lisp-form)
(esh-var-test/last-status-var-lisp-form-2)
(esh-var-test/last-status-var-ext-cmd)
(esh-var-test/last-status-var-ext-cmd): New tests.
(esh-var-test/last-result-var2): Rename from this...
( esh-var-test/last-result-var-twice): ... to this.
* doc/misc/eshell.texi (Variables): Update documentation about '$?'
and '$$'.
(Control Flow): Mention that '(lisp forms)' can be used as
conditionals.
Jim Porter [Sat, 6 Aug 2022 20:37:28 +0000 (13:37 -0700)]
Only set Eshell execution result metavariables when non-nil
This simplifies usage of 'eshell-close-handles' in several places and
makes it work more like the docstring indicated it would.
* lisp/eshell/esh-io.el (eshell-close-handles): Only store EXIT-CODE
and RESULT if they're non-nil. Also, use 'dotimes' and 'dolist' to
simplify the implementation.
* doc/misc/eshell.texi (Invocation): Explain '&&' and '||'.
(for loop): Move from here...
(Control Flow): ... to here, and add documentation for other control
flow forms.
Po Lu [Sat, 13 Aug 2022 02:35:08 +0000 (10:35 +0800)]
Improve MPX interaction with drag-and-drop
* src/xfns.c (Fx_set_mouse_absolute_pixel_position): Use
internal client pointer record.
* src/xterm.c (x_dnd_cancel_dnd_early): New function. Only used
on XI2 builds so far.
(x_dnd_begin_drag_and_drop): Set the pointer device used for DND
events.
(xi_disable_devices): Cancel the drag-and-drop operation if that
device is disabled.
(x_send_scroll_bar_event): Update outdated comment.
(handle_one_xevent): Only accept DND events from that device.
(frame_set_mouse_pixel_position): Use internal client pointer
record.
Stefan Kangas [Thu, 11 Aug 2022 11:49:15 +0000 (13:49 +0200)]
Rename etc-authors-mode to emacs-authors-mode
* emacs-authors-mode.el: Rename all symbols from 'etc-authors-*' to
'emacs-authors-*'. Make most old names into obsolete compat aliases.
* admin/authors.el: (Bug#57105)
* etc/AUTHORS: Use 'emacs-authors' instead of 'etc-authors'.
Clarify face-at-point doc string and add (thing-at-point 'face)
* lisp/faces.el (face-at-point): Say what this function does.
* lisp/thingatpt.el (thing-at-point-face-at-point): Add `face'
type (bug#57087).
(thing-at-point-provider-alist, thing-at-point): Mention it in the
doc strings.
Default outline-minor-mode-use-buttons to only happen in *Help*
* lisp/outline.el (outline-minor-mode-use-buttons): Change the
default to only use buttons in the *Help* buffer (for now),
because it's too disruptive in other modes. This will probably be
changed again to have some other mechanism to opt in in certain
modes, but it's not clear what that mechanism should look like.
Alan Mackenzie [Thu, 11 Aug 2022 19:31:09 +0000 (19:31 +0000)]
New debugging facility: backtraces from errors in Lisp called from redisplay
Setting backtrace-on-redisplay-error to non-nil enables the generation of a
Lisp backtrace in buffer *Redisplay-trace* following an error in Lisp called
from redisplay.
* doc/lispref/debugging.texi (Debugging Redisplay): New subsection.
(Error Debugging): Reference to the new subsection.
* etc/NEWS: New entry for the new facility.
* src/eval.c (redisplay_deep_handler): New variable.
(init_eval): Initialize redisplay_deep_handler.
(call_debugger): Don't throw to top-level after calling debug-early
(internal_condition_case_n): "Bind" redisplay_deep_handler to the current
handler.
(backtrace_yet): New boolean variable.
(signal_or_quit): New code section to handle Lisp errors occurring in
redisplay.
(syms_of_eval): New DEFVAR_BOOL backtrace-on-redisplay-error.
* src/keyboard.c (command_loop_1): Set backtrace_yet to false each time around
the loop.
(safe_run_hooks_error): Allow args to be up to four Lisp_Objects long.
(safe_run_hooks_2): New function.
* src/lisp.h (top level): declare as externs backtrace_yet and
safe_run_hooks_2.
* src/xdisp.c (run_window_scroll_functions): Replace a call to
run_hook_with_args_2 with one to safe_run_hooks_2.
Axel Svensson [Mon, 8 Aug 2022 23:11:02 +0000 (01:11 +0200)]
Support the full range of variation selectors
* lisp/international/characters.el: Provide acronyms for variation
selectors.
(update-glyphless-char-display): Update display of the full range
of variation selectors.
(glyphless-char-display-control): Update doc string. (Bug#57072)
* doc/lispref/display.texi (Glyphless Chars): Document more
variation selectors.
Ulf Jasper [Thu, 11 Aug 2022 11:26:52 +0000 (13:26 +0200)]
newsticker: fix bug#57045
* lisp/net/newst-treeview.el
(newsticker--treeview-list-items-with-age) (newsticker-treeview-update):
Fix issues with changing sort order in virtual feed 'all' (Bug#57045).