* lisp/language/indian.el ("Modi"): New language environment.
Add composition rules for Modi. Add sample text and input
method.
Add sample text to various scripts.
Rename Punjabi to Gurmukhi.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Modi.
* lisp/leim/quail/indian.el ("modi"): New input method.
(Bug#55439)
* etc/HELLO: Add a Modi greeting.
Rename Hindi to Devanagari.
Add a Gurmukhi greeting.
Replace Odia greeting.
* etc/NEWS: Announce the new language environment and its
input method.
Alan Mackenzie [Tue, 17 May 2022 11:26:05 +0000 (11:26 +0000)]
CC Mode: Correct a rare error in the state cache
* lisp/progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache): Do
not record a position in a macro as the starting position in
c-state-brace-pair-desert. Instead record the position at the beginning of
that macro.
Alan Mackenzie [Tue, 17 May 2022 10:30:05 +0000 (10:30 +0000)]
Correct indentation of opening brace in xdisp.c, which isn't at start of defun
* xdisp.c (calc_pixel_width_or_height): indent the opening brace of a
substatement correctly. It's previous position, in column 0, caused
indentation errors in C Mode.
Po Lu [Tue, 17 May 2022 09:40:57 +0000 (09:40 +0000)]
Rewrite Haiku frame geometry code to handle decorator frames
* doc/lispref/frames.texi (Frame Layout): Document changes to
Haiku frame layout.
* src/haiku_support.cc (class EmacsWindow, MoveToIncludingFrame)
(EmacsMoveTo, MakeFullscreen): Move to an offset including the
decorator frames.
(be_get_window_decorator_dimensions):
(be_get_window_decorator_frame): New functions.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_update_after_decoration_change): New
function.
(haiku_create_frame, haiku_set_undecorated)
(haiku_set_override_redirect): Call that function.
(frame_geometry): Actually calculate frame geometry based on
decorator and frame sizes.
* src/haikuterm.c (haiku_coords_from_parent): Use frame width
instead.
(haiku_read_socket): Set left and top positions based on
decorator width and height.
* src/haikuterm.h (struct haiku_output): New field `frame_x' and
`frame_y'.
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Work
around syntax-ppss now clobbering match data (but it's not clear
whether that's supposed to be allowed) (bug#55447).
Po Lu [Tue, 17 May 2022 03:11:23 +0000 (03:11 +0000)]
Remove extra EmacsPopUpMenu class
* src/haiku_support.cc (class EmacsPopUpMenu): Delete class that
does nothing.
(BPopUpMenu_new): Use BPopUpMenu directly.
(BMenu_add_title): Clean up coding style.
* doc/emacs/building.texi (Compilation Mode): Document it.
* lisp/progmodes/compile.el (compilation-hidden-output): New user
option.
(compilation-filter): Use it.
(compilation--hide-output): New function.
* src/print.c: Don't expose Vprint_variable_mapping to the Lisp
world, because it really should be immutable.
(print_create_variable_mapping): Initialization moved here from
syms_of_print.
(print_bind_overrides): Call it.
(syms_of_print): Protect the mapping variable.
This patch was mostly written by mailj2@protonmail.com, but was then
rewritten by me, and has some contributions from Xavier Capaldi (which
doesn't need copyright assignment).
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.