Eli Zaretskii [Tue, 31 May 2022 13:19:44 +0000 (16:19 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Po Lu [Tue, 31 May 2022 13:14:16 +0000 (21:14 +0800)]
Add missing part of recent changes to NS DND support
* lisp/term/ns-win.el (x-begin-drag): Implement `return-frame'
argument.
समीर सिंह Sameer Singh [Mon, 30 May 2022 12:16:14 +0000 (17:46 +0530)]
Add support for the Makasar and Lontara scripts (bug#55734)
* lisp/language/indonesian.el ("Makasar") ("Buginese"):
New language environment. Add composition rules for Makasar
and Lontara. Add sample texts and input methods.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Makasar and Buginese.
* lisp/leim/quail/indonesian.el ("makasar") ("lontara"):
New input methods.
* etc/HELLO: Add Makasar and Buginese greetings.
* etc/NEWS: Announce the new language environments.
Po Lu [Tue, 31 May 2022 12:56:43 +0000 (20:56 +0800)]
Slightly optimize x_check_errors as well
* src/xterm.c (x_check_errors): Don't sync if no requests were
made since the error trap was installed.
Stefan Kangas [Tue, 31 May 2022 12:30:38 +0000 (14:30 +0200)]
* lisp/play/handwrite.el: Minor doc fixes.
Antonio Ruiz [Tue, 31 May 2022 11:27:28 +0000 (13:27 +0200)]
Make handwrite.el printing use more of the ps-print setup
* lisp/play/handwrite.el (handwrite): Allow ps-lpr-printer to be
computed at runtime (bug#55733).
Copyright-paperwork-exempt: yes
Po Lu [Tue, 31 May 2022 10:18:52 +0000 (18:18 +0800)]
Fix replying to _NET_WM_PING during drag-and-drop
* src/xterm.c (handle_one_xevent): Test client window against
root window instead of using nonstandard event mask.
Po Lu [Tue, 31 May 2022 10:06:15 +0000 (18:06 +0800)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Tue, 31 May 2022 10:05:41 +0000 (18:05 +0800)]
Implement `return-frame' for DND on NS
* src/nsselect.m (Fns_begin_drag): New argument `return-frame'.
(syms_of_nsselect): New defsym.
* src/nsterm.h (EmacsWindow): New fields.
* src/nsterm.m (ns_read_socket): Split parts off to
ns_read_socket_1.
(ns_read_socket_1): New function.
(ns_flush_display): Use that function instead.
([EmacsWindow beginDrag:forPasteboard:]): Update for
return-frame.
Po Lu [Tue, 31 May 2022 08:40:57 +0000 (16:40 +0800)]
Fix autorelease pool "straddling" during DND on NS
* src/nsterm.m (ns_mouse_position): Implement `drag-source'
on NS.
([EmacsView draggingUpdated:]): Add autorelease pool around
callbacks.
([EmacsWindow beginDrag:forPasteboard:]): Block input around
dragImage.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in x_get_current_wm_state
* src/xterm.c (x_get_current_wm_state): When lint checking,
initialize reply_data to a non-null dummy value instead of to a
null one. This pacifies GCC 12 -Wanalyzer-null-dereference.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in dump_queue_enqueue
* src/pdumper.c (dump_queue_enqueue): Use BASE_EQ, not EQ.
This pacifies GCC 12 -Wanalyzer-null-dereference.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Be more robust if doc file is corrupted
* src/doc.c (Fsnarf_documentation): Don’t dump core on a corrupted
doc file. Problem found by GCC 12 -Wanalyzer-null-argument.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in Fmove_overlay
* src/buffer.c (Fmove_overlay): Use BASE_EQ, not EQ.
This pacifies GCC 12 -Wanalyzer-null-dereference.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in Fx_show_tip
* src/xfns.c (Fx_show_tip): Use BASE_EQ, not EQ.
This pacifies GCC 12 -Wanalyzer-null-dereference.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 in xrdb.c
* src/xrdb.c (x_get_resource): Simply assign the return value.
This pacifies GCC 12 -Wanalyzer-use-of-uninitialized-value.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 false positive in ccl.c
* src/ccl.c: Suppress -Wanalyzer-use-of-uninitialized-value
in GCC 12 or later.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Simplify CHAR_TABLE_REF_ASCII
* src/lisp.h (CHAR_TABLE_REF_ASCII): Refactor as a straightforward
for-loop. Redo an if-then-else to be an (!if)-else-then as this
is a bit cleaner, and it also works around GCC bug 105755.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Avoid undefined behavior in detect_coding routines
* src/coding.c (detect_coding): Always initialize all
components of detect_info, so that detect_coding_utf_8 etc.
do not have undefined behavior when they read detect_info.checked.
This bug is not likely to cause problems on real systems.
Problem found by GCC 12 -fanalyzer.
(detect_coding_system): Use consistent style with detect_coding
initialization.
Paul Eggert [Tue, 31 May 2022 08:19:32 +0000 (01:19 -0700)]
Pacify GCC 12 -fanalyzer in x_popup_menu_1
* src/menu.c (x_popup_menu_1): Rework to avoid unnecessary
initialization and test. This also pacifies GCC 12.
Paul Eggert [Tue, 31 May 2022 08:19:31 +0000 (01:19 -0700)]
Pacify GCC 12 -Wanalyzer-use-of-uninitialized-value
* lib-src/etags.c (readline_internal): Do not copy a pointer to
freed storage, as that has undefined behavior even if the pointer
is not dereferenced.
(relative_filename): Avoid a backward scan by remembering where
the last slash was. This is a bit faster, and pacifies a GCC
false alarm.
Po Lu [Tue, 31 May 2022 08:25:20 +0000 (16:25 +0800)]
Fix crashes displaying menu help text on NS
* src/nsterm.m (ns_flush_display): Run event loop manually,
avoiding a double free of an autorelease pool.
Po Lu [Tue, 31 May 2022 05:24:27 +0000 (13:24 +0800)]
Fix processing of DND events on GTK
* src/xterm.c (x_dnd_begin_drag_and_drop): Clear `current_count'
and `current_hold_quit' after calling gtk_main_iteration.
Po Lu [Tue, 31 May 2022 02:17:12 +0000 (10:17 +0800)]
Fix unused variables on GTK
* src/xterm.c (x_wait_for_cell_change): Fix unused variables
on GTK builds.
Po Lu [Tue, 31 May 2022 02:15:29 +0000 (10:15 +0800)]
Fix initialization of `hold_quit' during DND
* src/xterm.c (x_dnd_begin_drag_and_drop): Use `EVENT_INIT'
instead of just setting type to NO_EVENT.
Po Lu [Tue, 31 May 2022 00:47:30 +0000 (08:47 +0800)]
Prevent events from being lost waiting for selections on GTK
* src/xterm.c (x_wait_for_cell_change): Use GTK to iterate the
main loop so events reach the toolkit.
Lars Ingebrigtsen [Mon, 30 May 2022 19:40:26 +0000 (21:40 +0200)]
Regenerated ldefs-boot.el
Eli Zaretskii [Mon, 30 May 2022 17:51:19 +0000 (20:51 +0300)]
Fix 'debug-timer-check' on MS-Windows
* src/w32proc.c (w32_raise): New function.
* src/atimer.c (raise) [WINDOWSNT]: Redirect to 'w32_raise'.
Juri Linkov [Mon, 30 May 2022 16:30:54 +0000 (19:30 +0300)]
* lisp/progmodes/project.el: Improve file-reading history and default values.
(project-find-file): Use relative file name of the
currently visited file as an alternative default value.
(project-find-file-in, project-find-dir): Use 'file-name-history' (bug#55267).
Mattias Engdegård [Tue, 24 May 2022 11:02:14 +0000 (13:02 +0200)]
Nonrecursive Lisp reader (bug#55676)
Restructure the reader to be nonrecursive so that it is not limited by
the C stack or crashes Emacs when reading deeply nested data.
This also improves performance.
A few minor bugs were fixed:
- (a .{NBSP}b) where {NBSP} is a non-breaking space (U+00A0) is now
the dotted pair (a . b), not the 3-element list (a \. b), since U+00A0
is treated as whitespace everywhere else.
- #_ with no symbol following is now equivalent to ## (empty interned
symbol), not #: (empty uninterned symbol).
* src/alloc.c (garbage_collect): Call mark_lread.
* src/lread.c (readevalloop): Use read0 instead of read_list.
(stackbufsize): Increase to 1024, now that read0 isn't recursive.
(invalid_radix_integer): Buffer overflow check.
(read1, read_list, read_vector): Remove.
(read_char_literal, read_string_literal)
(hash_table_from_plist, record_from_list, vector_from_rev_list)
(bytecode_from_rev_list, char_table_from_rev_list)
(sub_char_table_from_rev_list, string_props_from_rev_list)
(read_bool_vector, skip_lazy_string, symbol_char_span)
(skip_space_and_comments)
(enum read_entry_type, struct read_stack_entry, struct read_stack)
(rdstack, mark_lread, read_stack_top, read_stack_pop)
(read_stack_empty_p, grow_read_stack, read_stack_push): New.
(read0): Rewrite to be nonrecursive.
* test/src/lread-tests.el (lread-deeply-nested, lread-misc): New tests.
Mattias Engdegård [Mon, 30 May 2022 10:25:19 +0000 (12:25 +0200)]
Fix atimer setting and overdue expiration (bug#55628)
* src/atimer.c (set_alarm): If the atimer has already expired, signal
it right away instead of postponing it further. Previously this could
occur repeatedly, blocking atimers indefinitely.
Also only use `alarm` as fallback if `setitimer` is unavailable, not
both at the same time (which makes no sense, and they both typically
use the same mechanism behind the curtains).
* test/src/eval-tests.el (eval-tests/funcall-with-delayed-message):
New test, verifying proper functioning of funcall-with-delayed-message
which also serves as test for this bug (which also caused
debug-timer-check to fail, but that test is only run when Emacs is
built with enable-checking).
Eli Zaretskii [Mon, 30 May 2022 12:58:38 +0000 (15:58 +0300)]
Add more subscript and superscript characters to "C-x 8"
* lisp/international/iso-transl.el (iso-transl-char-map): Add more
numerical superscript and subscript characters. (Bug#55722)
समीर सिंह Sameer Singh [Mon, 30 May 2022 02:18:45 +0000 (07:48 +0530)]
Add support for the Rejang script (bug#55718)
* lisp/language/indonesian.el ("Rejang"): New language environment.
Add composition rules for Rejang. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Rejang.
* lisp/leim/quail/indonesian.el ("rejang"): New input method.
* etc/HELLO: Add a Rejang greeting.
* etc/NEWS: Announce the new language environment.
Po Lu [Mon, 30 May 2022 10:09:41 +0000 (18:09 +0800)]
Get rid of `defvar-keymap' in flymake.el
* lisp/progmodes/flymake.el (flymake-mode-map)
(flymake-diagnostics-buffer-mode-map): Stop using
`defvar-keymap', since Flymake only requires Emacs 26.1.
Po Lu [Mon, 30 May 2022 08:03:11 +0000 (16:03 +0800)]
Fix `dnd-indicate-insertion-point' on Mac OS
* lisp/term/ns-win.el (ns-handle-drag-motion): Remove debugging
code.
* src/nsterm.m ([EmacsView draggingUpdated:]): Redisplay here
instead.
Po Lu [Mon, 30 May 2022 07:54:22 +0000 (07:54 +0000)]
Update frame positions on Haiku after changing Z group
* src/haiku_support.cc (EmacsScreenChangeMonitor): Fix comment.
* src/haikufns.c (haiku_set_z_group): Ask for a position update,
since changing the Z group might change the feel of the window.
Po Lu [Mon, 30 May 2022 07:06:55 +0000 (15:06 +0800)]
Fix cursor flushing inside minibuffers on NS
* src/nsterm.m (EV_TRAILER): Fix coding style.
(ns_flush_display): New function.
(ns_redisplay_interface): Register `flush_display'.
Po Lu [Mon, 30 May 2022 06:04:43 +0000 (14:04 +0800)]
Fix hangs when x-get-selection is called inside a popup menu
* src/xselect.c (wait_for_property_change):
(x_get_foreign_selection): Use `x_wait_for_cell_change' if input
is blocked. (bug#22214)
* src/xterm.c (x_wait_for_cell_change): New function.
* src/xterm.h: Update prototypes.
Stefan Kangas [Mon, 30 May 2022 04:30:24 +0000 (06:30 +0200)]
Merge from origin/emacs-28
1b7b69e764 Some Tramp cleanup on MS Windows
Po Lu [Mon, 30 May 2022 02:36:43 +0000 (10:36 +0800)]
Try to implement `dnd-indicate-insertion-point' on macOS
* lisp/term/ns-win.el (ns-handle-drag-motion): New function.
* src/nsterm.m ([EmacsView draggingUpdated:]): Call that
function instead.
(syms_of_nsterm): Clean up old style defvars and add new
defvar for the DND drag function.
Po Lu [Mon, 30 May 2022 01:25:03 +0000 (09:25 +0800)]
Further clean up DND target handling
* src/xfns.c (Fx_begin_drag): Alloca target list.
* src/xterm.c (x_set_dnd_targets): Copy the given targets list.
(x_dnd_begin_drag_and_drop): Record freeing the targets list on
the specpdl.
(handle_one_xevent, x_dnd_cleanup_drag_and_drop)
(x_connection_closed, x_delete_terminal): Stop calling
`x_set_dnd_targets' manually to free the targets list.
Po Lu [Mon, 30 May 2022 01:07:27 +0000 (09:07 +0800)]
Fix crash when loading Postscript images
* src/xterm.c (handle_one_xevent): Catch errors around
`x_kill_gs_process'.
Po Lu [Mon, 30 May 2022 00:49:24 +0000 (08:49 +0800)]
Use XDrawPoint to clear relief rect corners
* xterm.c (x_clear_point): New function.
(x_draw_relief_rect): Use that instead.
Paul Eggert [Sun, 29 May 2022 21:57:48 +0000 (14:57 -0700)]
Document decoded-time-string issue on 6-elt args
* lisp/simple.el: Document problematic use of decoded-time-dst on
6-element args.
Paul Eggert [Sun, 29 May 2022 20:07:50 +0000 (13:07 -0700)]
ISO 8601 strings sans "Z" don’t specify DST flag
* lisp/calendar/iso8601.el (iso8601--zone-dst): New function.
(iso8601-parse, iso8601-parse-time): Use it.
(iso8601--decoded-time): Default dst to -1, not nil.
* test/lisp/calendar/iso8601-tests.el (test-iso8601-combined)
(standard-test-time-of-day-zone): Adjust to new behavior.
Paul Eggert [Sun, 29 May 2022 15:52:13 +0000 (08:52 -0700)]
Doc fix for dst flag
* doc/lispref/os.texi (Time Conversion): Note Common Lisp dst differs.
Stefan Monnier [Sun, 29 May 2022 17:37:44 +0000 (13:37 -0400)]
* lisp/shell.el (shell): Fix last change
Wrap the file-name prompt within `with-connection-local-variables` as
it was before the previous change.
While at it, make sure we set the `default-directory` of
the actual shell buffer after querying the user.
Eli Zaretskii [Sun, 29 May 2022 17:12:56 +0000 (20:12 +0300)]
; Fix Batak greeting
* etc/HELLO:
* lisp/language/indonesian.el ("Batak"): Fix greeting.
Eli Zaretskii [Sun, 29 May 2022 16:35:15 +0000 (19:35 +0300)]
; Fix last change (bug#55694)
* etc/HELLO ("Batak"): Add one more greeting.
* lisp/language/indonesian.el ("Batak"): Fix doc string and add
one more greeting.
समीर सिंह Sameer Singh [Sun, 29 May 2022 13:25:58 +0000 (18:55 +0530)]
Add support for the Batak script (bug #55694)
* lisp/language/indonesian.el ("Batak"): New language environment.
Add composition rules for Batak. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Batak.
* lisp/leim/quail/indonesian.el ("batak"): New input method.
Rename TITLE of balinese, javanese and sundanese in
("quail-define-package").
* etc/HELLO: Add a Batak greeting.
* etc/NEWS: Announce the new language environment and its
input method.
Lars Ingebrigtsen [Sun, 29 May 2022 14:40:53 +0000 (16:40 +0200)]
Fix hfy-etags-cmd type
* lisp/htmlfontify.el (hfy-etags-cmd): Fix the type -- this
variable usually ends up being nil.
Daniel Martín [Sun, 29 May 2022 14:31:38 +0000 (16:31 +0200)]
Fix reference to help-enable-variable-value-editing
* lisp/help-mode.el (help-mode): Fix docstring to reference the
correct variable name.
* lisp/ldefs-boot.el (help-mode): Ditto (bug#55705).
Po Lu [Sun, 29 May 2022 12:13:25 +0000 (20:13 +0800)]
* etc/tutorial/TUTORIAL.cn (INSTALLING PACKAGES): Translate from English.
Michael Albinus [Sun, 29 May 2022 11:31:32 +0000 (13:31 +0200)]
Some Tramp cleanup on MS Windows
* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist): Do not add
localhost when `tramp-encoding-shell' is a POSIX shell.
* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process):
Skip on MS Windows.
Mattias Engdegård [Sun, 29 May 2022 08:54:25 +0000 (10:54 +0200)]
; * lisp/leim/quail/indonesian.el: Remove ineffective backslashes.
Mattias Engdegård [Sun, 29 May 2022 08:49:13 +0000 (10:49 +0200)]
Traverse record literals in byte-compile--first-symbol-with-pos
* lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos):
Traverse record literals as well as vectors. Either is rather
pointless but there were some strong feelings about it.
Po Lu [Sun, 29 May 2022 08:32:34 +0000 (16:32 +0800)]
* admin/alloc-colors.c: Fix missing declaration.
Eli Zaretskii [Sun, 29 May 2022 08:00:36 +0000 (11:00 +0300)]
; * etc/NEWS: Fix last change.
Manuel Giraud [Fri, 20 May 2022 11:52:28 +0000 (13:52 +0200)]
Make `count-words' count sentences.
* lisp/textmodes/paragraphs.el (count-sentences): New function.
* lisp/simple.el (count-words--format): Update format for showing
sentences.
(count-words): Also count sentences.
* lisp/simple.el (count-words):
* etc/NEWS:
* doc/emacs/basic.texi (Position Info): Update documentation for
sentence counting.
Po Lu [Sun, 29 May 2022 07:49:48 +0000 (15:49 +0800)]
Keep display mm width and height up to date after changes
* src/xfns.c (Fx_display_mm_width, Fx_display_mm_height): Use
new fields if they are set.
* src/xterm.c (handle_one_xevent): Set new fields on RRNotify if
the screen is correct.
* src/xterm.h (struct x_display_info): New fields
`screen_mm_width', `screen_mm_height'.
Po Lu [Sun, 29 May 2022 04:55:54 +0000 (12:55 +0800)]
Make DND target list lifecycle a little clearer
* src/xfns.c (Fx_begin_drag): Pass target atoms and ntargets to
x_dnd_begin_drag_and_drop instead.
* src/xterm.c (x_set_dnd_targets): Make static.
(x_clear_dnd_targets): Delete function.
(x_dnd_begin_drag_and_drop): Adjust to set targets here instead.
* src/xterm.h: Update prototypes.
Stefan Kangas [Sun, 29 May 2022 04:30:21 +0000 (06:30 +0200)]
Merge from origin/emacs-28
f9ee83bfb9 do_switch_frame: before leaving mini-window, check other (...
908e2e09d0 Fix commands used to produce on-line HTML docs
fff770fb97 Fix a bad cross-reference in elisp.pdf
ebea3415b0 Fix documentation of 'string-pad'
Po Lu [Sun, 29 May 2022 01:05:54 +0000 (01:05 +0000)]
Fix pending window changes in haiku_set_window_size
* src/haikuterm.c (haiku_set_window_size): Wait for
FRAME_RESIZED events, then call `do_pending_window_change'.
(haiku_read_socket): Allow waiting for FRAME_RESIZED events.
Po Lu [Sun, 29 May 2022 00:51:17 +0000 (08:51 +0800)]
Improve error trapping on X
* xterm.c (x_uncatch_errors, x_had_errors_p): Don't sync if no
request was made since the error trap was installed.
kobarity [Sat, 28 May 2022 16:51:01 +0000 (18:51 +0200)]
Fix Python Hideshow problem with backslash escaped newlines
* lisp/progmodes/python.el (python-rx)
(python-nav-beginning-of-defun-regexp): Allow
python-nav-*-defun to handle backslash escaped newlines
(bug#55690).
Visuwesh [Sat, 28 May 2022 10:54:32 +0000 (12:54 +0200)]
pp--insert-lisp: Don't bug out on certain forms at beginning of buffer
* pp.el (pp--insert): Check if point is in beginning of buffer before
calling `looking-back' (bug#55677).
Stefan Monnier [Sat, 28 May 2022 16:02:15 +0000 (12:02 -0400)]
with-connection-local-variables: Avoid code duplication
Move the bulk of the code of `with-connection-local-variables` into
a separate function, which both avoids duplicating that code but also
avoids duplicating the code passed as the body of
a `with-connection-local-variables`. Also makes it easier to
debug the code, or change the implementation of
`with-connection-local-variables` without having to recompile all
the users.
* lisp/files-x.el (with-connection-local-variables-1): New function,
extracted from `with-connection-local-variables`.
(with-connection-local-variables): Use it.
Alan Mackenzie [Sat, 28 May 2022 12:55:32 +0000 (12:55 +0000)]
do_switch_frame: before leaving mini-window, check other (mru) window is live
This fixes bug#55684. There, with a minibuffer-only frame at start up,
Emacs tried to switch to this frame, whose selected window was the
mini-window. There is no other active window in this frame, so the
attempt to swith to another window failed.
* src/frame.c (do_switch_frame): On switching to a frame whose selected
window is as above, before selecting the most recently used window, check
this ostensible window is an actual live window. Otherwise leave the
mini-window selected.
Eli Zaretskii [Sat, 28 May 2022 11:57:55 +0000 (14:57 +0300)]
Fix commands used to produce on-line HTML docs
* admin/admin.el (manual-meta-string): Only include the first
line, and move the rest...
(manual-links-string): ...to this new string.
(manual-html-fix-headers): Don't remove the '<meta name=' elements
produced by makeinfo, especially not the 'name="viewport"' one,
which is essential for viewing the docs on mobile devices.
Reported by "Facundo Lander via RT" <webmasters-comment@gnu.org>,
see gnu.org ticket #
1840138.
Valenoern [Sat, 28 May 2022 10:43:20 +0000 (12:43 +0200)]
Support html template tag in shr
* lisp/net/shr.el: Add shr-tag-template as a dummy tag.
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Sat, 28 May 2022 10:31:52 +0000 (12:31 +0200)]
Fix native-comp of trampolines after previous change
* lisp/emacs-lisp/comp.el (comp--native-compile): Don't delete the
explicitly specified output file, just temp files.
Eli Zaretskii [Sat, 28 May 2022 10:16:04 +0000 (13:16 +0300)]
; * lisp/leim/quail/indonesian.el ("sundanese"): Fix whitespace.
समीर सिंह Sameer Singh [Thu, 26 May 2022 13:05:00 +0000 (18:35 +0530)]
Add support for the Sundanese script (bug#55686)
* lisp/language/indonesian.el ("Sundanese"): New language environment.
Add composition rules for Sundanese. Add sample text and input
method.
Improve composition rules for Balinese and Javanese.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Sundanese.
* lisp/leim/quail/indonesian.el ("sundanese"): New input method.
* etc/HELLO: Add a Sundanese greeting.
* etc/NEWS: Announce the new language environment and its
input method.
Eli Zaretskii [Sat, 28 May 2022 08:51:15 +0000 (11:51 +0300)]
Fix a bad cross-reference in elisp.pdf
* doc/lispref/control.texi (pcase Macro): Fix a conditional
cross-reference (bug#55689).
Po Lu [Sat, 28 May 2022 08:48:49 +0000 (16:48 +0800)]
Fix dired drag-and-drop for certain Motif programs
* lisp/dired.el (dired-mouse-drag): Announce _DT_NETFILE in
targets list as well.
* lisp/select.el (xselect--encode-string): New arg
`prefer-string-to-c-string'.
(xselect-convert-to-filename): Convert to TEXT instead of
C_STRING, but use STRING if the type would otherwise be
C_STRING.
(xselect-dt-netfile-available-p, xselect-tt-net-file)
(xselect-convert-to-dt-netfile): New functions.
(selection-converter-alist): New selection converter.
Eli Zaretskii [Sat, 28 May 2022 07:55:01 +0000 (10:55 +0300)]
Fix documentation of 'string-pad'
* doc/lispref/strings.texi (Creating Strings): Fix description of
'string-pad'. (Bug#55688)
Stefan Kangas [Sat, 28 May 2022 05:06:30 +0000 (07:06 +0200)]
Merge from origin/emacs-28
d3cde28b03 Fix more occurrences of renamed kmacro-keymap command
bd5c95a90d Mention "unspecified-fg" and "unspecified-bg" in some doc ...
Po Lu [Sat, 28 May 2022 04:35:12 +0000 (04:35 +0000)]
Add more cursor bitmaps on Haiku
* src/haikufns.c (cursor_bitmaps_for_id): Add hourglass cursor.
Po Lu [Sat, 28 May 2022 02:30:45 +0000 (10:30 +0800)]
Improve documentation on what callers of `x-begin-drag' should do
* doc/lispref/frames.texi (Drag and Drop):
* src/xfns.c (Fx_begin_drag): Improve documentation of how the
chosen action should be performed.
Po Lu [Sat, 28 May 2022 02:21:52 +0000 (10:21 +0800)]
Improve documentation of `x-begin-drag'
* src/xfns.c (Fx_begin_drag): Fix typos and improve wording.
Po Lu [Sat, 28 May 2022 02:09:19 +0000 (10:09 +0800)]
Improve safety of various DND callbacks
* src/xterm.c (x_dnd_begin_drag_and_drop): Restore selection
events if DND is no longer in progress and don't call
x-dnd-movement-function.
Po Lu [Sat, 28 May 2022 01:37:29 +0000 (09:37 +0800)]
Fix frame destruction issues and misuse of x_get_atom_name
* src/frame.c (delete_frame): Prevent deleting the dnd frame
while waiting for finish as well.
* src/xselect.c (Fx_get_atom_name): Clean up code and fix
uninitialized use of need_sync.
* src/xterm.c (x_dnd_send_unsupported_drop, x_dnd_send_drop)
(handle_one_xevent): Clean up usage of x_get_atom_name.
(x_get_atom_name): Accept NULL for need_sync.
* src/xterm.h: Update declarations.
Po Lu [Sat, 28 May 2022 01:21:40 +0000 (09:21 +0800)]
; * src/nsselect.m (ns_decode_data_to_pasteboard): Fix GNUstep build.
Po Lu [Sat, 28 May 2022 01:19:33 +0000 (09:19 +0800)]
Fix build on earlier versions of Mac OS X
* src/nsselect.m (ns_decode_data_to_pasteboard): Respect
NS_USE_NSPasteboardTypeFileUrl.
Po Lu [Sat, 28 May 2022 01:18:09 +0000 (09:18 +0800)]
Add file dragging support to NS port
* lisp/dired.el (dired-mouse-drag-files): Document that
`dired-mouse-drag-files' now works on NS.
* lisp/term/ns-win.el (x-begin-drag): Handle FILE_NAME.
* src/nsselect.m (ns_decode_data_to_pasteboard): Handle file URL
type.
(ns_lisp_to_pasteboard, Fns_begin_drag): Handle new type `file'.
Po Lu [Sat, 28 May 2022 01:03:29 +0000 (09:03 +0800)]
Improve DND documentation
* doc/lispref/frames.texi (Drag and Drop):
* src/xfns.c (Fx_begin_drag): Document that x-begin-drag may
return immediately if no mouse buttons are held down.
Po Lu [Sat, 28 May 2022 00:55:13 +0000 (08:55 +0800)]
Fix x_dnd_movement_frame detection on GTK builds
* src/xterm.c (x_dnd_begin_drag_and_drop): Make sure movement
frame is on the correct display.
Po Lu [Sat, 28 May 2022 00:48:29 +0000 (08:48 +0800)]
; * src/xterm.c (x_color_cache_bucket_size): Improve doc string.
Paul Eggert [Fri, 27 May 2022 23:33:25 +0000 (16:33 -0700)]
Remove stray decl of nonexistent var
* src/lisp.h (symbols_with_pos_enabled): Remove decl.
Paul Eggert [Fri, 27 May 2022 19:19:43 +0000 (12:19 -0700)]
decoded-time-set-defaults now leaves DST alone
* lisp/calendar/time-date.el (decoded-time-set-defaults):
Don’t mess with decoded-time-dst (Bug#55635).
Paul Eggert [Fri, 27 May 2022 18:44:34 +0000 (11:44 -0700)]
Fix unlikely null pointer dereference
* src/xselect.c (Fx_get_atom_name): Fix unlikely core dump when
build_string is called on a null pointer. Found by GCC -fanalyzer.
Paul Eggert [Fri, 27 May 2022 18:27:08 +0000 (11:27 -0700)]
Add ATTRIBUTE_DEALLOC to extern functions
This can help static checking. It’s not as important for static
functions, where GCC can figure this stuff out own its own.
* src/sysstdio.h (emacs_fopen): Add ATTRIBUTE_DEALLOC (fclose, 1).
* src/tparam.h (tparam): Add ATTRIBUTE_DEALLOC_FREE.
Include stdlib.h so that ‘free’ is declared.
* src/xterm.h (x_get_atom_name): Add ATTRIBUTE_DEALLOC_FREE.
Paul Eggert [Fri, 27 May 2022 17:50:56 +0000 (10:50 -0700)]
Pacify gcc -Wsuggest-attribute-malloc
* src/xterm.h (x_get_atom_name): Add ATTRIBUTE_MALLOC.
Juri Linkov [Fri, 27 May 2022 16:13:09 +0000 (19:13 +0300)]
Fix navigation in the *Completions* buffer and enable more tests (bug#54374)
* lisp/ido.el: Use first-completion instead of next-completion.
* lisp/minibuffer.el (completion--insert): Put completion--string
text property on prefix and suffix as well.
* lisp/simple.el (first-completion, last-completion): New commands.
(next-completion): Rewrite to fix many bugs reported in
bug#54374, bug#55289, bug#55430.
(choose-completion): Use the text property completion--string that
allows to select a completion when point is on its prefix or suffix.
(switch-to-completions): Use first-completion instead of next-completion,
and last-completion instead of previous-completion.
* test/lisp/minibuffer-tests.el (completion-auto-select-test)
(completion-auto-wrap-test, completions-header-format-test)
(completions-affixation-navigation-test): Uncomment fixed lines.
Eli Zaretskii [Fri, 27 May 2022 15:41:12 +0000 (18:41 +0300)]
Extend 'C-x 8 =' to produce characters with macron
* lisp/international/iso-transl.el (iso-transl-char-map): Add
several new sequences for characters with macron. (Bug#55668)
Stefan Monnier [Fri, 27 May 2022 13:14:40 +0000 (09:14 -0400)]
* lisp/shell.el (shell): Query shell file name from `interactive`
This avoids the use of the brittle `called-interactively-p`
and makes it easier to start a shell buffer running another shell than
your usual one.
Eli Zaretskii [Fri, 27 May 2022 12:07:33 +0000 (15:07 +0300)]
Improve font selection on MS-Windows
The Arial Unicode MS font claims in its USB (Unicode Subset
Bitfields) values support for several scripts for which it
doesn't actually have glyphs. This sometimes caused Emacs to
decide to use Arial Unicode MS for some script, only to
discover later that there are no glyphs for that script's
characters. This change fixes the USB values according to
actual font coverage, as determined by BabelMap.
* src/w32font.c (add_font_entity_to_list): Fix USB values of Arial
Unicode MS font according to its actual coverage of scripts.
Lars Ingebrigtsen [Fri, 27 May 2022 10:38:02 +0000 (12:38 +0200)]
Make make-decoded-time use -1 for dst unless given
* lisp/calendar/time-date.el (make-decoded-time): DST -1 is the
value for "doesn't know", not nil (bug#55635).
Lars Ingebrigtsen [Fri, 27 May 2022 10:17:28 +0000 (12:17 +0200)]
Make package-update-all also refresh the list
* lisp/emacs-lisp/package.el (package-update-all): Also refresh
package list.
Po Lu [Fri, 27 May 2022 09:11:59 +0000 (17:11 +0800)]
Fix GNUstep build
* src/nsterm.h (NSPasteboardNameGeneral): Fix definition.