Po Lu [Wed, 11 May 2022 08:01:32 +0000 (16:01 +0800)]
Fix mouse pointer avoidance in some configurations
* lisp/avoid.el (mouse-avoidance-random-shape): Ignore invisible
pointer.
(mouse-avoidance-ignore-p): Adjust for interprogram DND.
* lisp/term/x-win.el (x-pointer-invisible): Make value larger
than the maximum possible glyph.
* src/xfns.c (x_set_mouse_color): Use function that handles
`x-pointer-invisible' too.
* src/xterm.c (x_create_font_cursor): New function. Handle
invisible cursors.
* src/xterm.h: Update prototypes.
Juri Linkov [Wed, 11 May 2022 07:50:12 +0000 (10:50 +0300)]
* lisp/textmodes/string-edit.el: Improvements for pop-to-buffer (bug#33007)
* lisp/textmodes/string-edit.el (string-edit): Use pop-to-buffer
with fit-window-to-buffer after the buffer is filled with text.
(string-edit-done, string-edit-abort): Use (quit-window 'kill).
Po Lu [Wed, 11 May 2022 02:02:21 +0000 (02:02 +0000)]
Try to preserve font styles in the Haiku font dialog
* haiku_support.cc (class EmacsFontSelectionDialog)
(UpdateStylesForIndex): If a style was previously selected and
exists in the new family as well, select it after adding the new
items.
Alexander Adolf [Mon, 2 May 2022 21:01:11 +0000 (23:01 +0200)]
EUDC: Add completion-at-point support
* lisp/net/eudc-capf.el: New file.
* lisp/gnus/message.el (message-mode): Add `eudc-capf-complete' to
`completion-at-point-functions' when a `message-mode' buffer is
created.
* doc/misc/eudc.texi (Inline Query Expansion): Add a new subsection,
describing the new `completion-at-point' mechanism in `message-mode'.
* etc/NEWS (EUDC): Describe the new `completion-at-point' method.
* lisp/language/indian.el ("Siddham"): New language environment.
Add composition rules for Siddham. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Siddham.
* lisp/leim/quail/indian.el ("siddham"): New input method.
* etc/HELLO: Add a Siddham greeting.
* etc/NEWS: Announce the new language environment and its
input method. (Bug#55350)
Use fields on log-edit headers (which changes `C-a' behaviour)
* lisp/vc/log-edit.el (log-edit-insert-message-template): Fieldify
headers so that `C-a' takes us to the start of the string, not the
line (bug#15645).
Make ispell-region/buffer push the mark of the final word
* lisp/textmodes/ispell.el (ispell-region): Push the mark of the
final location.
(ispell-process-line): Change the return value to include the
position of the final word.
Allow packages to alter menu entries in the Buffers menu
* lisp/menu-bar.el (menu-bar-update-buffers): Use it.
(menu-bar-buffers-menu-command-entries): Put the entries into the
defvar so that packages can modify it (bug#14244).
Po Lu [Tue, 10 May 2022 09:00:39 +0000 (09:00 +0000)]
Improve relief rect handling on Haiku
* haikuterm.c (haiku_calculate_relief_colors): Calculate
backgrounds for image glyphs like on X.
(haiku_draw_relief_rect): Remove extra parameter.
(haiku_draw_string_box, haiku_draw_image_relief): Adjust
accordingly.
Po Lu [Tue, 10 May 2022 04:11:32 +0000 (04:11 +0000)]
Simplify Haiku selection code
* src/haiku_select.cc (get_clipboard_object): New function.
(BClipboard_find_data, BClipboard_get_targets, BClipboard_set_data)
(BClipboard_find_system_data)
(BClipboard_find_primary_selection_data)
(BClipboard_find_secondary_selection_data)
(BClipboard_set_system_data, BClipboard_set_primary_selection_data)
(BClipboard_set_secondary_selection_data, BClipboard_free_data)
(BClipboard_system_targets, BClipboard_primary_targets)
(BClipboard_secondary_targets): Delete functions.
(be_find_clipboard_data_1, be_set_clipboard_data_1)
(be_get_clipboard_targets_1, be_find_clipboard_data)
(be_set_clipboard_data, be_get_clipboard_targets): New
functions.
(be_lock_clipboard_message, be_unlock_clipboard): Use
`get_clipboard_object' to get clipboard from ID.
* src/haikuselect.c (haiku_get_clipboard_name): New function.
(Fhaiku_selection_data, Fhaiku_selection_put)
(Fhaiku_selection_owner_p): Adjust to use new simplified
functions.
Add more compilation-auto-jump-to-first-error options
* doc/emacs/building.texi (Compilation Mode): Document it.
* lisp/progmodes/compile.el
(compilation-auto-jump-to-first-error): Extend type.
(compilation--file-known-p): New function.
(compilation-auto-jump): Use it to support the new values
(bug#8228).
(compilation-find-file-1): Factored out into own function.
(compilation-find-file): Factored out from here.
Sean Whitton [Thu, 5 May 2022 20:03:06 +0000 (13:03 -0700)]
Factor out *scratch* initialization
* lisp/simple.el (get-scratch-buffer-create): New function, factored
out of scratch-buffer, and additionally clearing the modification flag
and calling substitute-command-keys (bug#55257).
(scratch-buffer):
* lisp/server.el (server-execute):
* lisp/startup.el (normal-no-mouse-startup-screen, command-line-1):
* lisp/window.el (last-buffer, window-normalize-buffer-to-switch-to):
* src/buffer.c (Fother_buffer, other_buffer_safely): Use it.
(syms_of_buffer): Add Qget_scratch_buffer_create.
* lisp/startup.el (startup--get-buffer-create-scratch): Delete
now-unused function.
* doc/lispref/os.texi (Summary: Sequence of Actions at Startup):
* NEWS (Incompatible changes in Emacs 29.1): Document the change.
* doc/lispref/buffers.texi (Buffer Modification): Document
buffer-modified-p returning `autosaved'.
* lisp/subr.el (with-silent-modifications): Use
restore-buffer-modified-p instead of altering the buffer modiff
(since this has other side effects like not updating after async
`display' changes.
* src/buffer.c (Fbuffer_modified_p): Allow returning whether the
buffer has been autosaved after changes.
(Frestore_buffer_modified_p): Allow adjusting whether the buffer
has been autosaved after changes.
* src/fileio.c (Fdo_auto_save): Refill the doc string.
Andrea Corallo [Mon, 9 May 2022 13:53:45 +0000 (15:53 +0200)]
Fix syntax descriptor comparison in python-indent-region
* lisp/progmodes/python.el (python-indent-region): Compare raw
syntax descriptors with equal (bug#45328) (because comparing them with
eq will always be false).
Po Lu [Tue, 10 May 2022 01:32:59 +0000 (09:32 +0800)]
Update alpha frame parameter when the window manager changes it
* src/xfns.c (x_set_alpha): New function. Set
`alpha_identical_p' flag.
(x_frame_parm_handlers): Use it to handle `alpha' instead.
* src/xterm.c (x_set_frame_alpha): Make tests against current
alpha safer.
(handle_one_xevent): Set frame alpha when alpha property
changes.
* src/xterm.h (struct x_output): New flag `alpha_identical_p'.
* lisp/language/indian.el ("Sharada"): New language environment.
Add composition rules for Sharada. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Sharada.
* lisp/leim/quail/indian.el ("sharada"): New input method.
* etc/HELLO: Add a Sharada greeting.
* etc/NEWS: Announce the new language environment and its
input method. (Bug#55328)
Po Lu [Mon, 9 May 2022 12:15:41 +0000 (20:15 +0800)]
Fix scroll optimizations being enabled for some rows with stipples
* src/dispnew.c (update_text_area): New parameter `partial_p'.
Set it if not enough glyphs were drawn to determine if a row
doesn't have a stipple.
(update_window_line): Preserve current_row->stipple_p in that
case, after making the desired row current.
* src/xterm.c (x_draw_fringe_bitmap): Set row->stipple.
Po Lu [Mon, 9 May 2022 07:54:54 +0000 (07:54 +0000)]
Use default external browser by default on Haiku
* lisp/net/browse-url.el (browse-url-default-browser): Use that
by default on Haiku.
(browse-url-default-haiku-browser): New function.
* src/haiku_support.cc (be_roster_launch):
* src/haiku_support.h: New function. Update prototypes.
* src/haikuselect.c (haiku_message_to_lisp): Encode and decode
files correctly.
(haiku_lisp_to_message): Encode and decode files correctly.
(Fhaiku_roster_launch): New function.
(syms_of_haikuselect): Update defsubrs.
Po Lu [Mon, 9 May 2022 01:37:58 +0000 (09:37 +0800)]
Allow precision-scrolling nonselected windows when the minibuffer is resized
* doc/lispref/windows.texi (Vertical Scrolling): Document new
`preserve-vscroll-p' parameter of `set-window-vscroll'.
* etc/NEWS: Announce new parameter.
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down-page)
(pixel-scroll-precision-scroll-up-page): Use that parameter when
setting the vscroll.
* src/window.c (window_scroll_pixel_based, Fset_window_vscroll):
Adjust for new parameter.
* src/window.h (struct window): New flag `preserve_vscroll_p'.
* src/xdisp.c (redisplay_window): Preserve the vscroll inside
force_start on frozen windows with that flag set. (bug#55312)
* src/termhooks.h (enum event_kind): Document meaning of
`modifiers' in UNSUPPORTED_DROP_EVENTs.
* src/xterm.c (x_dnd_send_unsupported_drop): Set event modifiers
to current level.
(x_toggle_visible_pointer): Fix fixes fallback.
(x_dnd_begin_drag_and_drop): Handle UNSUPPORTED_DROP_EVENTs
already in the keyboard buffer before starting DND.
(syms_of_xterm): Give timestamp to unsupported drop function.
Sean Whitton [Sun, 8 May 2022 20:45:35 +0000 (13:45 -0700)]
remember-notes: Use pop-to-buffer-same-window not switch-to-buffer
* lisp/textmodes/remember.el (remember-notes): Use
pop-to-buffer-same-window rather than switch-to-buffer, to allow
customization via display-buffer-alist.
* etc/tutorials/TUTORIAL.el_GR: Add tutorial in Greek. It is a
faithful translation of the TUTORIAL.
* etc/tutorials/TUTORIAL.translators (Author): Mention myself as
the author and the maintainer.
* etc/NEWS: Announce it. (Bug#55314)
* lisp/language/greek.el (set-language-info-alist): Link to the
tutorial and include sample text.
* lisp/language/indian.el ("Tirhuta"): New language environment.
Add composition rules for Tirhuta. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Tirhuta.
* lisp/leim/quail/indian.el ("tirhuta"): New input method.
* etc/HELLO: Add a Tirhuta greeting.
* etc/NEWS: Announce the new language environment and its
input method.
Alan Mackenzie [Sun, 8 May 2022 13:14:14 +0000 (13:14 +0000)]
CC Mode: Fix bug in c-parse-state. Fixes bug #55181.
* lisp/progmodes/cc-engine.el (c-state-cache-lower-good-pos): When in a
literal, return the start of that literal as a "good pos", not the parameter
POS.
Po Lu [Sun, 8 May 2022 13:07:44 +0000 (21:07 +0800)]
Set stipple flag on PGTK as well
* pgtkterm.c (pgtk_draw_glyph_string_background):
(pgtk_draw_glyph_string): Set stipple flag on string row.
(pgtk_draw_fringe_bitmap):
(pgtk_defined_color): Fix coding style.
Allow term-mode to send function keys to the underlying shell
* lisp/term.el (term-bind-function-keys): New user option.
(term-raw-map): Bind f keys.
(term-send-function-key): Send the function key to the underlying
shell (bug#29920).
Po Lu [Sun, 8 May 2022 12:48:42 +0000 (20:48 +0800)]
Disable scrolling optimizations when a stipple is present
* src/dispextern.h (struct glyph_row): New field `stippled_p'.
We cannot just use the contents of the glyph row, since it has
to be set in `gui_clear_end_of_line' and is more convenient to
set inside the various draw_glyph_string functions.
* src/dispnew.c (scrolling_window): Disable if a row in the
current matrix has the stipple_p flag set.
* src/xdisp.c (gui_clear_end_of_line):
* src/xterm.c (x_draw_image_glyph_string)
(x_draw_stretch_glyph_string, x_draw_glyph_string): Set
`stipple_p' if a stipple pattern was drawn.