Eli Zaretskii [Sun, 19 Jun 2022 11:56:43 +0000 (14:56 +0300)]
Update redisplay ticks for more operations, and misc modifications
* src/xdisp.c (update_redisplay_ticks): Don't disable redisplay of
mini-windows.
* src/regex-emacs.c (re_match_2_internal):
* src/bidi.c (bidi_find_bracket_pairs, bidi_fetch_char)
(bidi_paragraph_init, bidi_find_other_level_edge): Update the
redisplay tick count as appropriate, when moving the iterator by
one character position actually requires to examine many more
positions.
Eli Zaretskii [Sat, 18 Jun 2022 10:45:13 +0000 (13:45 +0300)]
Update documentation
* doc/emacs/trouble.texi (DEL Does Not Delete): Move to the end of
the chapter. This issue is no longer frequent or important as it
was back in Emacs 20 days.
(Long Lines): Document 'max-redisplay-ticks'.
* doc/emacs/emacs.texi (Top): Update the detailed menu.
Eli Zaretskii [Sat, 18 Jun 2022 10:07:20 +0000 (13:07 +0300)]
Allow aborting redisplay stuck in 'parse-partial-sexp'
* src/xdisp.c (display_working_on_window_p): New global variable.
(unwind_display_working_on_window): New function.
* src/keyboard.c (command_loop_1): Reset
'display_working_on_window_p' before and after executing commands.
* src/window.c (Frecenter, window_scroll, displayed_window_lines):
* src/indent.c (Fvertical_motion): Set
'display_working_on_window_p' before calling 'start_display'.
* src/syntax.c (scan_sexps_forward): Call 'update_redisplay_ticks'
after finishing the loop.
Eli Zaretskii [Fri, 17 Jun 2022 15:24:33 +0000 (18:24 +0300)]
Handle too long syntactic fontifications
* src/syntax.c (scan_sexps_forward): Call 'update_redisplay_ticks'
after finishing the loop.
* src/dispnew.c (make_current): Make sure enabled rows of the
current matrix have a valid hash, even if redisplay of a window
was aborted due to slowness. This avoids assertion violations in
'scrolling_window' due to the wrong hash value.
Eli Zaretskii [Tue, 14 Jun 2022 19:13:49 +0000 (22:13 +0300)]
Support callers which sometimes run unrelated to display code
* src/xdisp.c (update_redisplay_ticks): Don't abort callers
with w == NULL if we are called outside of display engine code,
and don't update the tick count in that case.
Eli Zaretskii [Tue, 14 Jun 2022 16:05:38 +0000 (19:05 +0300)]
Restart tick counting every command
* src/keyboard.c (command_loop_1): Reinitialize the tick count
before executing each command in the loop.
* src/xdisp.c (update_redisplay_ticks): Be more defensive to W
being NULL and to its buffer being nil. Set
'windows_or_buffers_changed' to avoid trusting stale window data
like w->window_end_valid.
Eli Zaretskii [Sun, 12 Jun 2022 14:25:26 +0000 (17:25 +0300)]
Initial implementation of "abort-redisplay" feature
* src/xdisp.c (update_redisplay_ticks): New function.
(init_iterator, set_iterator_to_next): Call
'update_redisplay_ticks'.
(syms_of_xdisp) <max_redisplay_ticks>: New variable.
<list_of_error>: Remove 'void-variable': it is no longer needed,
since 'calc_pixel_width_or_height' can no longer signal a
void-variable error, and it gets in the way of aborting
redisplay via 'redisplay_window_error'.
Po Lu [Sun, 12 Jun 2022 08:41:40 +0000 (16:41 +0800)]
Fix phantom drag-and-drop targets showing up in some programs
* src/xterm.c (x_dnd_cleanup_drag_and_drop)
(x_dnd_begin_drag_and_drop): Delete XdndTypeList if it was set
after the DND operation completes. Some programs apparently
think its presence on the drag source means there are more than
3 targets.
* lisp/emacs-lisp/bindat.el (str) (strz): Signal an error if the user
attempts to pack a multibyte string containing characters other than
ASCII and `eight-bit' characters (bug#55897).
* doc/lispref/processes.texi (Bindat Types): Update documentation.
* test/lisp/emacs-lisp/bindat-tests.el (str) (strz): Add tests.
Po Lu [Sun, 12 Jun 2022 01:32:30 +0000 (09:32 +0800)]
Don't rely on XdndAware on frames for dropping to work
* src/xterm.c (x_dnd_get_target_window): New parameter
WAS_FRAME. If toplevel is a frame, set it and clear proto and
motif.
(x_dnd_send_enter, x_dnd_send_position, x_dnd_send_leave)
(x_dnd_send_drop): Remove special-cased self dropping code.
(x_dnd_note_self_position, x_dnd_note_self_drop): New functions.
(x_dnd_begin_drag_and_drop, x_dnd_update_state):
(handle_one_xevent): Handle our own frames using those functions
instead.
Fix loaddefs installation of packages with no autoloads
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Always
generate an output file if we have EXTRA-DATA. This fixes package
installation of packages with no ;;;###autoload forms.
* test/src/fileio-tests.el (fileio-tests--non-regular-insert): Rename
from `test-non-regular-insert` and make it into a test rather than
a broken function. Oh, and make it work while at it.
Allow inserting parts of /dev/urandom with insert-file-contents
* doc/lispref/files.texi (Reading from Files): Document it.
* src/fileio.c (Finsert_file_contents): Allow specifying END for
special files (bug#18370).
Po Lu [Sat, 11 Jun 2022 12:01:01 +0000 (12:01 +0000)]
Fix some drag-and-drop handling on Haiku
* lisp/term/haiku-win.el (haiku-drag-and-drop): Don't raise
frame for some types of drags.
* src/haikuselect.c (haiku_unwind_drag_message): Don't hide
tooltip here.
(Fhaiku_drag_message): Only clear grab and hide tooltip if the
drag was successful.
Further tweaks to how remapped commands are described
* lisp/help.el (describe-map): Rework how remapped commands are
output to avoid repetitions.
They're now shown as:
C-x 4 C-o ido-display-buffer
(Remapped via <remap> <display-buffer>)
C-x 5 C-o ido-display-buffer-other-frame
(Remapped via <remap> <display-buffer-other-frame>)
C-x x i ido-insert-buffer
(Remapped via <remap> <insert-buffer>)
* lisp/language/indian.el ("Lepcha"): New language environment.
Add composition rules for Lepcha. Add sample text and input method.
* lisp/language/misc-lang.el ("Kharoshthi"): Fix whitespace.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Lepcha.
* lisp/leim/quail/indian.el ("lepcha"): New input method.
* etc/HELLO: Add a Lepcha greeting.
* etc/NEWS: Announce the new language environment.
Stefan Kangas [Sat, 11 Jun 2022 04:30:30 +0000 (06:30 +0200)]
Merge from origin/emacs-28
0705705ebf Improve documentation of "etags -I" 0ad8cd40ce Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/e... 22a832ad82 Mention the #f syntax from cl-prin1 3fd0854378 Fix file name quoting in tramp-smb.el (do not merge)
Jim Porter [Thu, 9 Jun 2022 16:50:20 +0000 (09:50 -0700)]
Don't use 'list' command in Eshell command forms
When executed like a command, 'list' looks for external programs named
'list' first before falling back to the Lisp function of the same
name. This causes unexpected behavior, since the Lisp function is
what we want in these tests.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-cmd-indices)
(esh-var-test/quoted-interp-cmd-indices): Use 'listify' instead of
'list'.
Taiju HIGASHI [Tue, 7 Jun 2022 12:46:14 +0000 (21:46 +0900)]
Don't reduce vocabulary in ja-dic.el by default
* configure.ac: Add the "--with-small-ja-dic" configure option.
* leim/Makefile.in (${leimdir}/ja-dic/ja-dic.el): Change the build
method depending on whether or not the --with-small-ja-dic option
is specified.
* lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-nasi): Add
the "no-reduction" optional argument. When it is specified, then
generate a Japanese dictionary without reduced vocabulary.
(skkdic-convert): Add the "no-reduction" optional argument.
(batch-skkdic-convert): Add the "--no-reduction" command line argument.
Eli Zaretskii [Fri, 10 Jun 2022 11:22:18 +0000 (14:22 +0300)]
; Fix documentation of 'completing-read' and friends
* src/minibuf.c (Fcompleting_read):
* lisp/minibuffer.el (read-file-name):
* doc/lispref/minibuf.texi (Minibuffer Completion):
* etc/NEWS: Fix typos and wording of the description of the
REQUIRE-MATCH argument to 'completing-read'.
Richard Hansen [Sun, 29 May 2022 03:53:51 +0000 (23:53 -0400)]
; bindat (strz): Consistent length type check, take two
Commit 30ec4a7347b2944818c6fc469ae871374ce7caa4 is incorrect -- the
length computation logic uses a simple nilness test, not `numberp'.
The `numberp' case is just an optimization if `len' is a literal
number; it does not affect the behavior.
Revert that commit, add some comments to help future readers avoid the
same mistake, and update the pack logic to use the same optimization
as the length computation for consistency.
Richard Hansen [Sun, 29 May 2022 21:15:04 +0000 (17:15 -0400)]
; bindat-tests (str, strz): Refine tests
str and strz:
* Add tests for packing into a pre-allocated string.
strz:
* Add test cases to probe more boundary conditions.
* Delete comments that no longer apply.
* Add tests to ensure that truncated packed strings are rejected.
* Keep the legacy spec tests in sync with the modern spec tests.
Make describe-prefix-bindings say when there are no matches
* lisp/help.el (describe-prefix-bindings): Say when there are no
bindings under a prefix (bug#55875), for instance in `C-c C-h' in
a buffer with no `C-c' commands.
Po Lu [Fri, 10 Jun 2022 07:27:07 +0000 (15:27 +0800)]
Fix receiving drops from drop-only Motif programs
* lisp/x-dnd.el (x-dnd-xm-read-targets-table): Fix doc string.
(x-dnd-handle-motif): Recompute types and state on XmDROP_START
if no state already exists.
Stefan Kangas [Fri, 10 Jun 2022 06:17:35 +0000 (08:17 +0200)]
Merge from origin/emacs-28
d02c94090c Fix error reporting in process-async-https-with-delay 9a4862a973 * doc/misc/org.org: Remove spurious markup. 768ed1476a Make Tramp version check more robust 7f778c6943 Fix debugging with GDB when a breakpoint has multiple loca... 25e53e9391 ; * lisp/files.el (file-expand-wildcards): Doc fix. 3ea9357d10 Update documentation of 'aset' and 'store-substring'
Po Lu [Fri, 10 Jun 2022 03:45:27 +0000 (11:45 +0800)]
Don't rely on TARGETS to read selection targets for Motif DND
* lisp/x-dnd.el (x-dnd-types-alist):
(x-dnd-known-types): Fix formatting.
(x-dnd-xm-unpack-targets-table-header):
(x-dnd-xm-read-single-rec):
(x-dnd-xm-read-targets-table):
(x-dnd-xm-read-targets): New functions.
(x-dnd-handle-motif): Read targets from the targets table
of the drag window instead of the selection's TARGET target.
New setting for mouse-drag-copy-region to not put "" onto kill ring
* doc/emacs/frames.texi (Mouse Commands): Document it.
* lisp/mouse.el (mouse-drag-copy-region): Add value (bug#17211)
for not putting "" strings onto the kill ring.
(mouse-set-region, mouse-save-then-kill): Use the new value.
Po Lu [Thu, 9 Jun 2022 13:48:19 +0000 (21:48 +0800)]
Fix recalculation of `icon-title-format' after a frame is iconified
Previously it would only happen upon the next mode line
redisplay, meaning that just pressing C-z would not update the
implicit title, since C-z doesn't cause a redisplay.
* src/dispextern.h: Update prototypes.
* src/frame.h (SET_FRAME_ICONIFIED): De-slugify. Call
`gui_consider_frame_title', since `icon-title-format' might be
different from the current frame title.
* src/xdisp.c (gui_consider_frame_title): Export (also in
dispextern.h). (bug#55850)
Make `line-number-at-pos' work more like in earlier Emacs versions
* src/fns.c (Fline_number_at_pos): Allow calling with position
outside the region if called with ABSOLUTE non-nil (bug#55847).
This isn't announced in the doc string, but makes function
compatible with the version in earlier Emacs versions.
Stefan Baums [Sun, 5 Jun 2022 17:18:23 +0000 (19:18 +0200)]
Add support for the Kharoshthi script
* etc/NEWS: Announce the new language environment and script.
* etc/HELLO: Add Kharoshthi greeting.
* lisp/leim/quail/misc-lang.el ("kharoshthi"): New input method.
* lisp/language/misc-lang.el ("Kharoshthi"): New language
environment. Set up composition rules for Kharoshthi.
(Bug#55539)
Po Lu [Thu, 9 Jun 2022 08:34:18 +0000 (16:34 +0800)]
Implement `follow-tooltip' on NS as well
* lisp/term/ns-win.el (x-begin-drag): Pass `follow-tooltip'.
* src/nsfns.m (Fx_show_tip): Record last dx and dy.
(syms_of_nsfns): New staticpros.
* src/nsmenu.m ([EmacsTooltip moveTo:]): New method.
* src/nsselect.m (Fns_begin_drag): New parameter
`follow-tooltip'.
* src/nsterm.h (@interface EmacsWindow):
(EmacsTooltip): Update prototypes.
* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): Move any
tooltip to the right location.
([EmacsWindow beginDrag:forPasteboard...]): New parameter
`followTooltip'.
Po Lu [Thu, 9 Jun 2022 07:44:51 +0000 (15:44 +0800)]
Note caveats of `follow-tooltip' with system tooltips
* lisp/mouse.el (mouse-drag-and-drop-region): Turn off system
tooltips inside.
* src/xfns.c (Fx_begin_drag): Say that follow-tooltip doesn't
work with system tooltips.