1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

156919 commits

Author SHA1 Message Date
Richard Hansen
30ec4a7347 ; bindat (strz): Consistent length type check
The strz length computation uses `numberp' to switch between
fixed-length and variable-length modes, so packing should too.
2022-06-01 22:20:49 -04:00
Richard Hansen
e66d6b3793 bindat (strz): Fix off-by-one bug in computed length
* lisp/emacs-lisp/bindat.el (strz): Include null terminator when
computing packed string length.
* test/lisp/emacs-lisp/bindat-tests.el (strz): Mark tests as passing.
2022-06-01 22:18:24 -04:00
Richard Hansen
916492cb6d ; bindat-tests (strz): Add more tests 2022-06-01 22:18:10 -04:00
Po Lu
3b9bbb24eb Fix the GTK build
* src/xterm.c (x_wait_for_cell_change): Don't initialize rfds
on GTK.
2022-06-01 08:57:52 +08:00
Po Lu
5ed566cae0 Improve x_wait_for_cell_change
* src/xterm.c (x_wait_for_cell_change): Keep processing events
while still XPending.
2022-06-01 08:57:08 +08:00
Lars Ingebrigtsen
b1ac48bd7e Note changes in ;;;### parsing 2022-05-31 22:56:21 +02:00
Lars Ingebrigtsen
7d1c44c2b3 Fix the loaddefs updating logic
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Fix the
logic of updating -- we update per loaddefs file.
2022-05-31 22:49:12 +02:00
Lars Ingebrigtsen
71aaa9ac1e Fix yank-in-context--transform after recent reversion
* lisp/simple.el (yank-in-context--transform): Fix call to
comment-region-default-1 after recent reverted patch.
2022-05-31 21:04:59 +02:00
Manuel Giraud
f461eb8fa7 Add a last-modified field when a bookmark is set
* test/lisp/bookmark-tests.el (bookmark-tests-make-record)
(bookmark-tests-make-record-list, bookmark-tests-set): fix tests
to not consider last-modified in bookmark equality.
* lisp/bookmark.el (bookmark-make-record-default): add a
last-modified field.
(bookmark-sort-flag): add the 'last-modified choice.
(bookmark-get-last-modified): new function to get last-modified
bookmark field.
(bookmark-maybe-sort-alist): sort in last-modified first order.
(bookmark-completing-read): use `bookmark-maybe-sort-alist'.
2022-05-31 20:35:39 +02:00
Lars Ingebrigtsen
6a2cc870d2 Revert "Allow commenting out white space lines in latex-mode"
This reverts commit 0870ebb3cb.

