Po Lu [Sat, 12 Feb 2022 04:42:42 +0000 (04:42 +0000)]
Implement visual bell on Haiku like on X
* src/haiku_draw_support.cc
(BView_FillRectangleForVisibleBell): Delete function.
(BView_InvertRect): New function.
* src/haiku_support.cc (class EmacsView): Delete field
`visible_bell_color' and visible bell related methods.
(EmacsView_do_visible_bell): Delete function.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_flash): Implement using
`BView_InvertRect'.
(haiku_beep): Use `haiku_flash' instead.
* doc/lispref/compile.texi (Speed of Byte-Code): More representative
numbers for byte code; the difference is much greater today.
(Compilation Functions, Disassembly): Example output for lexbind
bytecode.
Andrew G Cohen [Fri, 11 Feb 2022 07:09:46 +0000 (15:09 +0800)]
Allow searching of nnselect (search) groups
* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group): Ensure the server is
correctly identified even for nnselect groups.
* lisp/gnus/gnus-search.el (gnus-search-nnselect): New function.
(gnus-search-default-engines): Use it.
(gnus-search-make-spec): Queries from nnselect should always be raw.
* lisp/gnus/nnselect.el (gnus-search): Silence the byte-compiler.
Po Lu [Fri, 11 Feb 2022 05:44:42 +0000 (13:44 +0800)]
Set _NET_WM_OPAQUE_REGION on non-GTK3 toolkits when using 32 bit visual
* src/xfns.c (x_set_alpha_background): Set opaque region if
opaque.
* src/xterm.c (x_update_opaque_region): New parameter
`configure'. All callers changed.
(handle_one_xevent): Call `x_update_opaque_region' on configure
events.
Po Lu [Fri, 11 Feb 2022 02:37:38 +0000 (02:37 +0000)]
Improve reliability of selection ownership on Haiku
* src/haiku_select.cc (count_clipboard, count_primary)
(count_secondary): Initialize to -1
(BClipboard_set_system_data)
(BClipboard_set_primary_selection_data)
(BClipboard_set_secondary_selection_data): Store count before
saving to the the clipboard.
(BClipboard_owns_clipboard, BClipboard_owns_primary)
(BClipboard_owns_secondary): Adjust tests accordingly.
The vfork system call exists and works in macOS 11.6 but the compiler
gives a deprecation message; silence it, because the performance is
still better than that of plain fork. See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2022-02/msg00260.html
* src/conf_post.h (VFORK): New #define.
* src/callproc.c (emacs_spawn):
* src/sysdep.c (sys_subshell): Use it.
Juri Linkov [Thu, 10 Feb 2022 18:52:55 +0000 (20:52 +0200)]
* lisp/tab-line.el (tab-line-format): Use mode-line-window-selected-p.
Recently 'mode-line-window-selected-p' was added to
'tab-line-tab-name-format-default'. Now add the same to another
place that handles the face 'tab-line-tab-current' (bug#53629).
Alan Mackenzie [Thu, 10 Feb 2022 17:03:50 +0000 (17:03 +0000)]
Note current buffer and restore it in c-force-redisplay.
This fixes bug #52709.
* lisp/progmodes/cc-fonts.el (c-force-redisplay): New parameter BUFFER. Set
current buffer to this before fontifying.
(c-fontify-new-found-type): Give the current buffer as argument to
run-with-timer.
Michael Albinus [Thu, 10 Feb 2022 13:14:06 +0000 (14:14 +0100)]
Improve handling of file modes in Tramp
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-get-remote-uid)
(tramp-gvfs-handle-get-remote-gid): Do not assume that the default
location is owned be the remote uid/gid.
(tramp-gvfs-handle-file-executable-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for setuid/setgid bit.
* lisp/net/tramp.el (tramp-check-cached-permissions): Check also
for ?s access type. Check whether remote uid/gid are unknown.
Po Lu [Thu, 10 Feb 2022 10:43:08 +0000 (18:43 +0800)]
Correctly allocate colors in xftfont
* src/xftfont.c (struct xftface_info): New fields
`bg_allocated_p' and `fg_allocated_p'.
(xftfont_get_colors): Actually allocate colors and tell the
caller whether colors were allocated.
(xftfont_prepare_face): Set allocated fields.
(xftfont_done_face):
(xftfont_draw): Free colors that were allocated.
Dima Kogan [Thu, 10 Feb 2022 07:01:24 +0000 (08:01 +0100)]
Make comint-word actually check comint-file-name-quote-list
* lisp/comint.el (comint-word): We were checking for
comint-file-name-quote-list existing, but not actually comparing
to the characters in that list. This patch actually checks the
contents of comint-file-name-quote-list (bug#53911).
Eli Zaretskii [Thu, 10 Feb 2022 08:34:29 +0000 (10:34 +0200)]
Allow customization of the user's eln-cache directory
* lisp/startup.el (startup-redirect-eln-cache)
(startup--update-eln-cache): New functions.
(startup--original-eln-load-path): New defvar.
(normal-top-level): Record the original value of
'native-comp-eln-load-path' in 'startup--original-eln-load-path'.
Do not amend 'native-comp-eln-load-path' here, as that could
overwrite user customizations.
(command-line): Amend 'native-comp-eln-load-path' after loading
the early-init file, and then again after loading the user init
file. (Bug#53891)
Po Lu [Thu, 10 Feb 2022 05:36:24 +0000 (13:36 +0800)]
Fix disconnect errors on some X servers
* src/xfns.c (x_make_gc): Don't set FillOpaqueStippled on cursor
GC. The reason is that some X servers break on such a fill
style if the operation being performed is not a stiple
operation.
Po Lu [Thu, 10 Feb 2022 02:21:15 +0000 (10:21 +0800)]
Improve reliability of hotplugging window managers
* src/xterm.c (x_make_frame_visible): Change the user time
window if the window manager supports something different from
what it did the first time the frame was made visible.
Update show-paren--last-pos also in the "not at paren position" case.
Otherwise, we don't get the context info when moving point from a
paren position to a non-paren position and back again.
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-range-for-arithm):
When one of the two sources is negated revert to set dst as
number.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add test to
verify this is effective.
Po Lu [Wed, 9 Feb 2022 10:47:07 +0000 (18:47 +0800)]
Add support for _NET_WM_USER_TIME_WINDOW
* src/xterm.c (x_make_frame_visible):
(x_display_set_last_user_time): Use and set user time window if
the WM supports it.
(x_term_init): Intern new atom.
* src/xterm.h (struct x_display_info): New atom
`_NET_WM_USER_TIME_WINDOW'.
(struct x_output): New field `user_time_window'.
Po Lu [Wed, 9 Feb 2022 08:07:59 +0000 (16:07 +0800)]
Implement _NET_WM_USER_TIME protocol
* src/xterm.c (x_display_set_last_user_time): Set user time on
the active window.
(handle_one_xevent): Only set user time when the user actually
interacted with Emacs.
(x_make_frame_visible): Set user time if non-zero.
(x_term_init): Intern `_NET_WM_USER_TIME'.
* src/xterm.h (struct x_display_info): New field
`Xatom_net_wm_user_time'.
(x_display_set_last_user_time): Implement in xterm.c instead.
Po Lu [Wed, 9 Feb 2022 03:26:47 +0000 (11:26 +0800)]
Improve selection of fonts available from `mouse-set-font'
People get confused on a build without font dialogs (such as a
Lucid build) if `menu-set-font' and `mouse-set-font' don't
present them a list of the fonts actually available on their
system.
* lisp/mouse.el (mouse-generate-font-name-for-menu)
(mouse-generate-font-menu): New functions.
(mouse-select-font): Allow the user to select from all fonts
available on the system.
(mouse-set-font): Use `mouse-select-font' to display font menu.
Tassilo Horn [Tue, 8 Feb 2022 20:54:56 +0000 (21:54 +0100)]
Allow showing show-paren context in an overlay
* lisp/paren.el (show-paren-context-when-offscreen): Add new
possibility `overlay'.
(show-paren--context-overlay): New defvar.
(show-paren--delete-context-overlay): New function.
(show-paren--show-context-in-overlay): New function.
(show-paren-function): Handle the new `overlay' case.
* lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p):
There's no interference if `show-paren-context-when-offscreen' is
overlay or child-frame.
Robert Pluim [Tue, 1 Feb 2022 11:01:14 +0000 (12:01 +0100)]
Improve make-frame-on-display initial values
* doc/emacs/frames.texi (Multiple Displays): Add index entry for
'display server'.
* lisp/frame.el (make-frame-on-display): Specify sensible initial
values when reading display name.
* lisp/menu-bar.el (menu-bar-file-menu): Use 'display server' rather
than 'display' to avoid monitor<->display confusion.
Po Lu [Tue, 8 Feb 2022 12:20:47 +0000 (12:20 +0000)]
Improve robustness of override-redirect on Haiku
* src/haiku_support.cc (class EmacsWindow): New field
`override_redirect_p'.
(BWindow_change_decoration, BWindow_set_override_redirect): Set
and restore from the saved pre-override redirect state fields if
appropriate.
Po Lu [Tue, 8 Feb 2022 06:17:23 +0000 (14:17 +0800)]
Clear mouse highlight when mouse moves outside edit widget
* src/xterm.c (handle_one_xevent): Clear mouse highlight when
leaving the edit widget. Otherwise, it stays around on the
toolbar after the mouse is moved onto the menu bar.
Andrew G Cohen [Tue, 8 Feb 2022 06:05:02 +0000 (14:05 +0800)]
nnselect.el: Speed up group info updating
* lisp/gnus/nnselect.el (nnselect-request-update-info): Use a hash and
other tricks to speed things up.
(nnselect-request-group-scan): Make sure the artlist is uncompressed.