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'.
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)