Yuan Fu [Wed, 28 Aug 2024 05:31:42 +0000 (22:31 -0700)]
Add Ftreesit_grammar_location
* src/treesit.c (treesit_loaded_lang): New struct.
(treesit_load_language): Return a struct instead of just the language
object. The struct contains both the language object and the path to
the shared library.
(Ftreesit_language_available_p, Ftreesit_language_abi_version)
(treesit_ensure_query_compiled, Ftreesit_parser_create): Update
call of treesit_load_language.
(Ftreesit_grammar_location): New function.
Martin Rudalics [Wed, 11 Sep 2024 08:36:14 +0000 (10:36 +0200)]
For minibuffer windows record minibuffers only (Bug#72487)
* src/minibuf.c (zip_minibuffer_stacks): Use wset type
functions. Call 'record-window-buffer' instead of
'push-window-buffer-onto-prev' to handle all sorts of buffers
shown in minibuffer windows in a uniform way.
(read_minibuf): Call 'record-window-buffer' instead of
'push-window-buffer-onto-prev' for same reason as previous.
* lisp/calculator.el (calculator-update-display)
(calculator-save-and-quit): Make sure calculator buffer is live
before operating on it.
* lisp/window.el (record-window-buffer): Handle case where
WINDOW is a minibuffer window: Unconditionally remove WINDOW's
buffer from WINDOW's list of previous buffers and push it if
and only if it is a live minibuffer (Bug#72487). Do not run
'buffer-list-update-hook' if WINDOW is a minibuffer window.
(push-window-buffer-onto-prev): Make it an alias of
'record-window-buffer' so it will run the latter's checks.
(replace-buffer-in-windows): Handle minibuffer windows and
rewrite doc-string accordingly.
* doc/lispref/windows.texi (Buffers and Windows): Explain
handling of minibuffer windows in 'replace-buffer-in-windows'.
fpi [Wed, 28 Aug 2024 16:33:20 +0000 (18:33 +0200)]
Allow comments to organizer in icalendar event replies (Bug#72831)
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event--build-reply-event-body): Add optional COMMENT
argument to be inserted into the reply.
(gnus-icalendar-event-reply-from-buffer): Add COMMENT argument to be
passed through to gnus-icalendar-event--build-reply-event-body
(gnus-icalendar-reply-accept, gnus-icalendar-reply-tentative,
gnus-icalendar-reply-decline): If interactively called with a prefix
argument ask user for a COMMENT to add to the reply.
* test/lisp/gnus/gnus-icalendar-tests.el
(gnus-icalendar-accept-with-comment,
gnus-icalendar-decline-without-changing-comment): New tests.
Yuan Fu [Wed, 11 Sep 2024 02:29:31 +0000 (19:29 -0700)]
Fix heex-ts-mode indentation following previews elixir-mode change
After the previous fix in elixir-ts-mode (0fd259d166c), embedded heex
code are indented like this:
1 defmodule Foo do
2 def foo(assigns) do
3 ~H"""
4 <span>
5 text
6 </span>
7 """
8 end
9 end
The indent rule finds the beginning of the parent heex node, and uses
the indentation of that line as anchor with an offset of 0. Previously
the parent heex node (fragment) starts at EOL of line 3; after the
previous commit, it now starts at BOL of line 4. To fix the
indentation, I changed the anchor to the beginning of the elixir
(rather than heex) node at point, which is at EOL at line 3.
* lisp/progmodes/heex-ts-mode.el (heex-ts--indent-rules): Use the elixir
node that contains the heex code as the anchor, instead of the heex root
node.
Eli Zaretskii [Tue, 10 Sep 2024 12:14:47 +0000 (15:14 +0300)]
Fix use of Uniscribe font driver in MinGW build
This was inadvertently broken when Windows 9X support was
fixed in June 2024.
* src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper): Set
'uniscribe_available' non-zero in non-Cygwin builds. (Bug#73159)
eglot-test-rust-completion-exit-function: Fix failure in -Q session
* test/lisp/progmodes/eglot-tests.el (eglot--call-with-fixture):
Check for buffer liveness (https://debbugs.gnu.org/72765#29).
(eglot-test-rust-completion-exit-function): Don't expect snippet
expansion to happen (no yasnippet in batch mode).
Yuan Fu [Mon, 9 Sep 2024 00:28:26 +0000 (17:28 -0700)]
Fix elixir-ts-mode's range query
* lisp/progmodes/elixir-ts-mode.el:
(elixir-ts--treesit-range-rules): Add underscore in front of the name
capture, so Emacs won't put heex parser on it.
Eli Zaretskii [Sun, 8 Sep 2024 16:17:48 +0000 (19:17 +0300)]
Fix :type of some user options
* lisp/which-key.el:
* lisp/progmodes/python.el:
* lisp/play/animate.el:
* lisp/pixel-scroll.el:
* lisp/image/image-dired.el:
* lisp/htmlfontify.el: Change :type of user options from 'float'
to 'number' where integer values make sense. (Bug#73098)
Eli Zaretskii [Sat, 7 Sep 2024 15:38:40 +0000 (18:38 +0300)]
; Improve documentation of 'suspend-emacs'
* doc/lispref/os.texi (Suspending Emacs):
* src/keyboard.c (Fsuspend_emacs): Document possible failures
in sending STUFFSTRING to the shell. (Bug#73100).
Support for custom php.ini for the built-in PHP web server.
A new CONFIG attribute, which defaults to 'php-ts-mode-php-config',
allows an alternative php.ini file to be specified for the built-in web
server. The 'php-ts-mode-run-php-webserver' function, when called
interactively with a prefix argument, also requires this new attribute.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--parent-html-bol):
Fix docstring.
* lisp/progmodes/php-ts-mode.el (php-ts-mode-run-php-webserver):
New CONFIG attribute. Update docstring.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--webserver-read-args):
Support the new TYPE. Update docstring. (Bug#72966)
Eli Zaretskii [Sat, 7 Sep 2024 09:17:24 +0000 (12:17 +0300)]
Fix 'chart-space-usage' on MS-Windows
* lisp/emacs-lisp/chart.el (chart--file-size)
(chart--directory-size): New functions.
(chart-space-usage): Invoke 'du' correctly on MS-Windows. Provide
alternative implementation in Lisp when 'du' is not installed,
using 'chart--directory-size' and 'chart--file-size'. (Bug#72919)
Eli Zaretskii [Sat, 7 Sep 2024 08:27:03 +0000 (11:27 +0300)]
Fix alignment and documentation of vtable.el
* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Ensure
proper alignment between the columns in header-line and in the
body of the table. (Bug#73032)
* doc/misc/vtable.texi (Making A Table): Document the defaults of
the various keyword parameters.
Eli Zaretskii [Sat, 7 Sep 2024 08:15:43 +0000 (11:15 +0300)]
Remove low-level keyboard hook when attaching GDB to Emacs on Windows
This fixes the problem whereby attaching GDB to a running Emacs
on MS-Windows would slow down keyboard input, because the
low-level keyboard hook installed by Emacs at startup was still
installed, but with Emacs stopped, the hook code couldn't run,
and therefore the OS would time-out waiting for the hook to
return. Now when GDB is attached to Emacs, it will remove the
hook right away.
* src/.gdbinit: Call 'remove_w32_kbdhook' if the keyboard hook is
already installed.
* src/alloc.c (defined_WINDOWSNT): New enum.
(gdb_make_enums_visible): Add 'defined_WINDOWSNT'.
Eli Zaretskii [Sat, 7 Sep 2024 07:42:01 +0000 (10:42 +0300)]
Fix multisession.el when SQLite becomes unavailable
This is for the case when the user customizes multisession
to use SQLite, but then built-in SQLite support becomes
unavailable for some reason (e.g., upgrade the OS).
* lisp/emacs-lisp/multisession.el (multisession-backend-value)
(multisession--backend-set-value, multisession--backend-values)
(multisession--backend-delete): Call next method if built-in
SQLite support is not available. Suggested by Stefan Monnier
<monnier@iro.umontreal.ca>. (Bug#72788)
F. Jason Park [Mon, 12 Aug 2024 04:55:32 +0000 (21:55 -0700)]
Fix discrepancies in auth-source-pass vs netrc behavior
The option `auth-source-pass-extra-query-keywords' aims to make its
back end hew as close to the other built-in ones as possible, except
WRT features not yet implemented, such as arbitrary "attribute"
retrieval and new entry creation. This change only concerns behavior
exhibited when the option is enabled.
* lisp/auth-source-pass.el (auth-source-pass--match-parts): Account
for the case in which a query lacks a reference parameter for a
`:port' or `:user' but still requires one or both via the `:require'
keyword. Previously, such a query would fail even when an entry met
this requirement by simply specifying a field with any non-null value
corresponding to the required parameter.
(auth-source-pass--find-match-many): Account for the baseline case
where a matching entry lacks a secret and the user doesn't require
one. Although this function doesn't currently return so-called
"attributes" from the contents of a matching decrypted file, were it
to eventually, this case would no longer be academic.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-extra-query-keywords--req-noparam-miss-netrc)
(auth-source-pass-extra-query-keywords--req-noparam-miss)
(auth-source-pass-extra-query-keywords--req-param-netrc)
(auth-source-pass-extra-query-keywords--req-param): New tests.
(auth-source-pass-extra-query-keywords--netrc-baseline): New test
asserting behavior of netrc backend when passed a lone `:host' as a
query parameter.
(auth-source-pass-extra-query-keywords--baseline): Reverse expected
outcome to match that of the netrc reference implementation.
(bug#72441)
Several users have asked me for a command which is just
find-file, but starting from the project root. In large
projects, where project-files is expensive, this will have
substantially better performance than project-find-file.
Also, it allows opening files which aren't included in
project-files without paying the further cost of running
project--files-in-directory (which is what happens when passing
INCLUDE-ALL=t to project-find-file).
Also, it may help with user confusion about why
project-find-file doesn't behave like find-file (which I've
encountered a few times).
This command is equivalent to C-x p o C-x C-f, but it's nice to
be able to bind it to a specific key.
Overall, this is easy enough to provide, so let's just do that.
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'.