This was the wrong way to try to fix this -- see bug#55716.
2022-05-31 20:20:23 +02:00
Lars Ingebrigtsen
89404b4f69 Make partial loaddefs updates work again
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Only update
the loaddefs section for the files that have changed.  This makes
"git pull" (when few/no Lisp files have changed much faster).
2022-05-31 20:08:27 +02:00
Juri Linkov
03b780e387 Fix handling of windows/buffers for non-nil completion-auto-select (bug#55712)
* lisp/minibuffer.el (completion--in-region-1): When completion-auto-select
is `second-tab', call switch-to-completions outside of `with-current-buffer'.
For the case of completion-auto-select customized to t,
move switch-to-completions from completion-setup-function
where it was called inside of with-current-buffer-window.

* lisp/simple.el (completion-setup-function): Move switch-to-completions
for completion-auto-select=t to completion--in-region-1 where it's
handled together with the case of `second-tab'.
(next-completion): Add check for the minibuffer to support in-buffer
inline completions.
2022-05-31 20:52:37 +03:00
Eli Zaretskii
576d750915 Remove unused w32-* variables
* src/w32fns.c (syms_of_w32fns) <w32-bdf-filename-alist>
<w32-strict-fontnames>: Remove unused variables.
2022-05-31 20:28:50 +03:00
Eli Zaretskii
8ebfcff3a6 ; * etc/NEWS: Fix a typo. 2022-05-31 19:19:23 +03:00
Lars Ingebrigtsen
1d4e903417 Speed up generation of loaddefs files
* doc/lispref/loading.texi (Autoload, Autoload by Prefix): Refer
to loaddefs-generate instead of update-file-autoloads.

* lisp/Makefile.in (LOADDEFS): Remove, because all the loaddefs
files are created in one go now.
(COMPILE_FIRST): Add loaddefs-gen/radix-tree, and drop autoload.
($(lisp)/loaddefs.el): Use loaddefs-gen.
(MH_E_DIR, $(TRAMP_DIR)/tramp-loaddefs.el)
($(MH_E_DIR)/mh-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el): Remove.

* lisp/generic-x.el: Inhibit computing prefixes, because the
namespace here is all wonky.

* lisp/w32-fns.el (w32-batch-update-autoloads): Removed -- unused
function.

* lisp/calendar/holidays.el ("holiday-loaddefs"): Renamed from
hol-loaddefs to have a more regular name.

* lisp/cedet/ede/proj-elisp.el (ede-emacs-cedet-autogen-compiler):
Refer to loaddefs-gen instead of autoload.

* lisp/emacs-lisp/autoload.el (make-autoload, autoload-rubric)
(autoload-insert-section-header): Made into aliases of
loaddefs-gen functions.
(autoload--make-defs-autoload): Ditto.
(autoload-ignored-definitions, autoload-compute-prefixes): Moved
to loaddefs-gen.

* lisp/emacs-lisp/lisp-mode.el (lisp-mode-autoload-regexp): New
constant.
(lisp-fdefs, lisp-mode-variables, lisp-outline-level): Use it to
recognize all ;;;###autoload forms.

* lisp/emacs-lisp/loaddefs-gen.el: New file.

* lisp/emacs-lisp/package.el: Use loaddefs-generate instead of
make-directory-autoloads.

* test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads):
Use loaddefs instead of autoloads.
2022-05-31 18:08:33 +02:00
Po Lu
41a2def162 Convert FILE_NAME to refs on Haiku instead of text/uri-list
* lisp/term/haiku-win.el (haiku-dnd-selection-converters): Use
more appropriate target for file names.
(haiku-dnd-convert-uri-list): Delete function.
(haiku-dnd-convert-file-name): New function.  Also handle remote
file names.
2022-05-31 13:32:41 +00:00
Eli Zaretskii
0a7bd8c07c Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-05-31 16:19:44 +03:00
Po Lu
e10d10a3e3 Add missing part of recent changes to NS DND support
* lisp/term/ns-win.el (x-begin-drag): Implement `return-frame'
argument.
2022-05-31 21:14:16 +08:00
समीर सिंह Sameer Singh
f1e21a0341 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.
2022-05-31 16:12:59 +03:00
Po Lu
90957dfb7a 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.
2022-05-31 20:56:55 +08:00
Stefan Kangas
dea1a502ef * lisp/play/handwrite.el: Minor doc fixes. 2022-05-31 14:34:32 +02:00
Antonio Ruiz
f0361c225c 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
2022-05-31 13:28:43 +02:00
Po Lu
fbe7ac16d7 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.
2022-05-31 18:18:52 +08:00
Po Lu
f8d07fbeb3 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2022-05-31 18:06:15 +08:00
Po Lu
2021835326 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.
2022-05-31 18:05:41 +08:00
Po Lu
7263b10efb 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.
2022-05-31 16:40:57 +08:00
Paul Eggert
a55a0483c9 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
0614e0f3e9 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
569d4c7ad6 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
c4da5db04b Pacify GCC 12 in Fmove_overlay
* src/buffer.c (Fmove_overlay): Use BASE_EQ, not EQ.
This pacifies GCC 12 -Wanalyzer-null-dereference.
2022-05-31 01:26:47 -07:00
Paul Eggert
1f6973241a 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
920f1e68b8 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
13dac6f3e9 Pacify GCC 12 false positive in ccl.c
* src/ccl.c: Suppress -Wanalyzer-use-of-uninitialized-value
in GCC 12 or later.
2022-05-31 01:26:47 -07:00
Paul Eggert
30966a6e67 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
82c05c034e 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
877be9098e 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.
2022-05-31 01:26:47 -07:00
Paul Eggert
a1c19dfca4 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.
2022-05-31 01:26:47 -07:00
Po Lu
d94890404e 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.
2022-05-31 16:25:20 +08:00
Po Lu
b7bbf88642 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.
2022-05-31 13:24:27 +08:00
Po Lu
75bf80e2b1 Fix unused variables on GTK
* src/xterm.c (x_wait_for_cell_change): Fix unused variables
on GTK builds.
2022-05-31 10:17:12 +08:00
Po Lu
dae936f504 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.
2022-05-31 10:15:29 +08:00
Po Lu
81b174cace 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.
2022-05-31 08:47:30 +08:00
Lars Ingebrigtsen
7b646e972c Regenerated ldefs-boot.el 2022-05-30 21:40:37 +02:00
Eli Zaretskii
c9e5e79ac2 Fix 'debug-timer-check' on MS-Windows
* src/w32proc.c (w32_raise): New function.
* src/atimer.c (raise) [WINDOWSNT]: Redirect to 'w32_raise'.
2022-05-30 20:51:19 +03:00
Juri Linkov
4132223d89 * 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).
2022-05-30 19:30:54 +03:00
Mattias Engdegård
b903507b36 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.
2022-05-30 15:56:59 +02:00
Mattias Engdegård
169797a300 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).
2022-05-30 15:52:02 +02:00
Eli Zaretskii
78e8893f5d 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)
2022-05-30 15:58:38 +03:00
समीर सिंह Sameer Singh
004e6ae3f4 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.
2022-05-30 15:43:35 +03:00
Po Lu
774880c84c 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.
2022-05-30 18:09:41 +08:00