Commit graph

174856 commits

Author SHA1 Message Date
Mattias Engdegård
f47297782b ; * doc/lispref/searching.texi (Rx Notation): Simplify rx example 2024-09-09 15:22:32 +02:00
Eli Zaretskii
03e5698167 Clarify the semantics of 'string-pixel-width'
* doc/lispref/display.texi (Size of Displayed Text):
* lisp/emacs-lisp/subr-x.el (string-pixel-width):
* src/xdisp.c (Fwindow_text_pixel_size, Fbuffer_text_pixel_size):
Doc fixes.  (Bug#73129)
2024-09-09 14:28:12 +03:00
Eli Zaretskii
9f0603207b ; * src/treesit.c: Minor cleanups of recent changes. 2024-09-09 14:03:15 +03:00
Mattias Engdegård
21ff61372b * etc/emacs_lldb.py (Lisp_Object): Recognise Lisp_Sub_Char_Table 2024-09-09 10:30:02 +02:00
Mattias Engdegård
87daaaf9a4 Speed up LLDB support for debugging Emacs
* etc/emacs_lldb.py (Lisp_Object):
Perform some numeric operations in Python instead of invoking LLDB
for evaluation.  Add lots of caches.
2024-09-09 10:30:02 +02:00
Mattias Engdegård
95371fa754 ; * lisp/emacs-lisp/chart.el (chart--directory-size): Simpler regexp
The empty regexp matches any string.
2024-09-09 10:30:02 +02:00
Mattias Engdegård
9a1de38528 ; * src/json.c: refactor: clean out development detritus
* src/json.c (enum ParseEndBehavior): Remove.
(json_parse): Simplify, moving most code to the callers.
2024-09-09 10:30:02 +02:00
Andrea Corallo
e0d3f74395 * src/treesit.c (treesit_debug_print_parser_list): Fix format string. 2024-09-09 09:09:48 +02:00
Yuan Fu
bed38ded73
; * src/treesit.c (treesit_debug_print_parser_list): Fix formatting. 2024-09-08 21:14:00 -07:00
Yuan Fu
18c6487dbd
; * src/treesit.c: Add a prototype so there's no warning about it. 2024-09-08 21:04:29 -07:00
Yuan Fu
bf23382f1f
Read more on each call to treesit's buffer reader
* src/treesit.c (treesit_read_buffer): Read until the gap or visible
end, instead of reading a single char.
2024-09-08 20:52:20 -07:00
Yuan Fu
3435464452
Fix the range handling in treesit.c
1. In treesit_sync_visible_region, reduce the ranges for a parser so it
doesn't go beyond the visible range.

2. To avoid possible infinite recursion, add a within_reparse field to
parsers.  Previously we were using the need_reparse field to avoid
infinite recursion, but lisp programs in a parser's after change hook
might make some buffer edit which turns need_reparse to true. To avoid
that, we now use an explicit field.  If a parser's after change function
makes a buffer edit, lisp program ends up with a desynced parse tree,
but that's better than possible infinite recursion.  Also after change
function shouldn't edit the buffer.

3. In treesit_make_ranges, use parser's visible_beg instead of buffer's
BEGV.  I mean technically whenever we make ranges, buffer's BEGV should
be equal to parser's visible_beg, but better not take that uncertainty,
also makes the code more readable.

4. In Ftreesit_parser_included_ranges, move visible region sync code
before the body of the function.

* src/treesit.c (treesit_sync_visible_region): Minimally fix ranges so
it doesn't exceed parser's visible range.
(treesit_call_after_change_functions): Update calling sigature to
treesit_make_ranges.
(treesit_ensure_parsed, make_treesit_parser): Use the new field
within_reparse.
(treesit_make_ranges): Use parser's visible_beg instead of buffer's
BEGV.
(Ftreesit_parser_included_ranges): Move visible region check before
function body.
* src/treesit.h (Lisp_TS_Parser): Add new field within_reparse.
2024-09-08 20:52:20 -07:00
Yuan Fu
3fcec09f75
Add debugging function for treesit.c
* src/treesit.c (treesit_debug_print_parser_list): New function.
2024-09-08 20:52:20 -07:00
Yuan Fu
0fd259d166
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.
2024-09-08 20:52:20 -07:00
Dmitry Gutov
2329b36b1f ; project-files-relative-names: Update docstring (bug#72701) 2024-09-09 00:00:45 +03:00
Mattias Engdegård
e55e2e1c6b Make json-serialize always return a unibyte string (bug#70007)
The JSON format is defined as a byte sequence and will always be used as
such, so returning a multibyte string makes little sense.

* src/json.c (json_out_to_string): Remove.
(Fjson_serialize): Return unibyte string.
* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/roundtrip-scalars, json-serialize/string):
Update tests.
* doc/lispref/text.texi (Parsing JSON): Document.
* etc/NEWS: Announce.
2024-09-08 20:02:34 +02:00
Eli Zaretskii
4073c62437 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)
2024-09-08 19:17:48 +03:00
Eli Zaretskii
8081c08ff1 ; Update NEWS for last change. 2024-09-08 09:46:42 +03:00
Vincenzo Pupillo
bb23984167 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)
2024-09-08 09:46:02 +03:00
Eli Zaretskii
2ce0d397b1 Improve diagnostic of type mismatch in 'setopt'
* lisp/cus-edit.el (setopt--set): Name the variable in the warning
message.  (Bug#73084)

* test/lisp/cus-edit-tests.el (test-setopt): Adjust test.
2024-09-08 09:19:34 +03:00
Dmitry Gutov
79805652af ; Edit the latest NEWS entry 2024-09-08 05:14:02 +03:00
James Thomas
2aef1acc4d Keep local keymap out of vc-git-stash-get-at-point
* lisp/vc/vc-git.el (vc-git-stash-get-at-point):
Return the substring without text properties (bug#72768).
2024-09-08 05:11:02 +03:00
Eli Zaretskii
89c99891b2 ; * doc/lispref/os.texi (Suspending Emacs): Fix last change. 2024-09-07 19:41:36 +03:00
Eli Zaretskii
4f044d0d3d ; 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).
2024-09-07 18:38:40 +03:00
Eli Zaretskii
6dcd3d2404 Merge from origin/emacs-30
b420e149b1 Fix a typo in ediff-init.el
e1304e9b1b Fix 'chart-space-usage' on MS-Windows
04c44405bf Fix alignment and documentation of vtable.el
4d6fadb8d2 ; * lisp/which-key.el: Fix ':package-version' (bug#73072).
54071b9cef ; Improve doc strings of 'tab-bar-mode' and 'tab-line-mode'
87a8b12a0c Fix test failure in erc-networks-tests
dad0935cfc ; * doc/emacs/building.texi (Lisp Libraries): Update (bug...
e4dc6711b0 Fix :hook in 'use-package'
c1cd036d27 ; * doc/lispref/modes.texi (Mode Line Data): Fox wording.
ae2463796f ; Caveats about using :eval in 'mode-line-format'
4047072c7d Update FSF's address
24f12bdd77 Support the new option in ruby-ts-mode too
6c15b7710d Add new option ruby-bracketed-args-indent
7799ef4335 Fix Rmail base64 and qp decoding of MIME payloads
0def396fa8 Update to Org 9.7.11
8c044bd972 ; Fix recent changes in documentation
e0d8879bcd * test/lisp/emacs-lisp/tabulated-list-tests.el: Add missi...
4ff4b78f92 ; Small doc fixes
da980ad838 ; Reword some "allows Xing"
2ca7d5649c ; More accurate text about how `equal` compares various o...

# Conflicts:
#	etc/NEWS
2024-09-07 06:25:15 -04:00
Eli Zaretskii
b420e149b1 Fix a typo in ediff-init.el
* lisp/vc/ediff-init.el (ediff-nonempty-string-p): Fix typo.
Reported by Jurgen De Backer
<jurgen.de-backer.ext@eurocontrol.int> (bug#73042).
2024-09-07 12:41:29 +03:00
Eli Zaretskii
e1304e9b1b 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)
2024-09-07 12:17:24 +03:00
Eli Zaretskii
04c44405bf 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.
2024-09-07 11:27:03 +03:00
Eli Zaretskii
358208dfaa 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'.
2024-09-07 11:15:43 +03:00
Eli Zaretskii
e2154c6376 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)
2024-09-07 10:42:01 +03:00
F. Jason Park
80228d1f6e 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)
2024-09-06 16:02:12 -07:00
Eli Zaretskii
6cc87d07dd ; * lisp/progmodes/project.el (project-find-file-in-root): Doc fix. 2024-09-06 20:43:33 +03:00
Spencer Baugh
d879c40f68 * etc/NEWS: Mention it.
Add project-find-file-in-root (bug#73044)

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.

* lisp/progmodes/project.el (project-find-file-in-root): Add.

* etc/NEWS: Mention it.
2024-09-06 19:16:46 +03:00
Eli Zaretskii
4d6fadb8d2 ; * lisp/which-key.el: Fix ':package-version' (bug#73072). 2024-09-06 19:02:50 +03:00
Eli Zaretskii
658715c977 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'.
2024-09-06 09:34:20 +03:00
Eli Zaretskii
266e321d96 Revert "Fix MinGW build broken by recent update from Gnulib"
This reverts commit b737c6125d.
It is no longer needed with the introduction of nt/inc/signal.h.
2024-09-06 09:24:56 +03:00
Eli Zaretskii
e218d09087 Revert "; Fix last change in lib/sig2str.h."
This reverts commit 91e7b47d6c.
It is no longer needed with the introduction of nt/inc/signal.h.
2024-09-06 09:24:30 +03:00
Eli Zaretskii
42da79c075 Revert "; Another fix for str2sig.h"
This reverts commit df57e44a08.
It is no longer needed with introduction of nt/inc/signal.h.
2024-09-06 09:23:55 +03:00
Eli Zaretskii
54071b9cef ; Improve doc strings of 'tab-bar-mode' and 'tab-line-mode'
* lisp/tab-line.el (tab-line-mode):
* lisp/tab-bar.el (tab-bar-mode): Doc fixes (bug#73049)
2024-09-05 22:09:40 +03:00
Ulrich Müller
87a8b12a0c Fix test failure in erc-networks-tests
* test/lisp/erc/erc-networks-tests.el
(erc-networks--id-sort-buffers): Make sure that buffers have
different timestamps.  (Bug#73036)
2024-09-05 10:19:45 +02:00
Eli Zaretskii
dad0935cfc ; * doc/emacs/building.texi (Lisp Libraries): Update (bug#72961). 2024-09-05 09:23:23 +03:00
Eli Zaretskii
df57e44a08 ; Another fix for str2sig.h 2024-09-05 08:38:16 +03:00
Eli Zaretskii
91e7b47d6c ; Fix last change in lib/sig2str.h. 2024-09-05 08:26:00 +03:00
Eli Zaretskii
b737c6125d 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.
2024-09-05 08:20:59 +03:00
Po Lu
73367ea5c1 Better port to Android 35
* java/INSTALL: Don't refer users to build-tools 33.0.x.

* java/res/values-v35/styles.xml: New dark theme; define status
bar colors properly for this release.
2024-09-05 10:47:51 +08:00
Po Lu
1a13c5e63e ; Update from Gnulib
* configure.ac:

* src/conf_post.h: Remove workarounds now rendered redundant by
Gnulib.
2024-09-05 08:45:18 +08:00
Eli Zaretskii
e4dc6711b0 Fix :hook in 'use-package'
* lisp/use-package/use-package-core.el
(use-package-handler/:hook): Support mode variables in :hook
declarations.  (Bug#72993)
2024-09-04 20:43:25 +03:00
Eshel Yaron
a13eef1fae
New variable 'completion-preview-overlay-priority'
* lisp/completion-preview.el: Update commentary.
(completion-preview-overlay-priority): New variable.
(completion-preview--make-overlay): Use it.  (Bug#72762)
2024-09-04 18:24:42 +02:00
Eli Zaretskii
c1cd036d27 ; * doc/lispref/modes.texi (Mode Line Data): Fox wording. 2024-09-04 17:14:25 +03:00
Po Lu
2847106f3b 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/EmacsActivity.java (onCreate): Restore
pre-SDK 35 inset-relative placement.

* 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.
2024-09-04 17:24:34 +08:00