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.
Alan Mackenzie [Sun, 8 May 2022 11:39:45 +0000 (11:39 +0000)]
Linux console: don't translate ESC TAB to `backtab' in input-decode-map.
This translation happened after the terminfo entry for <shift>TAB in the linux
section was changed to kcbt=\E^I in ncurses version 6.3.
* lisp/term/linux.el (terminal-init-linux): Add a define-key form to remove
the entry for "\e\t" from input-decode-map.
* etc/PROBLEMS: Add a new section under "character terminals" about S-TAB
wrongly doing the same thing as M-TAB, giving tips about amending the Linux
keyboard layout.
Michael Albinus [Sun, 8 May 2022 09:51:59 +0000 (11:51 +0200)]
Handle changed scp protocol in Tramp
* lisp/net/tramp-sh.el (tramp-scp-force-scp-protocol): New defvar.
(tramp-scp-force-scp-protocol): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Use it.
(tramp-scp-direct-remote-copying, tramp-methods) <scp, scpx>: Use "%z".
Michael Albinus [Sun, 8 May 2022 09:43:19 +0000 (11:43 +0200)]
Handle changed scp protocol in Tramp, don't merge
* lisp/net/tramp-sh.el (tramp-scp-force-scp-protocol): New defvar.
(tramp-scp-force-scp-protocol): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Use it.
(tramp-methods) <scp, scpx>: Use "%y".
Po Lu [Sun, 8 May 2022 06:33:34 +0000 (14:33 +0800)]
Improve handling of invisible cursor alloc failures
* src/xterm.c (x_toggle_visible_pointer): Use Xfixes if cursor
allocation really fails. This happens when the X server has a
limit on the number of cursors that can be created.
Eli Zaretskii [Sun, 8 May 2022 06:24:29 +0000 (09:24 +0300)]
Fix selection dialog display on MS-Windows
* src/w32fns.c (w32_wnd_proc) <WM_PAINT>: Update the frame from
the back buffer when double-buffering is in effect and a selection
dialog is open.
(w32_dialog_in_progress): Indicate to 'w32_wnd_proc' that a
selection dialog is open. (Bug#55208)
Po Lu [Sun, 8 May 2022 05:09:24 +0000 (05:09 +0000)]
Implement stipples for stretch glyphs
* src/haikuterm.c (haiku_draw_stipple_background): Accept new
arguments for specifying the color explicitly. All callers
changed.
(haiku_draw_stretch_glyph_string): Draw stipple correctly.
(haiku_draw_glyph_string): Handle stipple correctly when drawing
neighbors.
Po Lu [Sun, 8 May 2022 04:42:11 +0000 (04:42 +0000)]
Fully implement stipples for text on Haiku
* src/haikufont.c (haikufont_draw): Use
`haiku_draw_background_rect' instead.
* src/haikuterm.c (haiku_draw_plain_background): Change
arguments to accept rect manually.
(haiku_get_bitmap): Delete function.
(haiku_get_bitmap_rec): New function.
(haiku_draw_stipple_background): Accept rect instead of box
sizes.
(haiku_draw_background_rect): New function.
(haiku_maybe_draw_background): Use that instead.
(haiku_draw_image_glyph_string): Add notice.
(haiku_draw_glyph_string): Set `stippled_p' correctly.
* src/haikuterm.h (struct haiku_bitmap_record): New fields for
keeping track of stipple state.
* src/image.c (image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record): Free and
set them accordingly.
Po Lu [Sun, 8 May 2022 03:08:42 +0000 (03:08 +0000)]
Implement bitmap loading for faces on Haiku
Stipples don't completely work yet.
* lisp/faces.el (face-valid-attribute-values): Enable `:stipple'
on Haiku.
* src/haiku_draw_support.cc (BView_DrawBitmap)
(BView_DrawBitmapWithEraseOp, BView_DrawMask): Don't push and
pop states.
(BView_DrawBitmapTiled): New function.
Eli Zaretskii [Sat, 7 May 2022 16:34:53 +0000 (19:34 +0300)]
Fix Bengali composition rules
* lisp/language/indian.el (bengali-composable-pattern): Fix
composition rules for U+09F0 and U+09FE. Patch from
समीर सिंह Sameer Singh <lumarzeli30@gmail.com>. (Bug#55303)
Stefan Monnier [Sat, 7 May 2022 14:21:26 +0000 (10:21 -0400)]
(dabbrev-completion): Fix bug#45768
Make `dabbrev-completion` go through `completion-at-point` so that
it interacts correctly with Icomplete. Export a new
`completion-capf` function while we're at it, since it can be useful
elsewhere.
* lisp/dabbrev.el (dabbrev-capf): New function,
extracted from `dabbrev-completion`.
(dabbrev-completion): Use it.
* lisp/language/indian.el ("Kaithi"): New language environment.
Add composition rules for Kaithi. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Kaithi.
* lisp/leim/quail/indian.el ("kaithi"): New input method.
* etc/HELLO: Add a Kaithi greeting.
* etc/NEWS: Announce the new language environment and its
input method.
* lisp/progmodes/python.el (inferior-python-mode): Use
scroll-convervatively instead of trying to do this with a comint
filter (which produces flickering) (bug#31115).
* doc/emacs/abbrevs.texi (Dynamic Abbrevs): Document it.
* lisp/dabbrev.el (dabbrev-ignored-buffer-names)
(dabbrev-ignored-buffer-regexps): Link to it.
(dabbrev-ignored-buffer-modes): New user option (bug#19392).
(dabbrev--filter-buffer-modes): New function.
(dabbrev--select-buffers, dabbrev--make-friend-buffer-list): Use it.
* doc/lispref/help.texi (Keys in Documentation): Document it.
lisp/help-mode.el (help-make-xrefs): Implement a new \+ syntax to
inhibit buttonification.
Po Lu [Sat, 7 May 2022 01:34:35 +0000 (09:34 +0800)]
Fix freezes with some oddball menus
* src/xmenu.c (x_activate_menubar): Clear flag if dispatching
the event failed.
* src/xterm.c (handle_one_xevent): Check for sensitive
CascadeButton instead of row column type.
Eric Abrahamsen [Fri, 6 May 2022 17:14:08 +0000 (10:14 -0700)]
Fix handling of IMAP search strings
* lisp/gnus/gnus-search.el (gnus-search-imap-handle-string): This was
a misunderstanding of what `multibyte-string-p' means. The check was
actually supposed to be whether the string was non-ascii or not.
* doc/emacs/maintaining.texi (VC Change Log): Remove the entries
for commands now removed from most VCs.
* lisp/vc/log-view.el (log-view-mode-menu): Disable menu entries
(bug#14531).
Eric Abrahamsen [Fri, 6 May 2022 16:37:07 +0000 (09:37 -0700)]
Don't force Gnus cache usage in nnvirtual
* lisp/gnus/nnvirtual.el (nnvirtual-retrieve-headers): We're not sure
why this was happening, but it shouldn't be necessary. Simply calling
`gnus-retrieve-headers' directly will use the cache if the user has
configured it.
Move buffer-local-set-state to subr because it's used at runtime
* lisp/subr.el (buffer-local-set-state)
(buffer-local-set-state--get, buffer-local-restore-state): Moved
from easy-mmode.el because they have to be available run-time.
Remove the P/N/M-p/M-n bindings from the general log-view map
* lisp/vc/log-view.el (log-view-mode-map): Remove the P/N/M-p/M-n
bindings (that are only usable in some VCs).
* lisp/vc/vc-sccs.el (vc-sccs-log-view-mode):
* lisp/vc/vc-rcs.el (vc-rcs-log-view-mode):
* lisp/vc/vc-cvs.el (vc-cvs-log-view-mode): New modes that bind
the P/N/M-p/M-n commands (bug#14531).
* lisp/emacs-lisp/easy-mmode.el (buffer-local-set-state--get)
(buffer-local-restore-state): Autoload. Perhaps it would be
better to move these functions to subr.el or something...