Tassilo Horn [Thu, 12 May 2022 21:24:47 +0000 (23:24 +0200)]
Improve cycle-spacing and bind it to M-SPC by default
* lisp/bindings.el (esc-map): Bind M-SPC to cycle-spacing instead of
just-one-space.
* lisp/simple.el (delete-space--internal): New function.
(delete-horizontal-space): Use it.
(delete-all-space): New command.
(just-one-space): Implement on its own instead of calling
cycle-spacing with a special flag.
(cycle-spacing--context): Make it a plist instead of a list. Adapt
docstring accordingly.
(cycle-spacing-actions): New user option.
(cycle-spacing): Rewrite so that it performs the actions in
cycle-spacing-actions instead of the hard-coded ones.
* doc/emacs/killing.texi (characters): Mention and add a variable
index entry for cycle-spacing-actions.
* etc/NEWS: Document that M-SPC is now cycle-spacing instead of
just-one-space.
Po Lu [Mon, 16 May 2022 03:05:32 +0000 (11:05 +0800)]
Improve safety of handling unsupported drop events on X
* src/keyboard.c (kbd_buffer_get_event):
* src/xterm.c (handle_one_xevent): Check that the event frame is
still live after calling arbitrary Lisp code.
Po Lu [Mon, 16 May 2022 01:18:33 +0000 (09:18 +0800)]
Handle pointer axes changing along with scroll valuators
* xterm.c (x_get_scroll_valuator_delta): Set valuator_return to
NULL if no valuator was found.
(handle_one_xevent): Assume pointer axes might've changed if no
scroll valuator was found but valuators were set when handling
motion events.
Augusto Stoffel [Sat, 14 May 2022 15:21:27 +0000 (17:21 +0200)]
Make minibuffer lazy highlight setup buffer-local where appropriate
* lisp/isearch.el (minibuffer-lazy-highlight-setup): Modify hooks
buffer-locally, so that recursive minibuffers are not affected by the
special behavior of lazy-highlight. Also make
'isearch-filter-predicate' buffer-local, so that isearch in the
minibuffer is not affected by the region filter (bug#55110).
* src/print.c (Fprin1): Take an OVERRIDES parameter.
(print_bind_overrides, print_bind_all_defaults): New functions.
(Fprin1_to_string): Take an OVERRIDES parameter.
Michael Albinus [Sun, 15 May 2022 13:09:26 +0000 (15:09 +0200)]
Hide temporary FUSE files in Tramp
* lisp/net/tramp-fuse.el (tramp-fuse-remove-hidden-files): New defsubst.
(tramp-fuse-handle-directory-files)
(tramp-fuse-handle-file-name-all-completions): Use it.
Po Lu [Sun, 15 May 2022 08:33:34 +0000 (08:33 +0000)]
Improve return value of `haiku-roster-launch'
* src/haikuselect.c (Fhaiku_roster_launch): Return
`already-running' if no PID is available since the target
application is already running.
(syms_of_haikuselect): New defsym.
* lisp/language/indian.el ("Syloti Nagri"): New language environment.
Add composition rules for Syloti Nagri. Add sample text and input
method.
Improve composition rules for Kaithi, Tirhuta, Sharada and Siddham.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Syloti Nagri.
* lisp/leim/quail/indian.el ("syloti-nagri"): New input method.
* etc/HELLO: Add two Syloti Nagri greetings.
* etc/NEWS: Announce the new language environment and its
input method.
Visuwesh [Fri, 13 May 2022 07:39:55 +0000 (13:09 +0530)]
describe-keymap: Suggest symbol at point
* lisp/help-fns.el (describe-keymap): Suggest symbol at point
if it is a keymap. (Bug#55393)
* etc/NEWS: Announce change in behavior of 'describe-keymap'.
Po Lu [Sun, 15 May 2022 01:30:07 +0000 (09:30 +0800)]
Prevent crashes trying to access nonexistent key
* src/xsettings.c (xg_settings_key_valid_p): New function.
(apply_gsettings_font_antialias): Test that `font-aliasing' is
actually available. (bug#55416)
Eli Zaretskii [Sat, 14 May 2022 16:08:55 +0000 (19:08 +0300)]
Make 'check-declare-directory' more portable
* lisp/emacs-lisp/check-declare.el (check-declare-directory): Use
'directory-files-recursively' instead of running Find and Grep in
a subprocess. (Bug#55386)
Stefan Kangas [Sat, 14 May 2022 13:47:35 +0000 (15:47 +0200)]
Drop ancient OEmacs support from vcursor.el
* lisp/vcursor.el (vcursor-bind-keys, vcursor-key-bindings)
(vcursor-other-window): Drop OEmacs support. OEmacs was "a
version of GNU Emacs V19.19" that worked "under plain MSDOS,
Windows, or DESQview/X".
Po Lu [Sat, 14 May 2022 13:18:27 +0000 (21:18 +0800)]
Fix processing of dialog box items on NS
* src/nsmenu.m (pop_down_menu): Remove old hack and discard menu
items.
(ns_popup_dialog):
([EmacsDialogPanel initWithContentRect:styleMask:backing:defer:]):
([EmacsDialogPanel windowShouldClose:]):
([EmacsDialogPanel dealloc]):
([EmacsDialogPanel processdialog:]):
([EmacsDialogPanel addButton:value:row:]):
([EmacsDialogPanel addString:row:]):
([EmacsDialogPanel clicked:]):
([EmacsDialogPanel initFromContents:isQuestion:]):
([EmacsDialogPanel timeouthandler:]):
([EmacsDialogPanel runDialogAt:]): Use the regular menu item
machinery to parse dialog items instead of the incorrect ad-hoc
code used previously.
Eli Zaretskii [Sat, 14 May 2022 08:30:54 +0000 (11:30 +0300)]
Fix undigest-tests on MS-Windows
* lisp/emacs-lisp/ert-x.el (ert-with-temp-file): Accept a new
keyword argument :coding CODING to use as the encoding when
writing initial text to the temporary file.
* test/lisp/mail/undigest-tests.el (rmail-undigest-test-rfc934-digest)
(rmail-undigest-test-rfc1153-digest-strict)
(rmail-undigest-test-rfc1153-less-strict-digest)
(rmail-undigest-test-rfc1153-sloppy-digest)
(rmail-undigest-test-rfc1521-mime-digest)
(rmail-undigest-test-multipart-mixed-digest): Force the temporary
mbox files to have Unix-style EOL format.
Po Lu [Sat, 14 May 2022 06:12:39 +0000 (14:12 +0800)]
Try to restore valuator values when a device is enabled
* src/xterm.c (struct xi_known_valuator): New struct.
(xi_populate_device_from_info): Figure out all the values of the
valuators and set the scroll valuators's current_value to it.
Po Lu [Sat, 14 May 2022 05:50:52 +0000 (13:50 +0800)]
Better fix for disappearing menu items on NS
* src/frame.c (delete_frame): Revert last change.
* src/nsmenu.m (free_frame_menubar): Only free if that frame's
menu bar is actually being displayed.
(ns_update_menubar): Note the last frame to have updated the
menu bar.
Po Lu [Sat, 14 May 2022 03:29:43 +0000 (11:29 +0800)]
Implement non-system tooltips on NS
* src/nsfns.m (unwind_create_frame): Return Lisp_Object like on
X.
(do_unwind_create_frame): New function.
(Fx_create_frame): Adjust accordingly.
(compute_tip_xy): Fix coding style.
(unwind_create_tip_frame, ns_create_tip_frame): New functions.
(x_hide_tip, Fx_show_tip, Fx_hide_tip): Create and hide actual
tooltip frames.
(syms_of_nsfns): New defvar `x-max-tooltip-size' and staticpros.
Put help-fns--compiler-macro last in the *Help* buffer
* lisp/help-fns.el (help-fns-describe-function-functions): Make
help-fns--compiler-macro the last entry (because it's not the most
interesting information).
Stefan Kangas [Fri, 13 May 2022 19:30:05 +0000 (21:30 +0200)]
Remove some XEmacs compat code from eudc-bob.el
* lisp/net/eudc-bob.el (eudc-bob-can-display-inline-images): Make
into obsolete alias for display-graphic-p. Update all callers.
(eudc-bob-display-jpeg): Remove XEmacs compat code.
This is mostly factored out from tabulated-list.el (with bugs fixed).
* doc/lispref/modes.texi (Header Lines): Document it.
* lisp/display-line-numbers.el (header-line-indent): New variable.
(header-line-indent--line-number-width)
(header-line-indent--watch-line-number-width)
(header-line-indent--window-scroll-function): New helper functions.
(header-line-indent-mode): New minor mode.
* lisp/display-line-numbers.el (header-line-indent-width): New
variable.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-line-number-width)
(tabulated-list-watch-line-number-width)
(tabulated-list-window-scroll-function): Make into obsolete aliases.
(tabulated-list-mode): Use 'header-line-indent-mode'.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Adjust the header line format and computation.
* lisp/help.el (with-help-window): Don't be a wrapper around
`with-temp-buffer-window', because that made the macro big and
difficult to understand.
(help--window-setup): Implement the relevant bits from
`with-temp-buffer-window'. Also don't clear out local variables,
because that makes things like `text-scale-mode' not work (bug#25979).
Allow substitute-command-keys to include menus in \{...} output
* doc/lispref/help.texi (Keys in Documentation): Document it.
* lisp/help.el (substitute-command-keys): Add an argument to
include menus in the \{...-map} output (bug#24236).
Use gsettings font rendering entries for pgtk builds
If present, apply the gsettings font hinting and antialiasing
entries when creating a font in cairo. Do this at
initialization and when the entries change, re-rendering the
frames.
* src/ftcrfont.c (ftcrfont_open): Use the font_options derived
from gsettings when opening a font.
(ftcrfont_cached_font_ok): Report a cached font as invalid if
its font options differ from the current options inside
gsettings.
* src/xsettings.c (apply_gsettings_font_hinting)
(apply_gsettings_font_alias, apply_gsettings_font_rgba_order):
Convert the settings from GSettings to the cairo_font_options_t
object.
(init_gsettings, something_changed_gsettingsCB): Invoke the
apply functions if the relevant settings changed.
(store_font_options_changed): Store an event to re-render the
fonts.
(xsetting_get_font_options)
* src/xsettings.h (xsettings_get_font_options): New function.
Fix dabbrev expansion after recent file-name buffer addition
* lisp/dabbrev.el (dabbrev--find-expansion): Remove the now-dead
file name buffer from dabbrev--friend-buffer-list, so that we
don't trip over the killed buffer later (bug introduced in 2d0085f756).
Eli Zaretskii [Fri, 13 May 2022 12:00:21 +0000 (15:00 +0300)]
Fix lexical-binding fallout in vhdl-mode.el
* lisp/progmodes/vhdl-mode.el (arch-alist, pack-alist)
(file-alist, unit-alist, rule-alist): Defvar them, since vhdl-aput
expects them to be dynamically bound. (Bug#55389)
(vhdl-speedbar-insert-hierarchy): Rename the PACK-ALIST argument
to PACKAGE-ALIST, to avoid shadowing the global variable.
Po Lu [Fri, 13 May 2022 11:46:43 +0000 (19:46 +0800)]
Allow changing the face used for text and frame colors in tooltips
* etc/NEWS: Announce new arguments to `tooltip-show'.
* lisp/tooltip.el (tooltip-show): Accept new arguments
`text-face' and `frame-face'. Use them to display text and
determine the foreground, background and border colors of the
tooltip frame respectively.
Po Lu [Fri, 13 May 2022 08:32:10 +0000 (16:32 +0800)]
Minor cleanups to PGTK code
* src/pgtkterm.c (pgtk_text_scaling_factor): Rename to
`pgtk_get_text_scaling_factor', clean up coding style, and fix
leak of GSettings object.
(pgtk_term_init): Clean up coding style and fix scroll
increments.