Tassilo Horn [Sun, 6 Feb 2022 10:10:08 +0000 (11:10 +0100)]
Display show-paren-context-when-offscreen in child frame
* etc/NEWS: Extend section about the new
`show-paren-context-when-offscreen' custom option.
* lisp/paren.el (show-paren-context-when-offscreen): Allow special
value `child-frame'.
(show-paren-function): Handle `child-frame' value of
`show-paren-context-when-offscreen'.
(show-paren--context-child-frame): New defvar.
(show-paren--context-child-frame-redirect-focus): New function.
(show-paren--context-child-frame-buffer): New function.
(show-paren--context-child-frame-parameters): New defvar.
(show-paren--delete-context-child-frame): New function.
(show-paren--show-context-in-child-frame): New function.
Michael Albinus [Sun, 6 Feb 2022 08:43:13 +0000 (09:43 +0100)]
Make usage of su and sudo consistent in eshell (bug#53783)
* lisp/eshell/em-tramp.el (eshell/su, eshell/sudo):
Use `tramp-default-host' instead of "localhost".
Stefan Kangas [Sun, 6 Feb 2022 05:49:39 +0000 (06:49 +0100)]
Merge from origin/emacs-28
821c240075 Fix ietf-drums-get-comment doc string
638247baa4 Fix typo in display.texi
Po Lu [Sun, 6 Feb 2022 05:40:21 +0000 (13:40 +0800)]
* lwlib/xlwmenu.c (pop_up_menu): Work around motion problems on XI2.
Po Lu [Sun, 6 Feb 2022 03:28:29 +0000 (11:28 +0800)]
; * src/xfns.c (x_encode_text): Fix comment.
Bob Rogers [Sun, 6 Feb 2022 03:07:51 +0000 (04:07 +0100)]
Add ietf-drums tests, fix parse-address decoding
* test/lisp/mail/ietf-drums-tests.el (ietf-drums-tests): Test most of
lisp/mail/ietf-drums.el functionality.
* lisp/mail/ietf-drums.el: (ietf-drums-parse-address): Bug fix:
Require rfc2047 when needed (bug#53811).
Po Lu [Sun, 6 Feb 2022 02:43:38 +0000 (10:43 +0800)]
Allow disabling frame resize synchronization
* doc/emacs/xresources.texi (Table of Resources): Document new
parameter `synchronizeResize'.
* etc/NEWS: Announce frame resize synchronization.
* src/xterm.c (x_term_init): Don't enable XSync if the
X resource `synchronizeResize' is off or false.
Po Lu [Sun, 6 Feb 2022 01:18:59 +0000 (09:18 +0800)]
Clean up lots of #ifdef'd out code in PGTK files
Most of them are either relics from X or from the NS code
pgtkfns.c was copied from whole.
* src/pgtkfns.c (x_icon):
(pgtk_set_scroll_bar_foreground):
(pgtk_set_scroll_bar_background):
(Fx_create_frame):
(pgtk_window_is_ancestor):
(x_create_tip_frame):
* src/pgtkselect.c (syms_of_pgtkselect):
* src/pgtkterm.c (pgtk_iconify_frame):
(x_set_frame_alpha):
(button_event): Remove defined out code that cannot make sense.
* src/pgtkmenu.c (show_help_event): Remove ifdef'd out code and
reword comment.
Po Lu [Sun, 6 Feb 2022 00:58:23 +0000 (08:58 +0800)]
Handle window state changes on PGTK
* src/pgtkterm.c (window_state_event): Set fullscreen, sticky,
and iconification status according to the new window state.
(bug#53793)
Po Lu [Sun, 6 Feb 2022 00:39:02 +0000 (08:39 +0800)]
Minor changes to xsync support
* src/xfns.c (append_wm_protocols): Don't append
_NET_WM_SYNC_REQUEST unless the display supports our version of
XSync.
* src/xterm.c (handle_one_xevent): Don't handle
_NET_WM_SYNC_REQUEST unless the display supports that.
(x_free_frame_resources): Test basic counter against None.
Bob Rogers [Sun, 6 Feb 2022 00:07:43 +0000 (01:07 +0100)]
Fix ietf-drums-get-comment doc string
* lisp/mail/ietf-drums.el (ietf-drums-get-comment): We really return
the last comment (bug#53810).
Lars Ingebrigtsen [Sun, 6 Feb 2022 00:00:04 +0000 (01:00 +0100)]
Improve the elp-instrument-package doc string
* lisp/emacs-lisp/elp.el (elp-instrument-package): Note the effect
of loading further files (bug#13252).
Mauro Aranda [Sat, 5 Feb 2022 23:38:40 +0000 (00:38 +0100)]
Fix reverting the default face to standard/themed state in GUIs
* lisp/cus-edit.el (custom-face-set, custom-face-mark-to-save)
(custom-face-save): Record the default (standard or themed) attributes
of the default face in a symbol property.
(custom-face-reset-saved, custom-face-mark-to-reset-standard): When
reverting the default face to the standard or themed state, use the
default attributes we recorded, instead of relying in the
defface spec
of the default face, since that doesn't give enough information to
reset all attributes, like foreground, family, etc (bug#14635).
Lars Ingebrigtsen [Sat, 5 Feb 2022 23:29:33 +0000 (00:29 +0100)]
Add new user option 'find-library-include-other-files'
* lisp/emacs-lisp/find-func.el (read-library-name--find-files):
New function (bug#15735).
(read-library-name): Use it.
(find-library-include-other-files): New user option.
Lars Ingebrigtsen [Sat, 5 Feb 2022 22:57:38 +0000 (23:57 +0100)]
Tweak how eshell/cd works when cd-ing to ".." from "/"
* lisp/eshell/em-dirs.el (eshell/cd): Make "cd .." from "/" less
confusing (bug#16861).
Lars Ingebrigtsen [Sat, 5 Feb 2022 22:46:02 +0000 (23:46 +0100)]
Add a :distant-foreground to the lazy-highlight face
* lisp/isearch.el (lazy-highlight): Add a :distant-foreground
colour so that the text is always legible (bug#16969).
Lars Ingebrigtsen [Sat, 5 Feb 2022 21:46:08 +0000 (22:46 +0100)]
Add new function mode-line-window-selected-p
* doc/lispref/modes.texi (Mode Line Basics): Mention it (bug#53629).
* lisp/bindings.el (mode-line-window-selected-p): New function
from martin rudalics <rudalics@gmx.at>.
Daniel Martín [Sat, 5 Feb 2022 20:03:21 +0000 (21:03 +0100)]
Fix typo in display.texi
* doc/lispref/display.texi (Making Buttons): Fix typo. (Bug#53807)
Michael Albinus [Sat, 5 Feb 2022 18:17:47 +0000 (19:17 +0100)]
Adapt Tramp to changed unload behavior (bug#53632)
* test/lisp/net/tramp-tests.el (tramp-test47-unload): Check also
for autoloaded macros. Respect `tramp-autoload' function property.
Po Lu [Sat, 5 Feb 2022 13:43:00 +0000 (21:43 +0800)]
Add support for basic syncing with the window manager on resize
This is handled by GTK 3, so the code is disabled on that
specific build. On other builds, this eliminates any unexposed
part of a frame from showing up after a resize when
`frame-resize-pixelwise' is t.
* configure.ac: Check for the X Synchronization Extension if
present.
* src/Makefile.in (EMACS_CFLAGS):
(LIBES): Add XSYNC_LIBS and XSYNC_CFLAGS.
* src/xfns.c (append_wm_protocols): Declare
`_NET_WM_SYNC_REQUEST' support if appropriate.
(x_window): Adjust location of call to `append_wm_protocols' on
Xt version to prevent it from being overwritten.
(Fx_create_frame): Create basic counter.
* src/xterm.c (XTframe_up_to_date): Set counter value to the one
asked for by the window manager.
(handle_one_xevent): Handle _NET_WM_SYNC_REQUEST.
(x_free_frame_resources): Free frame counter if present.
(x_term_init): Test for XSync and set fields accordingly.
* src/xterm.h (struct x_display_info): New fields for XSync
support and new atoms.
(struct x_output): New fields for counter status.
(FRAME_X_BASIC_COUNTER): New macro.
Po Lu [Sat, 5 Feb 2022 11:48:23 +0000 (19:48 +0800)]
* lisp/pixel-scroll.el: Update commentary.
Eli Zaretskii [Sat, 5 Feb 2022 11:01:24 +0000 (13:01 +0200)]
Fix 'current-column' in the presence of display strings
* src/indent.c (check_display_width): Support calculation of width
of 'display' properties whose values are strings. This fixes the
value returned by 'current-column' when display strings are
present between BOL and point. (Bug#53795)
Alan Mackenzie [Sat, 5 Feb 2022 10:43:27 +0000 (10:43 +0000)]
* lisp/emacs-lisp/debug-early.el: Improve the documentation
Michael Albinus [Sat, 5 Feb 2022 10:30:20 +0000 (11:30 +0100)]
Remove superfluous `font-lock-add-keywords' calls in Tramp
* lisp/net/tramp.el (with-parsed-tramp-file-name)
(with-tramp-progress-reporter, with-tramp-file-property)
(with-tramp-connection-property, with-tramp-locked-connection):
* lisp/net/tramp-gvfs.el (with-tramp-dbus-call-method)
(with-tramp-dbus-get-all-properties): Do not call
`font-lock-add-keywords' for macros, it isn't needed anymore.
Michael Albinus [Sat, 5 Feb 2022 10:12:17 +0000 (11:12 +0100)]
Adapt Tramp to changed unload behavior (bug#53632)
* lisp/net/tramp.el (tramp-autoload-file-name-handler)
(tramp-register-autoload-file-name-handlers)
(tramp-unload-file-name-handlers, tramp-unload-tramp):
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp)
(tramp-archive-autoload-file-name-handler)
(tramp-register-archive-file-name-handler):
Add `tramp-autoload' function property.
Lars Ingebrigtsen [Sat, 5 Feb 2022 07:50:05 +0000 (08:50 +0100)]
Fix yank-media utf-16 detection
* lisp/yank-media.el (yank-media--utf-16-p): Factor out into its
own function for easier testing and fix the code.
Lars Ingebrigtsen [Sat, 5 Feb 2022 07:07:18 +0000 (08:07 +0100)]
Improve the selected-window doc string
* src/window.c (Fselected_window): Add some pointers to other
functions in this area.
Jim Porter [Sat, 5 Feb 2022 06:41:39 +0000 (22:41 -0800)]
Ensure that the CAR of 'eshell-last-async-procs' always points to a process
Previously, if a non-process was piped to a process, this could end up
being nil, which isn't correct. 'eshell-last-async-procs' should just
ignore non-process commands in a pipeline.
* lisp/eshell/esh-cmd.el (eshell-do-pipelines): Set 'headproc'
correctly.
* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-headproc): New test.
Brendan O'Dea [Sat, 5 Feb 2022 06:51:03 +0000 (07:51 +0100)]
Remove kerning escapes in woman mode
* lisp/woman.el (woman-decode-region): Remove kerning escapes
(bug#53770).
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Sat, 5 Feb 2022 06:26:24 +0000 (07:26 +0100)]
Improve the Archive file names tramp documentation
* doc/misc/tramp.texi (Archive file names): Explicitly say how to
open an archive with Tramp (bug#25076).
Lars Ingebrigtsen [Sat, 5 Feb 2022 06:00:50 +0000 (07:00 +0100)]
Fix yank-media-types--format decoding
* lisp/yank-media.el (yank-media-types--format): Check that we
really have some nuls.
Po Lu [Sat, 5 Feb 2022 05:08:00 +0000 (05:08 +0000)]
Finish up cursor color merging on Haiku
* src/haikuterm.c (haiku_draw_text_decoration):
(haiku_draw_plain_background):
(haiku_draw_stretch_glyph_string):
(haiku_merge_cursor_foreground): Use merged cursor colors.
Po Lu [Sat, 5 Feb 2022 03:20:45 +0000 (03:20 +0000)]
Fix last change to ftcrfont.c
* src/ftcrfont.c (ftcrfont_draw): Remove relic `face' variable
and use s->face instead.
Po Lu [Sat, 5 Feb 2022 03:17:58 +0000 (03:17 +0000)]
Implement face cursor color merging on Haiku
* src/ftcrfont.c (ftcrfont_draw):
* src/haikufont.c (haikufont_draw): Use
`haiku_merge_cursor_foreground' to calculate cursor HL colors.
* src/haikuterm.c (haiku_merge_cursor_foreground): New function.
* src/haikuterm.h: Update prototypes.
Po Lu [Sat, 5 Feb 2022 02:51:39 +0000 (10:51 +0800)]
Set WM_TRANSIENT_FOR on tooltip frames
Otherwise the decorations get all messed up on GNOME and some
other composited desktops.
* src/xfns.c (Fx_show_tip): Set WM_TRANSIENT_FOR to the window
underneath the tooltip.
Po Lu [Sat, 5 Feb 2022 01:41:01 +0000 (09:41 +0800)]
Implement _NET_WM_PING protocol
* src/xfns.c (append_wm_protocols): New function.
(x_window): Call `append_wm_protocols' after window creation.
* src/xterm.c (handle_one_xevent): Handle _NET_WM_PING client
messages.
(x_term_init): Intern _NET_WM_PING atom.
* src/xterm.h (struct x_display_info): New field
`Xatom_net_wm_ping'.
Vladimir Panteleev [Fri, 4 Feb 2022 02:46:50 +0000 (02:46 +0000)]
Update the MULTIPLE property with conversion outcomes
Per the ICCCM spec:
> If the owner fails to convert the target named by an atom in the
> MULTIPLE property, it should replace that atom in the property with
> None.
* src/xselect.c (x_handle_selection_request): Do it.
Vladimir Panteleev [Fri, 4 Feb 2022 01:54:45 +0000 (01:54 +0000)]
Do not delete the MULTIPLE property after reading it
Per the ICCCM spec:
> The requestor should delete [...] the property specified in the
> MULTIPLE request when it has copied all the data.
We are not the requestor, so we should not be deleting this property
(which is what x_get_window_property_as_lisp_data does). The property
needs to remain available as the requestor will generally want to read
it back to see which conversions succeeded or not.
* src/xselect.c (x_get_window_property_as_lisp_data): Add flag which
skips deleting the read property, or handling INCR (which does not
make sense for MULTIPLE).
(x_handle_selection_request): Enable the flag.
Stefan Monnier [Sat, 5 Feb 2022 00:39:53 +0000 (19:39 -0500)]
(with-demoted-errors): Warn on missing `format` arg
The `format` arg has been mandatory for a while, but the backward
compatibility code that handled the case of a missing `format` arg
made it hard to notice when using the old calling convention.
* lisp/subr.el (with-demoted-errors): Warn on missing `format` arg.
* lisp/emacs-lisp/smie.el (smie-indent--separator-outdent): Don't abuse
`with-demoted-errors`.
(smie-indent-line, smie-auto-fill):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-with-demoted-errors):
* lisp/vc/vc-hooks.el (vc-refresh-state):
* lisp/vc/vc-annotate.el (vc-annotate-background-mode):
* lisp/vc/diff-mode.el (diff-syntax-fontify-hunk):
* lisp/textmodes/reftex-toc.el (reftex-re-enlarge):
* lisp/progmodes/sh-script.el (sh-smie-sh-rules):
* lisp/progmodes/octave.el (inferior-octave-startup):
* lisp/pcmpl-gnu.el (pcmpl-gnu-make-all-targets):
* lisp/org/org-refile.el (org-refile):
* lisp/org/org-capture.el (org-capture-store-last-position):
* lisp/nxml/nxml-mode.el (nxml-mode):
* lisp/notifications.el (notifications-notify):
* lisp/gnus/mm-view.el (mm-display-inline-fontify):
* lisp/finder.el (finder-unload-function):
* lisp/files.el (safe-local-variable-p, backup-buffer-copy
* lisp/autorevert.el (auto-revert-notify-handler):
Pass `format` arg to `with-demoted-errors`.
Stefan Monnier [Fri, 4 Feb 2022 18:39:19 +0000 (13:39 -0500)]
python.el: Silence left over warning in last commit
* lisp/progmodes/python.el
(python-shell-calculate-process-environment): Declare
tramp-remote-process-environment before using it.
Stefan Monnier [Fri, 4 Feb 2022 18:35:21 +0000 (13:35 -0500)]
python.el: Try and better split the Tramp code
Massage the Python-Tramp code so that the Tramp part and the Python
part are a bit less intertwined. It's still not quite right, but it's
a bit closer to the point where the Tramp part can be moved to `tramp.el`.
* lisp/progmodes/python.el: Don't require `tramp-sh`.
Do require `subr-x` OTOH. Remove redundant `:group`s.
(python-shell--calculate-process-environment): New function, that only
return the entries to be added.
(python-shell-calculate-process-environment): Rewrite and declare obsolete.
(python-shell-tramp-refresh-remote-path)
(python-shell-tramp-refresh-process-environment): Silence
compiler warnings.
(python-shell-with-environment): Move the bulk of its code to
a new function `python-shell--with-environment` for easier debugging
and to avoid code duplication.
(python-shell--with-environment): New function. Split the Tramp case
into its own function.
(python-shell--tramp-with-environment): New function.
(python-eldoc-function-timeout-permanent): Fix doc's first line.
* test/lisp/progmodes/python-tests.el: Adjust accordingly.
(python-shell-calculate-process-environment-1)
(python-shell-calculate-process-environment-2)
(python-shell-calculate-process-environment-3)
(python-shell-calculate-process-environment-4)
(python-shell-calculate-process-environment-5)
(python-shell-calculate-process-environment-6)
(python-shell-calculate-process-environment-7)
(python-shell-calculate-process-environment-8):
Use `python-shell--calculate-process-environment`.
(python--tests-process-env-canonical, python--tests-process-env-eql):
New functions.
(python-shell-with-environment-2, python-shell-with-environment-3):
Use them.
Michael Albinus [Fri, 4 Feb 2022 18:24:43 +0000 (19:24 +0100)]
Improve Tramp tests backward compatibility
* test/lisp/net/tramp-tests.el (tramp-test39-detect-external-change):
Improve backward compatibility.
Andrea Corallo [Fri, 4 Feb 2022 14:45:42 +0000 (15:45 +0100)]
* Have `null' and `not' explicit in LIMPLE so we inline them
* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Generate explicit
`eq' call in LIMPLE for LAP opcode 'not'.
Eli Zaretskii [Fri, 4 Feb 2022 13:50:50 +0000 (15:50 +0200)]
Fix infloop in redisplay_window due to fix of bug#14582
* src/xdisp.c (window_start_acceptable_p): New function.
(redisplay_window): Call 'window_start_acceptable_p' to determine
whether a given window-start point is acceptable, including when
the window's force_start flag is set -- this fixes infloop in
redisplay_window in that case.
Po Lu [Fri, 4 Feb 2022 13:22:03 +0000 (21:22 +0800)]
Remove misleading "in current buffer" message from auto-raise-mode
* lisp/frame.el (auto-raise-mode): Declare as global to prevent
a misleading message from being displayed. It's actually
frame-local, but declaring it global doesn't hurt since
`frame-parameter' is a gv.
Stefan Kangas [Fri, 4 Feb 2022 13:15:33 +0000 (14:15 +0100)]
Silence byte-compiler in two tests
* test/lisp/electric-tests.el (electric-pair-define-test-form):
* test/src/buffer-tests.el (buffer-tests--make-test-name): Silence
byte-compiler by defining defuns also at run time.
Po Lu [Fri, 4 Feb 2022 12:12:56 +0000 (12:12 +0000)]
; * src/haikuterm.c (haiku_end_cr_clip): Fix trivial typo.
Po Lu [Fri, 4 Feb 2022 12:10:30 +0000 (12:10 +0000)]
Implement auto-raise on Haiku
* src/haikuterm.c (haiku_read_socket): Implement auto-raising
of frames that have that parameter set.
Michael Albinus [Fri, 4 Feb 2022 10:59:56 +0000 (11:59 +0100)]
* lisp/net/tramp-gvfs.el (tramp-gvfs-send-command): Fix problem with locale.
Po Lu [Fri, 4 Feb 2022 07:39:45 +0000 (15:39 +0800)]
; * src/xterm.c (x_alloc_nearest_color_1): Remove extraneous code.
Po Lu [Fri, 4 Feb 2022 07:38:07 +0000 (15:38 +0800)]
Fix bit rot in the color allocation code
* src/xterm.c (x_alloc_nearest_color_1): Reintroduce an older
version of the code that would try to allocate a "compromise
delta".
Po Lu [Fri, 4 Feb 2022 07:17:40 +0000 (15:17 +0800)]
* src/xwidget.c (xwidget_button): Always let button events through.
Filtering out emulated events is done in handle_one_xevent, so
all this accomplishes is to filter out legitimate button events.
Stefan Kangas [Fri, 4 Feb 2022 05:30:30 +0000 (06:30 +0100)]
Merge from origin/emacs-28
0591aa6cd3 Revert an erroneous change in tramp-cache.el
Po Lu [Fri, 4 Feb 2022 05:13:06 +0000 (13:13 +0800)]
Fix toggling `x-gtk-use-native-input'.
* lisp/term/x-win.el (x-internal-focus-input-context):
(x-gtk-use-native-input-watcher): Update for changes to
`x-internal-focus-input-context'.
* src/xfns.c (Fx_internal_focus_input_context): New parameter
`focus'.
Po Lu [Fri, 4 Feb 2022 03:28:05 +0000 (03:28 +0000)]
Make Emacs build with some other XLib implementations
* configure.ac (HAVE_XKB): Check for functions that aren't
always implemented by various XLib implementations.
* src/xfns.c (select_visual): Handle NULL values of vinfo.
(XkbRefreshKeyboardMapping):
(XkbFreeNames):
(XDisplayCells):
(XDestroySubwindows): Define replacement functions where they
aren't available.
* src/xterm.c (x_find_modifier_meanings): Handle NULL values of
various fields.
Po Lu [Fri, 4 Feb 2022 02:16:14 +0000 (10:16 +0800)]
* src/xfns.c (Fx_internal_focus_input_context): Fix typo.
Po Lu [Fri, 4 Feb 2022 02:11:31 +0000 (10:11 +0800)]
Make `x-gtk-use-native-input' take effect immediately
* lisp/term/x-win.el (x-internal-focus-input-context): New
declaration.
(x-gtk-use-native-input-watcher): New variable watcher.
* src/xfns.c (Fx_internal_focus_input_context): New function.
(syms_of_xfns): Define new subr.
Po Lu [Fri, 4 Feb 2022 01:04:06 +0000 (09:04 +0800)]
Try to fix input method flicker on GTK builds
* src/xterm.c (x_focus_changed): Only focus GTK context if
native input is on. (bug#53698)
Andrew G Cohen [Fri, 4 Feb 2022 00:30:32 +0000 (08:30 +0800)]
Improve compression of article lists in gnus/nnselect
* lisp/gnus/nnselect.el (nnselect-compress-artlist): Allow compressed list.
nnselect-uncompress-artlist): Properly loop over rsv values.
Po Lu [Fri, 4 Feb 2022 00:51:24 +0000 (08:51 +0800)]
Improve image depth handling
Emacs defaults to a 32-bit TrueColor visual, but if that happens
on a display which defaults to 16-bit TrueColor, yet happens to
have 32-bit color, and doesn't have the X Render Extension, an
error will occur in x_composite_image as libXpm will load
pixmaps of depth 16 instead of depth 32.
* src/image.c (x_create_x_image_and_pixmap): Explictly specify
display depth.
(x_create_xrender_picture):
(xpm_load):
(gs_load): Use dpyinfo->n_planes instead of
DefaultDepthOfScreen.
Lars Ingebrigtsen [Thu, 3 Feb 2022 21:16:14 +0000 (22:16 +0100)]
Improve the bookmark-default-handler doc string
* lisp/bookmark.el (bookmark-default-handler): Document the
`buffer' property (bug#20845).
Lars Ingebrigtsen [Thu, 3 Feb 2022 19:54:17 +0000 (20:54 +0100)]
Remove tarball instructions from gnus-faq.texi
Lars Ingebrigtsen [Thu, 3 Feb 2022 19:33:58 +0000 (20:33 +0100)]
Make sort-numeric-fields resilient towards blank lines
* lisp/sort.el (sort-numeric-fields): Don't signal an error on
blank lines (bug#31800).
Jim Porter [Thu, 3 Feb 2022 02:26:50 +0000 (18:26 -0800)]
Use 'require' to load eshell-tests-helpers
* test/lisp/eshell/eshell-tests.el
* test/lisp/eshell/em-extpipe-tests.el: Load eshell-tests-helpers with
'require'.
* test/lisp/eshell/eshell-tests-helpers.el (eshell-history-file-name):
Define this here so individual test files don't have to.
Jim Porter [Mon, 31 Jan 2022 02:53:53 +0000 (18:53 -0800)]
When executing an Eshell pipeline, send input to the first process
Previously, input was sent to the last process in the pipeline,
resulting in unexpected behavior when running commands like
'tr a-z A-Z | rev'.
* lisp/eshell/esh-util.el (eshell-process-pair-p)
(eshell-make-process-pair): New functions.
* lisp/eshell/esh-cmd.el (eshell-last-async-proc): Rename to...
(eshell-last-async-procs): ... this, and store a pair of processes.
(eshell-interactive-process): Replace with...
(eshell-interactive-process-p, eshell-head-process)
(eshell-tail-process): ... these.
(eshell-cmd-initialize): Set 'eshell-last-async-procs'.
(eshell-do-pipelines): Set 'headproc'.
(eshell-execute-pipeline): Return 'headproc' and 'tailproc'.
(eshell-resume-eval): Use 'eshell-last-async-procs'.
(eshell-do-eval): Make sure we work with a pair of processes.
* lisp/eshell/esh-proc.el (eshell-send-eof-to-process): Move from
here...
* lisp/eshell/esh-mode.el (eshell-send-eof-to-process): ... to here,
and only send EOF to the head process.
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments)
* lisp/eshell/esh-mode.el (eshell-intercept-commands)
(eshell-watch-for-password-prompt):
Use 'eshell-interactive-process-p'.
* lisp/eshell/em-rebind.el (eshell-delchar-or-maybe-eof)
* lisp/eshell/em-term.el (eshell-term-send-raw-string)
* lisp/eshell/esh-mode.el (eshell-self-insert-command)
(eshell-send-input, eshell-send-invisible):
Use 'eshell-head-process'.
* lisp/eshell/esh-cmd.el (eshell-as-subcommand):
Use 'eshell-tail-process'.
* lisp/eshell/eshell.el (eshell-command):
* test/lisp/eshell/eshell-tests-helpers.el
(eshell-wait-for-subprocess):
Use 'eshell-interactive-process-p' and 'eshell-tail-process'.
* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-headproc-stdin):
New test.
Jim Porter [Fri, 28 Jan 2022 07:13:36 +0000 (23:13 -0800)]
Ensure that tailproc is set for the last process in an Eshell pipeline
In particular, this used to fail for pipelines where the last process
in the pipeline came from the first element of the pipeline. This
could happen when a process was piped to an ordinary Lisp function,
like in '*echo hi | echo bye'.
* lisp/eshell/esh-cmd.el (eshell-do-pipelines): Set the tailproc even
for the first process in the pipeline.
* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-tailproc): New
test.
Eli Zaretskii [Thu, 3 Feb 2022 17:36:43 +0000 (19:36 +0200)]
Allow ensuring that a window's starting point is never invisible
* src/xdisp.c (syms_of_xdisp) <make-window-start-visible>: New
buffer-local variable.
(redisplay_window): If 'make-window-start-visible' is non-nil,
don't accept window-start position that is in invisible text or is
covered by a "replacing" 'display' property. (Bug#14582)
Michael Albinus [Thu, 3 Feb 2022 14:30:39 +0000 (15:30 +0100)]
Revert an erroneous change in tramp-cache.el
* lisp/net/tramp-cache.el (tramp-get-hash-table):
Use `string-match-p' instead of `string-search'. The latter one
was introduced by accident. Reported by Kai Tetzlaff <kai@tetzlaff.eu>.
Thomas Fitzsimmons [Thu, 3 Feb 2022 14:19:03 +0000 (09:19 -0500)]
soap-client: Add minimum supported Emacs version
* lisp/net/soap-client.el: Add Emacs 24.1 to Package-Requires.
Bump version to 3.2.1.
Michael Albinus [Thu, 3 Feb 2022 13:21:23 +0000 (14:21 +0100)]
Implement file modification check in Tramp
* lisp/net/tramp.el (tramp-handle-lock-file): Check, whether FILE
is modified.
* test/lisp/net/tramp-tests.el (tramp-test39-detect-external-change):
New test.
Mattias Engdegård [Thu, 3 Feb 2022 11:25:53 +0000 (12:25 +0100)]
Don't use `string-replace` in soap-client (bug#53744)
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Cease using `string-replace` since it requires Emacs 28.
Mattias Engdegård [Thu, 3 Feb 2022 11:15:06 +0000 (12:15 +0100)]
Don't use `string-search` in soap-client (bug#53744)
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Since soap-client is a core ELPA package and may be used with
Emacs versions older than 28, it cannot use `string-search`;
revert to `string-match`.
Eli Zaretskii [Thu, 3 Feb 2022 11:00:47 +0000 (13:00 +0200)]
Fix "Buffers->Frames" submenu in daemon sessions
* lisp/menu-bar.el (menu-bar-update-buffers): Detect the initial
frame by its special terminal's name. (Bug#53740)
* src/terminal.c (init_initial_terminal): Add comment about using
the initial-terminal's name in menu-bar.el.
Po Lu [Thu, 3 Feb 2022 10:34:50 +0000 (10:34 +0000)]
* src/haikufont.c (haikufont_draw): Allocate string buffer on stack.
Po Lu [Thu, 3 Feb 2022 07:50:36 +0000 (07:50 +0000)]
Stop creating cairo contexts in haiku_begin_cr_clip
* src/haikufont.c (haikufont_draw):
* src/ftcrfont.c (ftcrfont_draw): Stop holding the draw lock.
* src/haiku_support.cc (class EmacsView): New field
`cairo_context'.
(DetachCairoSurface): Destroy cairo_context.
(AttachCairoSurface): Create cairo_context from the surface.
(EmacsView_cairo_surface): Delete function.
(EmacsView_cairo_context): New function.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_begin_cr_clip):
(haiku_end_cr_clip): Retrieve the existing cairo context instead
of creating a new one.
* src/haikuterm.h (FRAME_CR_CONTEXT): New macro.
Po Lu [Thu, 3 Feb 2022 07:14:59 +0000 (07:14 +0000)]
Obtain draw lock outside haiku_start_clip
* src/haikuterm.c (haiku_start_clip):
(haiku_end_clip): Stop obtaining the draw lock.
(haiku_draw_glyph_string): Set draw lock here instead.
Stefan Kangas [Thu, 3 Feb 2022 05:30:29 +0000 (06:30 +0100)]
Merge from origin/emacs-28
ab2f275422 Improve documentation of 'emacs-version'
Po Lu [Thu, 3 Feb 2022 05:21:33 +0000 (05:21 +0000)]
* src/haikuterm.c (haiku_draw_text_decoration): Don't lock for draws.
Po Lu [Thu, 3 Feb 2022 05:16:35 +0000 (05:16 +0000)]
Simplify box display code on Haiku
* src/haikuterm.c (haiku_calculate_relief_colors): Remove
`rgbout_c' parameter.
(haiku_draw_relief_rect): Push state if performing additional
clipping.
(haiku_draw_string_box): Stop passing clip rects to the relief
drawing functions.
(haiku_draw_glyph_string): Fix calls to haiku_draw_string_box
for new parameters.
Po Lu [Thu, 3 Feb 2022 01:57:00 +0000 (01:57 +0000)]
Fix display of text decorations with defaulted foreground on Haiku
* src/haikuterm.c (haiku_draw_text_decoration): Remove parameter
`dcol' and use face->foreground instead. All callers changed.
Po Lu [Thu, 3 Feb 2022 01:47:29 +0000 (01:47 +0000)]
Fix background daemon on Haiku
* src/emacs.c (DAEMON_MUST_EXEC): Define when using the Haiku
application kit.
Po Lu [Thu, 3 Feb 2022 01:28:43 +0000 (09:28 +0800)]
Prevent the initial frame from showing up in the frame menu
* lisp/menu-bar.el (menu-bar-update-buffers): Ignore initial
frame when generating frame list. (bug#53740)
Stefan Kangas [Wed, 2 Feb 2022 19:56:56 +0000 (20:56 +0100)]
New theme leuven-dark (Bug#53032)
* etc/themes/leuven-dark-theme.el: New file, written by
Fabrice Niessen and Thibault Polge.
Stefan Kangas [Wed, 2 Feb 2022 00:41:13 +0000 (01:41 +0100)]
* test/lisp/cedet/semantic/bovine/gcc-tests.el (ert-x): Require.
Lars Ingebrigtsen [Thu, 3 Feb 2022 00:25:42 +0000 (01:25 +0100)]
Adjust test to adjusted code
Harald Jörg [Wed, 2 Feb 2022 21:30:09 +0000 (22:30 +0100)]
; cperl-mode.el: Detect prototypes in anonymous subroutines
My commit
3d49ad73e5a from 2021-09-143 had a flaw causing bad
fontification and indentation after anonymous subroutines with
a prototype.
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Correctly
process prototypes in anonymous subroutines
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-attrs-and-signatures): new tests for various
combinations of attributes, prototypes, and signatures
* test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl: new
test source
Alan Mackenzie [Wed, 2 Feb 2022 20:35:39 +0000 (20:35 +0000)]
New file lisp/emacs-lisp/debug-early.el for backtraces in early bootstrap
This is also used in batch mode in general.
* lisp/debug-early.el (debug-early-backtrace, debug-early): New functions.
* lisp/loadup.el (top level): Load debug-early.el as first file.
* src/eval.c (signal_or_quit): Remove the condition in the batch mode section
of not being in dumping or bootstrap, since it is no longer needed. Test that
'debug-early's symbol-function is bound. Ensure there is enough working space
in specpdl and eval_depth.
(syms_of_eval): New DEFSYM for Qdebug_early. Initialise Vdebugger to
Qdebug_early rather than Qnil.
Juri Linkov [Wed, 2 Feb 2022 19:50:41 +0000 (21:50 +0200)]
* lisp/replace.el (query-replace-read-from): Use default for empty input.
Set 'default' from non-empty 'query-replace-read-from-default'.
Use the default in non-regexp prompt and return it for empty input.
https://lists.gnu.org/archive/html/emacs-devel/2022-02/msg00044.html
Lars Ingebrigtsen [Wed, 2 Feb 2022 19:16:04 +0000 (20:16 +0100)]
Improve the describe-key doc string
* lisp/help.el (describe-key): Say something about prefix keys
(bug#33320).
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:55:19 +0000 (19:55 +0100)]
Add some indexing for "compiler macro"
* doc/lispref/functions.texi (Inline Functions): Add a link to
where compiler macros are defined.
(Declare Form): Add a concept index.
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:40:48 +0000 (19:40 +0100)]
Mark vt-control and vc100-led obsolete since Emacs 29.1
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:39:29 +0000 (19:39 +0100)]
Move vt-control and vt100-led to obsolete (bug#37562)
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:07:01 +0000 (19:07 +0100)]
Fix decoding error in ietf-drums-parse-address
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Don't try to
decode the name if there is no name (bug#53716).
Alan Mackenzie [Wed, 2 Feb 2022 18:03:00 +0000 (18:03 +0000)]
Fix bug with M-x compile-defun in a defconst/defvar
* lisp/emacs-lisp/bytecomp.el (compile-defun): Have symbols-with-pos-enabled
bound to non-nil when the eval takes place.
Eli Zaretskii [Wed, 2 Feb 2022 17:38:56 +0000 (19:38 +0200)]
Improve documentation of 'emacs-version'
* doc/emacs/trouble.texi (Checklist): Mention the possibility of
invoking 'emacs-version' with a prefix argument.
* lisp/version.el (emacs-version): Improve doc string. (Bug#53720)
Eli Zaretskii [Wed, 2 Feb 2022 17:23:07 +0000 (19:23 +0200)]
; * etc/NEWS: Fix wording of a recently-added entry.
Po Lu [Wed, 2 Feb 2022 11:05:54 +0000 (19:05 +0800)]
Improve correctness of generated xwidget events
* src/xwidget.c (xw_maybe_synthesize_crossing): Add new
parameters for controlling the crossing mode. Also improve the
accuracy of generated crossing events when the mouse pointer
moves outside the toplevel from an inferior of it. All callers
changed.
(xw_notify_virtual_upwards_until):
(xw_notify_virtual_downwards_until): New parameters for crossing
mode. All callers changed.
Po Lu [Wed, 2 Feb 2022 07:33:48 +0000 (15:33 +0800)]
Send button events before setting xwidget passive grab
* src/xwidget.c (xwidget_button_1): Send button event before
any grab processing.
Po Lu [Wed, 2 Feb 2022 07:18:12 +0000 (15:18 +0800)]
* src/nsselect.m (ns_get_foreign_selection): Fix GCC warning.
Po Lu [Wed, 2 Feb 2022 07:17:20 +0000 (15:17 +0800)]
Make behaviour of `mouse-autoselect-window' consistent with X on NS
* src/nsterm.m ([EmacsView mouseMoved:]): Ignore if
`selected_window' is a minibuffer window.