* lisp/language/philippine.el ("Tagalog"): New language environment.
Add composition rules for Tagalog. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Tagalog.
* lisp/leim/quail/philippine.el ("tagalog"): New input method.
* lisp/loadup.el: Preload lisp/language/philippine.el.
* etc/HELLO: Add a Tagalog greeting.
* etc/NEWS: Announce the new language environment and its
input method.
(Bug#55529)
Po Lu [Sun, 22 May 2022 03:02:24 +0000 (11:02 +0800)]
Fix compiler warnings on Mac OS X 10.12
* configure.ac: Check for Mac OS X 12 and link with
UniformTypeIdentifiers.framework.
* src/nsfns.m (IOMasterPort): Define to `IOMainPort' on Mac OS X
12.
(ns_implicitly_set_icon_type, Fns_read_file_name):
* src/nsxwidget.m: ([XwWebView
initWithFrame:configuration:xwidget:]): Fix uses of obsolete
things.
Po Lu [Sun, 22 May 2022 01:27:46 +0000 (09:27 +0800)]
Don't unnecessarily call monitor change functions
* src/xterm.c (handle_one_xevent): If monitor attributes didn't
change, don't send monitor change event.
(x_term_init, mark_xterm): Mark and init new field.
* src/xterm.h (struct x_display_info): New field
`last_monitor_attributes_list'.
Eli Zaretskii [Sat, 21 May 2022 13:55:15 +0000 (16:55 +0300)]
; Rename enable-theme and disable-theme hooks
* lisp/custom.el (enable-theme-functions)
(disable-theme-functions): Rename from enable-theme-hook and
disable-theme-hook. All users changed. (Bug#37802)
Michael Albinus [Sat, 21 May 2022 13:44:22 +0000 (15:44 +0200)]
Some cleanups in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare.
(tramp-test16-directory-files)
(tramp-test16-file-expand-wildcards)
(tramp-test26-file-name-completion, tramp--test-check-files): Use it.
(tramp--test-check-files): Delete directory recursively.
(tramp-test43-file-system-info): Make test more robust.
Tino Calancha [Sat, 21 May 2022 09:23:17 +0000 (11:23 +0200)]
zap-to-char: case sensitive for upper-case characters
In interactive calls, behave case-sensitively if the given char
is an upper-case character. Same for zap-up-to-char (Bug#54804).
This is analog to what the user-level incremental search feature does.
* lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE.
Perform a case-sensitive search when INTERACTIVE is non-nil and
CHAR is an upper-case character.
* lisp/simple.el (zap-to-char): Same.
* etc/NEWS (Editing Changes in Emacs 29.1): Announce this change.
* test/lisp/misc-tests.el (misc-test-zap-up-to-char): Add test cases.
* test/lisp/simple-tests.el (with-zap-to-char-test): Add helper macro.
(simple-tests-zap-to-char): Add a test.
Po Lu [Sat, 21 May 2022 06:46:57 +0000 (14:46 +0800)]
Fix compiler warnings in printer code on 32-bit systems
* print.c (enum print_entry_type, struct print_stack_entry):
Clean up coding style.
(struct print_stack): Make print_stack_entry.list.idx intmax_t,
like it was before the nonrecursive printing was installed.
Also clarify what "Brent cycle detection" means in the comments.
Po Lu [Sat, 21 May 2022 06:28:06 +0000 (06:28 +0000)]
Compute frame workareas on Haiku
* lisp/frame.el (display-monitor-attributes-list): Implement
specially on Haiku as well.
* src/haiku_support.cc (get_zoom_rect): New function. Extract
CalculateZoomRect here.
(class EmacsWindow, SetFullscreen): Use that instead of
CalculateZoomRect.
(be_get_explicit_workarea): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (Fhaiku_display_monitor_attributes_list): New
function.
(syms_of_haikufns): Register new subr.
Po Lu [Sat, 21 May 2022 03:29:22 +0000 (11:29 +0800)]
Implement `display-monitors-changed-hook' on PGTK
* src/pgtkterm.c (pgtk_draw_glyphless_glyph_string_foreground):
Pacify GCC 12.
(pgtk_monitors_changed_cb): New function.
(pgtk_term_init): Attach new signal handler.
Add new user option display-buffer-avoid-small-windows
* doc/lispref/windows.texi (Choosing Window Options): Document it.
* lisp/window.el (display-buffer-avoid-small-windows): New user
option (bug#10186).
(get-lru-window): Use it.
Po Lu [Fri, 20 May 2022 05:34:04 +0000 (05:34 +0000)]
Remove flickering when toggling between different fullscreen states on Haiku
* src/haiku_support.cc (FrameMoved): Don't allow moving the
frame along the "filled" axis when fullwidth or fullheight.
(ClearFullscreen): New argument `mode'. Return the previous
rect but don't revert the frame to it if the target mode is not
NONE.
(SetFullscreen): Use rect provided by ClearFullscreen instead.
Po Lu [Fri, 20 May 2022 03:21:47 +0000 (11:21 +0800)]
Minor cleanups to X drag-and-drop code
* src/xterm.c (struct x_client_list_window): Write comments
describing the meaning of each field.
(XM_DRAG_PROTOCOL_VERSION, xm_setup_dnd_targets)
(xm_setup_drag_info, xm_read_drag_receiver_info)
(x_dnd_compute_toplevels): Don't hard-code the supported Motif
protocol version.
* lisp/emacs-lisp/lisp-mode.el (lisp--el-funcall-position-p):
Don't colorize the `function' in (defun foo (function ...)) as a
special form (bug#37074).
Make completion in emacs-lisp-mode intern fewer symbols
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Don't
intern the string before point just to check whether we're looking
at `ignore-error' (bug#55491).
Due to "The Orissa (Alteration of Name) Act, 2011"
(https://legislative.gov.in/sites/default/files/A2011-15.pdf)
Oriya has been renamed to Odia.
* lisp/language/indian.el (set-language-info-alist): Rename
Oriya to Odia. Improve Oriya composition rules.
* lisp/leim/quail/indian.el ("odia"): New input method.
* lisp/erc/erc-lang.el: Obsolete the iso-638-languages variable
(which was a typo) and replace it with iso-639-1-languages.
* etc/HELLO: Rename Oriya to Odia.
Replace the old Odia greeting with the new one.
Add a Hindi greeting separate from the Devanagari one.
(Bug#55493)
Po Lu [Thu, 19 May 2022 12:10:19 +0000 (20:10 +0800)]
Whitelist some incorrectly labeled "color" fonts under Xft
* etc/PROBLEMS: Document problem with fonts incorrectly labeled
as color fonts under Xft.
* src/ftfont.c (xft_color_font_whitelisted_p): New function.
(ftfont_spec_pattern, ftfont_list): Respect whitelisting of
"color" fonts under Xft.
* src/xftfont.c (syms_of_xftfont): New variable
`xft-color-font-whitelist'.
Eli Zaretskii [Thu, 19 May 2022 08:00:36 +0000 (11:00 +0300)]
Fix Flymake diagnostics reporting in non-UTF-8 locales
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile)
(elisp-flymake--batch-compile-for-flymake): Bind I/O encoding to
UTF-8, instead of relying on the locale's defaults. This is
needed because ELisp files use UTF-8 by default, but Flymake
doesn't know about that, since it isn't specific to ELisp.
* src/haikufns.c (Fx_display_pixel_height): Return height
instead of width.
* src/haikuterm.c (haiku_make_fullscreen_consistent)
(haiku_read_socket, haiku_fullscreen): Adjust to always set zoom
and fullscreen in the main thread instead of the UI threads.
* src/haikuterm.h (struct haiku_output): Remove flag `zoomed_p'
and add field `fullscreen_mode'.
Po Lu [Thu, 19 May 2022 01:30:33 +0000 (09:30 +0800)]
Respond to changes to the size of the root window
* src/xterm.c (x_display_pixel_height, x_display_pixel_width):
Move here instead.
(handle_one_xevent): Handle ConfigureNotify for the root window.
(x_term_init): Select for structure events on the root window.
* src/xterm.h (struct x_display_info): New fields `screen_width'
and `screen_height'.
(x_display_pixel_height, x_display_pixel_width): Make
prototypes.
Stefan Kangas [Wed, 18 May 2022 23:41:44 +0000 (01:41 +0200)]
Delete entry on SPC completes file names from FAQ
* doc/misc/efaq.texi (SPC no longer completes file names): Delete
node: this is about a change that took place over 15 years ago and is
not likely to be a FAQ these days.
Po Lu [Wed, 18 May 2022 12:36:50 +0000 (12:36 +0000)]
Implement gamma-correction on Haiku
* src/dispextern.h: Add `gamma_correct' prototype on Haiku as
well.
* src/haikufns.c (gamma_correct): New function.
* src/haikuterm.c (haiku_defined_color): Gamma-correct colors if
their pixels are being allocated.
Alan Mackenzie [Wed, 18 May 2022 09:18:15 +0000 (09:18 +0000)]
Fix M-x compile-defun when an interactive form is (list ...)
This is for when lexical-binding is nil. The problem fixed was M-x
compile-defun leaving symbols with position in the compiled function's arglist
and interactive form. This fixes bug #55323. Also ensure the doc string is
correctly stripped when lexical-binding is t.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): For a (list ...)
interactive form when lexical-binding is nil, strip the positions from the
symbols in the form. Also strip the position from the symbols in the arglist.
(byte-compile-make-closure): (Twice) strip symbols from positions in the doc
string expression. Add comments.
Martin Rudalics [Wed, 18 May 2022 09:09:58 +0000 (11:09 +0200)]
Clean up and simplify 'quit-restore-window' code
* lisp/window.el (window--quit-restore-select-window): New internal
name for 'quit-restore-select-window'.
(quit-restore-window): Use 'window--quit-restore-select-window'
instead of 'quit-restore-select-window'. Simplify code.
Introduce explicit stacks for traversing common data types during
printing: conses, vectors, records, byte-code, hash-tables and
char-tables, all previously traversed using recursion in C. This
greatly reduces the risk of crashing Emacs from C stack overflow
when printing deeply nested data.
* src/print.c (Fprinc, print, PRINT_CIRCLE_CANDIDATE_P):
Special-case Fprinc with a plain string argument to eliminate the need
for keeping track of print_depth during the preprocessing phase.
This also improves performance.
(struct print_pp_entry, struct print_pp_stack, ppstack)
(grow_pp_stack, pp_stack_push_value, pp_stack_push_values)
(pp_stack_empty_p, pp_stack_pop):
New stack for preprocessing.
(print_preprocess):
Make mostly nonrecursive, except for string properties.
(enum print_entry_type, struct print_stack_entry)
(struct print_stack, prstack, grow_print_stack)
(print_stack_push, print_stack_push_vector):
New stack for printing.
(print_vectorlike, print_object):
Make mostly nonrecursive, except for string properties and some less
heavily used types.
* test/src/print-tests.el (print-deeply-nested):
New test.
* 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.