Po Lu [Tue, 28 Dec 2021 02:46:58 +0000 (10:46 +0800)]
Fix menu placement on multiple-display setups when using lwlib
* lwlib/xlwmenu.c (fit_to_screen):
(pop_up_menu): Adjust menu position based on dimensions of the
current monitor's workarea. (bug#52809)
* src/xfns.c (x_get_monitor_attributes): Stop testing for the
RandR extension here.
(xlw_monitor_dimensions_at_pos_1):
(xlw_monitor_dimensions_at_pos): New functions.
* src/xterm.c (x_term_init): Query for the RandR extension when
connecting to a display.
* src/xterm.h (xlw_monitor_dimensions_at_pos): New prototype.
* lisp/uniquify.el (uniquify--rename-buffer-advice)
(uniquify--create-file-buffer-advice): Don't add them as advice any more.
Adjust their calling convention accordingly.
Stefan Kangas [Mon, 27 Dec 2021 01:44:27 +0000 (02:44 +0100)]
admin.el: Move etc/NEWS to etc/NEWS.NN in one commit
This should preserve git history better for git blame, etc.
* admin/admin.el (admin-git-command): New variable.
(set-version): Move etc/NEWS to etc/NEWS.NN and prompt to commit
it immediately. (Bug#52420)
Stefan Kangas [Mon, 27 Dec 2021 19:25:50 +0000 (20:25 +0100)]
read-multiple-choice: Improve key formatting
* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve
formatting of key missing in the description. Use face help-key-name
on terminals that can't display underline.
Po Lu [Mon, 27 Dec 2021 02:02:39 +0000 (10:02 +0800)]
Fix menu window persistence and entry/leave events on Lucid on XI2
* src/xmenu.c (x_activate_menubar): Always clear the XI2 grab on
Xt.
* src/xterm.c (handle_one_xevent): On XI2, ignore LeaveNotify
events coming from the shell widget and use `x_window_to_frame'
to find the frame when handling XI_Leave events.
Po Lu [Mon, 27 Dec 2021 01:16:18 +0000 (09:16 +0800)]
Fix Lucid popup menu being stuck on XI2 builds
* src/xmenu.c (x_activate_menubar): Make some changes
conditional on XI2.
(create_and_show_popup_menu): Clear XI2 grab before showing
popup.
* src/xterm.c (xi_grab_or_ungrab_device): Don't grab device
if popup is activated on Lucid.
Stefan Kangas [Sun, 26 Dec 2021 05:47:15 +0000 (06:47 +0100)]
read-multiple-choice: Display "SPC" instead of " "
* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve display
of the keys TAB, RET, SPC, DEL, and ESC. This fixes a bug where " "
was highlighted in the description in a confusing way.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description)
(test-rmc--add-key-description/with-attributes): Update tests for the
above change.
* lisp/emacs-lisp/rmc.el (rmc--show-help): Factor out new function
from read-multiple-choice.
(read-multiple-choice): Add new optional argument show-help.
* doc/lispref/commands.texi (Reading One Event): Document above new
optional argument.
Stefan Kangas [Sat, 25 Dec 2021 23:45:50 +0000 (00:45 +0100)]
read-multiple-choice: Add face when key not in name string
* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Add face
property also when key is not in the name string.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description/with-attributes)
(test-rmc--add-key-description/non-graphical-display): Update tests.
Po Lu [Sun, 26 Dec 2021 10:13:53 +0000 (18:13 +0800)]
Fix some issues with a recent change
* doc/lispref/commands.texi (Misc Events): Improve documentation
on pinch events.
* etc/NEWS: Update documentation status for some recent changes
and describe pinch events in more detail.
* lisp/face-remap.el (text-scale-pinch): Prevent pinch events
from being received in too quick succession.
Po Lu [Sun, 26 Dec 2021 06:44:53 +0000 (14:44 +0800)]
Add configure tests for faulty XI2 installations
* configure.ac: Detect cases where XI 2.4 headers are installed
without the correct event structures.
* src/xterm.c (handle_one_xevent): Don't use structures that
might not exist unless configure found them.
Po Lu [Sun, 26 Dec 2021 02:36:05 +0000 (10:36 +0800)]
Allow interpolating scrolls via the Page Down and Page Up keys
* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Define
new commands.
(pixel-scroll-precision-interpolate-page): New user option.
(pixel-scroll-interpolate-down):
(pixel-scroll-interpolate-up): New functions.
* doc/misc/modus-themes.org (Overview): Update the description of the
themes.
(Enable and load): Reflow text.
(Customization Options): Update the code sample with all customization
options.
(Option for color-coding success state)
(Option for red-green color deficiency or deuteranopia): Document the
new user option 'modus-themes-deuteranopia'.
(Option for mode line presentation, Option for mode line padding):
Update documentation about mode line padding.
(Option for completion framework aesthetics): Minor rewording.
(Option for diff buffer looks): Update section to exclude the
discontinued "foreground-only" diff styles.
(Option for Org agenda constructs): Expand documentation pertaining to
the 'modus-themes-org-agenda' user option.
(Option for the headings' overall style, Option for scaled headings):
Document how heading scaling is now done directly with the
'modus-themes-headings' user option.
(Option for variable-pitch font in headings): Remove section on
'modus-themes-variable-pitch-headings'. Its functionality is merged
into 'modus-themes-headings'.
(A theme-agnostic hook for theme loading): Add section on how users
can add their own "foreground-only" diff styles.
(Full support for packages or face groups, Indirectly covered
packages): Update list of supported packages.
(Note on god-mode.el): Reflow text.
(Frequently Asked Questions): Remove invalid characters from heading.
(Acknowledgements): Update list of contributors to code, ideas, etc.
* etc/themes/modus-themes.el (modus-themes-operandi-colors)
(modus-themes-vivendi-colors): Update theme color palettes.
(modus-themes-variable-pitch-headings): Make it obsolete. Use
'modus-themes-headings' instead.
(modus-themes--headings-choice): Accept float to adjust heading
height.
(modus-themes-headings, modus-themes-org-agenda): Update doc strings
to cover new features.
(modus-themes-scale-headings, modus-themes-scale-1, modus-themes-scale-2)
(modus-themes-scale-3, modus-themes-scale-4, modus-themes-scale-5)
(modus-themes-scale-title, modus-themes-scale-small): Deprecate them.
Use 'modus-themes-headings' directly.
(modus-themes-org-habit): Remove long-deprecated user option
(modus-themes-mode-line): Update doc string about padding the mode
line.
(modus-themes-mode-line-padding): Deprecate user option. Use
'modus-themes-mode-line' directly.
(modus-themes-diffs): Update doc string to omit discontinued
"foreground-only" styles.
(modus-themes-completions): Remove outdated reference.
(modus-themes-intense-hl-line): Delete long-deprecated form.
(modus-themes-lang-checkers, modus-themes-hl-line)
(modus-themes-paren-match, modus-themes-syntax, modus-themes-links)
(modus-themes-region): Update syntax of code sample in doc string.
(modus-themes-success-deuteranopia): Deprecate it and alias it as
'modus-themes-deuteranopia'.
(modus-themes--variable-pitch, modus-themes--lang-check)
(modus-themes--prompt, modus-themes--paren)
(modus-themes--syntax-foreground, modus-themes--syntax-extra)
(modus-themes--syntax-string, modus-themes--syntax-comment)
(modus-themes--heading, modus-themes--agenda-structure)
(modus-themes--agenda-date, modus-themes--agenda-event)
(modus-themes--agenda-habit, modus-themes--org-block-delim)
(modus-themes--mode-line-padding, modus-themes--mode-line-attrs)
(modus-themes--diff, modus-themes--diff-deuteran)
(modus-themes--success-deuteran, modus-themes--link)
(modus-themes--link-color, modus-themes--scale, modus-themes--region)
(modus-themes--hl-line): Update private functions to parse the updated
user options and to simplify/refine their code.
(modus-themes-faces): Remove some faces, add a few others, and
generally clean up the code to avoid overusing private functions for
the expansion of attributes with user-facing options.
(modus-themes-custom-variables): Remove support for 'highlight-tail'
variable.
Stefan Kangas [Thu, 23 Dec 2021 19:10:16 +0000 (20:10 +0100)]
Respect changes in eshell-hist-match-partial
* lisp/eshell/em-hist.el (eshell-hist--update-keymap): New function.
(eshell-hist-match-partial): Add :set property with above new
function.
(eshell-hist-mode-map): Update for eshell-hist-match-partial using
eshell-hist--update-keymap.
Michael Albinus [Fri, 24 Dec 2021 10:32:34 +0000 (11:32 +0100)]
Add tag :tramp-asynchronous-processes to tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp--test--deftest-direct-async-process)
(tramp-test30-make-process, tramp-test31-interrupt-process)
(tramp-test34-explicit-shell-file-name)
(tramp-test44-asynchronous-requests):
Add :tramp-asynchronous-processes tag.
(tramp--test-asynchronous-processes-p): New defun.
(tramp-test32-shell-command, tramp-test33-environment-variables):
Use it.
(tramp--test-expensive-test-p): Rename from
`tramp--test-expensive-test'. Make it a defun. Adapt all callees.
Changes:
- structure the result of mm-dissect-buffer of application/pkcs7-mime
like a multipart mail so there is no loosing of information of
verification and decryption results which can now be displayed by
gnus-mime-display-security
- adjust gnus-mime-display-part to handle application/pkcs7-mime like
multipart/encrypted or multipart/signed
- add dummy entries to mm-verify-function-alist and
mm-decrypt-function-alist so gnus-mime-display-security correctly
displays "S/MIME" and not "unknown protocol"
- don't just check for multipart/signed in
gnus-insert-mime-security-button but also for the pkcs7-mime mimetypes
to print "Encrypted" or "Signed" accordingly in the security button
- adjust mm-possibly-verify-or-decrypt to check for smime-type to ask
wether to verify or decrypt the part and not to always ask to decrypt
- adjust mm-view-pkcs7-decrypt and verify to call mm-sec-status so
success information can be displayed by gnus-mime-display-security
- adjust gnus-mime-security-verify-or-decrypt to handle pkcs7-mime
right with the done changes
Po Lu [Fri, 24 Dec 2021 06:22:21 +0000 (14:22 +0800)]
Grab the server when warping the client pointer
* src/xfns.c (Fx_set_mouse_absolute_pixel_position):
* src/xterm.c (x_make_frame_invisible): Avoid race conditions
where the client pointer is destroyed between when it is
obtained and when XIWarpPointer is called.
Po Lu [Fri, 24 Dec 2021 03:10:09 +0000 (11:10 +0800)]
Fix menu grabs on XI2 Motif builds
* src/xmenu.c (x_activate_menubar) [USE_MOTIF]: Clear XI grab.
* src/xterm.c (xi_grab_or_ungrab_device) [USE_MOTIF]: Always
ungrab if a popup is active.