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.
Eric Abrahamsen [Tue, 25 Jan 2022 00:24:10 +0000 (16:24 -0800)]
Don't remove dummy.group from gnus-newsrc-alist on Gnus save
bug#53352
* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): This
function was removing dummy.group from the global value of
`gnus-newsrc-alist' on save; we only wanted to remove it temporarily.
Po Lu [Mon, 7 Feb 2022 08:22:06 +0000 (16:22 +0800)]
Make menus work better on X toolkit builds with XInput 2
* src/xmenu.c (popup_get_selection): Translate some important
XI2 events into events the toolkit can understand.
(x_activate_menubar):
(create_and_show_popup_menu): Clear grab regardless of reported
status on Motif.
* src/xterm.c (xi_device_from_id): Export function.
* src/xterm.h: Update prototypes.
Make the eintr.html target match what's on the web
* doc/lispintro/Makefile.in (HTML_TARGETS, eintr.html): Make the
name match the URL at
https://www.gnu.org/software/emacs/manual/eintr.html (bug#38817).
* lisp/vc/ediff-diff.el (ediff-diff-options):
* doc/misc/ediff.texi (Patch and Diff Programs): Note that setting
this variable directly is probably the wrong thing to do (bug#6512).
Make async connect_network_socket failures use Qfailed
* src/process.c (connect_network_socket): Mark the process as
Qfailed instead of using the error symbol (since this is what's
defined for the status) (bug#53814).
Juri Linkov [Sun, 6 Feb 2022 17:58:43 +0000 (19:58 +0200)]
Use mode-line-window-selected-p in tab-line-tab-name-format-default.
* lisp/tab-line.el (tab-line-tab-name-format-default):
Use the recently added function 'mode-line-window-selected-p'
for the face 'tab-line-tab-current' (bug#53629).
(tab-bar-new-tab-to): Remove window parameters 'window-side' and
'window-atom' from the old window. Move split-window/delete-window
inside ignore-window-parameters (bug#53662).
* src/macfont.m (mac_font_create_preferred_family_for_attributes):
CTGetCoreTextVersion is obsolete and its use elicits a warning
in macOS 11.6; use NSProcessInfo instead.
Po Lu [Sun, 6 Feb 2022 11:51:05 +0000 (19:51 +0800)]
Disable extended frame synchronization by default
* doc/emacs/xresources.texi (Table of Resources): Document
new possible value of `synchronizeResize'.
* src/xfns.c (Fx_create_frame): Set synchronization protocol
according to `synchronizeResize'.
Po Lu [Sun, 6 Feb 2022 10:53:22 +0000 (18:53 +0800)]
Add support for EWMH extended frame synchronization
* src/xfns.c (Fx_create_frame): Populate both counter variables.
* src/xterm.c (XTframe_up_to_date):
(handle_one_xevent): Support extended synchronization.
(x_free_frame_resources): Destroy extended counter.
(x_term_init): Intern new atom _NET_WM_FRAME_DRAWN.
* src/xterm.h (struct x_display_info): New atom
`_NET_WM_FRAME_DRAWN'.
(struct x_output): New fields for extended counter tracking.
(FRAME_X_EXTENDED_COUNTER): New macro.
Eli Zaretskii [Sun, 6 Feb 2022 10:26:36 +0000 (12:26 +0200)]
Fix infloop in 'redisplay_window' when buffer is narrowed
* src/xdisp.c (redisplay_window): Ensure window-start point is in
the accessible portion of the buffer when passing it to
'window_start_acceptable_p'. (Bug#14582)
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.
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.
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).
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.
* 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>.
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.