Eli Zaretskii [Fri, 6 Sep 2024 06:34:20 +0000 (09:34 +0300)]
Rework fix of MinGW build due to Gnulib update
This commit finishes the rework started by reverting changes
to lib/sig2str.h, by adding Emacs-private additions to
signal.h.
* nt/inc/signal.h: New file, defines SIG2STR_MAX and
prototypes of 'sig2str' and 'str2sig'.
Eli Zaretskii [Tue, 3 Sep 2024 14:33:28 +0000 (17:33 +0300)]
; Caveats about using :eval in 'mode-line-format'
* doc/lispref/modes.texi (Mode Line Data): Warn against more
infinite-recursion cases in ':eval' in mode line. Reported by
Nicolas P. Rougier <nicolas.rougier@inria.fr>.
Aaron Jensen [Sat, 31 Aug 2024 23:31:20 +0000 (19:31 -0400)]
Add new option ruby-bracketed-args-indent
* lisp/progmodes/ruby-mode.el (ruby-bracketed-args-indent): New option.
(ruby-smie-rules): Use it (bug#60321).
* test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb:
New file.
* test/lisp/progmodes/ruby-mode-tests.el: Use it for new case.
Eli Zaretskii [Mon, 2 Sep 2024 14:14:29 +0000 (17:14 +0300)]
Fix Rmail base64 and qp decoding of MIME payloads
* lisp/mail/rmailmm.el (rmail-mime-insert-decoded-text)
(rmail-mime-insert-html): Remove ^M characters left from DOS EOLs.
This is what 'rmail-decode-region' does for non-MIME messages.
Sean Whitton [Sun, 1 Sep 2024 10:20:25 +0000 (11:20 +0100)]
; Reword some "allows Xing"
* doc/emacs/anti.texi (Antinews):
* etc/NEWS:
* etc/NEWS.29:
* lisp/tab-bar.el (tab-bar-select-restore-windows):
* lisp/vc/vc-git.el (vc-git-print-log-follow): Reword to avoid
"allows Xing". This is reported to be better for non-native
readers. Based on suggestions of Eli Zaretskii <eliz@gnu.org>.
Eli Zaretskii [Thu, 5 Sep 2024 05:20:59 +0000 (08:20 +0300)]
Fix MinGW build broken by recent update from Gnulib
Gnulib moved the prototypes of 'sig2str' and 'str2sig' from
sig2str.h to signal.h, but MinGW does not use the Gnulib
signal.h header, and doesn't have these functions in its
own signal.h.
* lib/sig2str.h (SIG2STR_MAX, sig2str, str2sig): Define and
prototype if not already defined.
Po Lu [Wed, 4 Sep 2024 09:24:34 +0000 (17:24 +0800)]
Port to Android 35
* configure.ac: Temporary workaround for Gnulib bug. Verify
that the provided android.jar corresponds to Android 35, or any
later version.
* cross/ndk-build/Makefile.in (NDK_BUILD_SO_LDFLAGS): New
variable.
* cross/ndk-build/ndk-resolve.mk
(NDK_LOCAL_A_NAMES_$(LOCAL_MODULE)): Define to
NDK_BUILD_SO_LDFLAGS by default to enable building binaries
with support for 16 kb page sizes.
* java/AndroidManifest.xml.in: Target SDK 35.
* java/INSTALL (16KB PAGE SIZES): New section. Replace
references to Android 34 with 35.
* java/org/gnu/emacs/EmacsFillPolygon.java (perform): Suppress
deprecation warnings, and document why.
* m4/ndk-build.m4 (ndk_INIT, ndk_LATE): Check for and enable
toolchain support for 16 KB page sizes, if available.
(ndk_CONFIG_FILES): Export linker options so derived.
* src/conf_post.h [__ANDROID_API__ < 35]: Include system time.h
and redefine timezone_t to rpl_timezone_t, so that the Gnulib
replacement may not conflict with the useless OS type.
Juri Linkov [Sun, 1 Sep 2024 17:02:12 +0000 (20:02 +0300)]
* lisp/progmodes/js.el: Improve sexp navigation in js-ts-mode (bug#72573)
(js--treesit-sexp-nodes): Add "template_string", "template_substitution",
"property_identifier".
(js-ts-mode): Replace "template_string" with "string_fragment"
in 'text' part of 'treesit-thing-settings'.
Stefan Kangas [Mon, 22 Jul 2024 16:23:01 +0000 (18:23 +0200)]
Fix integer overflow when reading XPM
* src/image.c (xpm_str_to_int): New function.
(xpm_load_image): Replace sscanf with strtol, to correctly handle
integer overflow when reading a malformed XPM file. (Bug#72245)
Stefan Kangas [Sun, 1 Sep 2024 09:29:36 +0000 (11:29 +0200)]
Fix broken use-package tests
* lisp/use-package/use-package-core.el (use-package-keywords): Change
keyword order to match the one before adding :pin, :ensure, :delight,
and :diminish directly to this list. This fixes some broken unit tests.
Better ad-hoc Emacs release of symbol introduction override
The file etc/symbol-releases.eld now contains explicit version
information for selected symbols that our NEWS* scraper doesn't
resolve correctly.
* etc/NEWS.unknown: Remove this file, replaced with...
* etc/symbol-releases.eld: ...this new file.
* lisp/help-fns.el (help-fns--first-release-override)
(help-fns--mention-first-function-release)
(help-fns--mention-first-variable-release): New.
(help-fns--mention-first-release): Try the override information first
before scraping the NEWS* files.
xenodium [Tue, 27 Aug 2024 08:36:56 +0000 (09:36 +0100)]
Adds NSSpeechRecognitionUsageDescription to Info.plist.in
Without this, we cannot launch processes that use macOS's
speech recognition APIs.
With NSSpeechRecognitionUsageDescription in place, macOS displays the
dialog asking the user to grant permission and allows the speech APIs
to be used from the process.
* nextstep/templates/Info.plist.in: Add
NSSpeechRecognitionUsageDescription key. (Bug#72827)
Evgenii Klimov [Thu, 29 Aug 2024 22:36:12 +0000 (23:36 +0100)]
Make 'python-shell--with-environment' respect buffer-local vars
* lisp/progmodes/python.el (python-shell--with-environment):
Make `with-temp-buffer' respect buffer-local values of
`process-environment' and `exec-path', if set. (Bug#72849)
kobarity [Sat, 24 Aug 2024 11:13:16 +0000 (20:13 +0900)]
Make Python skeletons available in 'python-ts-mode' as well
* lisp/progmodes/python.el (python-base-mode-abbrev-table):
Renamed from 'python-mode-abbrev-table' to be available for both
'python-mode' and 'python-ts-mode'. (Bug#72298)
Eli Zaretskii [Sat, 31 Aug 2024 09:12:00 +0000 (12:12 +0300)]
Improve 'C-h o' in NEWS files
* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common):
Modify syntax-table of NEWS modes to consider ' as string-quoting
character. Suggested by Visuwesh <visuweshm@gmail.com>.
(Bug#72757)
David Ponce [Thu, 22 Aug 2024 14:56:11 +0000 (16:56 +0200)]
Use 'with-work-macro' in 'string-pixel-width'
Tweak the implementation of 'string-pixel-width' to run
faster and use less memory. Also cater for the case where
this function is called in parallel (bug#72689).
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Use
`with-work-macro'. Prefer `remove-text-properties' to
`propertize' to avoid creating a new string on each call.
David Ponce [Thu, 22 Aug 2024 14:56:11 +0000 (16:56 +0200)]
New macro `with-work-buffer'.
* lisp/emacs-lisp/subr-x.el (work-buffer--list)
(work-buffer-limit): New variables.
(work-buffer--get, work-buffer--release): New function.
(with-work-buffer): New macro. (Bug#72689)
Jim Porter [Sun, 25 Aug 2024 18:37:44 +0000 (11:37 -0700)]
Add manual tests for the 'min-width' display property
* test/manual/redisplay-testsuite.el (test-redisplay-5): Add some
newlines.
(test-redisplay-6): New function...
(test-redisplay): ... call it (bug#72721).
'xwidget-open' wrongly assumed the the text-property at
min-position is an xwidget, if it exists; the fix is just
returning nil if the text-property isn't an xwidget.
* lisp/xwidget.el (xwidget-at): Use 'ignore-errors'. (Bug#72848)
Eli Zaretskii [Thu, 29 Aug 2024 09:56:27 +0000 (12:56 +0300)]
Fix rare segfaults due to freed fontsets
* src/xfaces.c (recompute_basic_faces): Force complete
recalculation of non-ASCII faces and their fontsets if any
non-ASCII faces are in the frame's face cache. (Bug#72692)
This binding dates back at least to 2004 (where we bound
`after-change-functions` instead). Maybe it had a real impact in the past,
but nowadays I can't see any effect other than maybe a negligible
performance improvement at the cost at breaking some uses of
`before-after-change-functions`.
Yuan Fu [Tue, 27 Aug 2024 02:43:00 +0000 (19:43 -0700)]
More consistent treesit-forward-sexp around comments (bug#72525)
* lisp/treesit.el (treesit-forward-sexp): Check if point is strictly
inside a comment or string, only then use the default forward-sexp
function; otherwise use tree-sitter's forward-sexp routine.
Yuan Fu [Mon, 26 Aug 2024 00:59:51 +0000 (17:59 -0700)]
Fix tree-sitter local parser overlay cleanup routine
Sorry for sneaking in a sizable commit so late. But I just found out
about this bug and it has to be fixed. Before this change, we weren't
properly cleaning up overlays that store local parsers. And in the case
of doxygen local parser in C files, the doxygen local parser overlay
sometimes bleeds out of comments and into other code, and interferes
with font-lock and indentation.
This commit adds a cleanup function that'll cleanup any overlays that
aren't being used. I tested with doxygen in C files and everything
works smoothly now, including tricky tests like removing the ending "*/"
of a doxygen comment and adding it back.
The idea is simple, at the end of each call to (treesit-update-ranges
BEG END), we remove any overlay within BEG and END that wasn't touched
by the range setting code.
* lisp/treesit.el (treesit--cleanup-local-range-overlays): New function.
(treesit--update-ranges-local): Remove code for cleaning up zero-length
overlays since we have the cleanup function now.
(treesit-update-ranges): Wrap the function body inside a let form, which
defines modified-tick; and add a call to
treesit--cleanup-local-range-overlays at the very end.
Stefan Monnier [Mon, 26 Aug 2024 15:26:11 +0000 (11:26 -0400)]
(pp): Indent lines right when starting in col > 0
This refines the fix for bug#72561: commit 0a500193087e fixes
the bug by changing `ert--pp-with-indentation-and-newline`,
but it turns out that `pp` was inconsistent (it sometimes
indented the subsequent lines correctly and sometimes not,
depending on the current-buffer's major mode).
So the fix really should be in `pp`, which is what this patch does.
* lisp/emacs-lisp/pp.el (pp): Appropriately indent subsequent lines
if the first line is not inserted in column 0 (tho only when
printing into a buffer since otherwise it's somewhere between
ill-defined and impossible to implement).
* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Remove the indentation code after `pp` which was just working
around the bug in `pp`. Also remove the redundant addition of
`\n` since `pp` always does it nowadays.
* test/lisp/help-mode-tests.el (help-mode-tests-xref-on-pp):
Fix thinko.