Commit graph

179570 commits

Author SHA1 Message Date
Andrea Corallo
e1228154e1 Make native lisp code reflect EQ C implementation
* src/comp.c (ABI_VERSION): Bump new version
	(comp_t): add 'eq'.
	(helper_link_table): add 'slow_eq'.
	(emit_slow_eq): New function.
	(emit_EQ): Rework to reflect EQ implementation.
	(declare_runtime_imported_funcs): Import 'slow_eq'.
	(Fcomp__init_ctxt): Register emitter 'emit_eq' for op code Qeq.

This and the previous 2 commits increase elisp-benchmarks performance by
3.6% on my test machine. Also a (small) reduction in eln size comes with
it.
2025-09-18 10:55:54 +02:00
Andrea Corallo
e98a13ec7f * Make sure the compiler optimizes for symbols_with_pos_enabled 0 in EQ
* src/lisp.h (EQ): Make use '__builtin_expect'.
2025-09-18 10:51:03 +02:00
Pip Cet
720e8b94c0 Change EQ to move slow code path into a separate function
* src/data.c (slow_eq): New function.
    * src/lisp.h (EQ): Call it.
2025-09-18 10:34:46 +02:00
Mattias Engdegård
de4ca2bdb1 Turn some checking macros into functions in the GC marker code
This rids us of a bunch of unhygienic macros with free variables and
makes the marking code actually readable again.  Even better, it is all
processed by the compiler even when the checks are disabled.

* src/alloc.c (CHECK_ALLOCATED, CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE)
(CHECK_ALLOCATED_AND_LIVE_SYMBOL): Transform macros into...
(check_live, check_allocated_and_live, check_allocated_and_live_symbol)
(check_allocated_and_live_vectorlike): ...functions.  Callers adapted.
2025-09-17 12:49:14 +02:00
Mattias Engdegård
08b2d53e48 ; * src/lisp.h (enum handlertype): Comment accuracy. 2025-09-17 12:49:14 +02:00
Jostein Kjønigsen
2135e7aa01
Fixes for csharp-ts-mode fontification (bug#79406)
- hightlight reserved keywords agressively, dont allow misuse as
  variables etc (the compiler will fail!)
- highlight lambda-valued variables as funtions.
- improve semantics of function/class annotations using attributes
  (maps closer to using-something than declaring it). also: rename to
  "attribute". "property" has a different, defined meaning in C#.
- better highlight variable-use in different scenarios (function-calls,
  if-statements, assignment-expressions, property-use, anonymous object
  initializers).
- better highlight for property-use (anonymous object initializers).
- highlight field-declaration using font-lock-variable-face.
- fontify attributes using new face csharp-ts-mode-attribute-face
  (defaults to font-lock-property-use-face).
- remove extensive use of "override" making evalutation hard-to-reason about.

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules):
Update indent rules.
(csharp-ts-mode-faces): New group.
(csharp-ts-mode-attribute-face): New face.
(csharp-ts-mode--font-lock-settings): Rule updates.
(csharp-ts-mode): Change property feature to attribute
2025-09-16 19:07:16 -07:00
Juri Linkov
32d959e48b New mode 'mouse-shift-adjust-mode' for S-<mouse-1>
* lisp/mouse.el (mouse-shift-adjust-mode-map): New variable.
(mouse-shift-adjust-mode): New minor mode (bug#79453).
(mouse-shift-adjust-point): New variable.
(mouse-drag-region-shift-adjust): New command.
(mouse-drag-track, mouse-set-region): Use 'mouse-shift-adjust-point'
to take into account the already existing region boundary.
2025-09-16 20:50:10 +03:00
Juri Linkov
503351e529 * lisp/hl-line.el (global-hl-line-sticky-flag): New value 'all'.
(global-hl-line-mode): Use 'global-hl-line-highlight-all'
for 'post-command-hook' when the value of
'global-hl-line-sticky-flag' is 'all' (bug#64993).
2025-09-16 20:15:14 +03:00
Juri Linkov
bd194c9a57 Context menu related fixes (bug#64980)
* etc/PROBLEMS: Suggest how to keep context menus open on Lucid.

* lisp/mouse.el (context-menu-mode-map): Bind [mouse-3] to
'ignore' instead of 'nil' to not fallback to the default binding.
(mouse--drag-start-event): Remove unused variable.
(mouse-undouble-last-event): Remove unused function.
2025-09-16 19:48:43 +03:00
Eli Zaretskii
e568f44b54 ; Improve recently-added documentation
* etc/NEWS:
* lisp/vc/vc.el (vc-apply-root-to-other-working-tree):
* doc/emacs/vc1-xtra.texi (Other Working Trees): Fix spelling and
wording of documentation of recent changes to VC.
2025-09-16 19:24:18 +03:00
Stefan Monnier
2c7b08d417 Revert "Fix generation of defvars defined by easy-mmode and company in loaddefs.el"
This reverts commit e9800cabff.
AFAICT that commit had no effect but it re-introduces some magic constants
in the code that we'd like to eliminate.
We presume it was a misunderstanding, trying to fix
a transient problem which a bootstrap would have fixed.
See https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00716.html
and https://lists.gnu.org/archive/html/emacs-devel/2025-09/msg00109.html
2025-09-16 10:50:14 -04:00
Sean Whitton
208e80018a New commands to apply changes to other working trees
* lisp/vc/diff-mode.el (diff-apply-buffer): New TEST argument.
* lisp/vc/vc.el (diff-apply-buffer): Declare.
(vc-no-confirm-moving-changes): New user option.
(vc-apply-to-other-working-tree)
(vc-apply-root-to-other-working-tree): New commands.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Other Working Trees):
* etc/NEWS: Document them.
2025-09-16 14:30:02 +01:00
Michael Albinus
0000d9b7b1 ; Fix last change in php-ts-mode.el
* lisp/progmodes/php-ts-mode.el (php-ts-mode--language-source-alist):
Fix quoting.
2025-09-16 09:10:04 +02:00
Michael Albinus
3cb1cdfba7 ; Instrument file-notify-test07-many-events
* test/lisp/filenotify-tests.el (file-notify-test07-many-events):
Instrument for debugging on emba.
2025-09-16 09:04:05 +02:00
Dmitry Gutov
76f50fa55c ruby-syntax-propertize: Add exception for /=
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Create an exception for assign-division operator not to be
recognized as regexp start (bug#79454).

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add example.
2025-09-16 02:17:13 +03:00
Vincenzo Pupillo
3438e15e31 Fix tree-sitter ABI version incompatibility in php-ts-mode
* lisp/progmodes/php-ts-mode.el (php-ts-mode--language-source-alist):
For ABI version < 15 add the recommended version "v0.23.12" (full hash
"f7cf7348737d8cff1b13407a0bfedce02ee7b046").
2025-09-15 21:20:52 +02:00
Michael Albinus
d6a7b0cd33 Tramp code cleanup
* lisp/net/tramp.el (tramp-use-absolute-autoload-file-names)
(tramp-skeleton-file-name-all-completions)
(tramp-parse-auth-sources, tramp-parse-file, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `seq-uniq'.

* lisp/net/tramp.el (tramp-register-foreign-file-name-handler):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files):
Use `seq-union'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test17-insert-directory):
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Use `seq-union'.
(tramp-test42-utf8): Use `seq-uniq' and `tramp-compat-seq-keep'.
2025-09-15 18:26:50 +02:00
Michael Albinus
72c19d0f39 Improve check for netrc tokens
* doc/misc/auth.texi (Help for users): Mention also "#" inside tokens.

* lisp/auth-source.el (auth-source-netrc-create): Better check for
token format.

* test/lisp/auth-source-tests.el (auth-source-backend-parse-json):
New test.
(auth-source-test-netrc-create-secret): Extend test.
2025-09-15 11:43:52 +02:00
Paul Eggert
897d32285f Fix incorrect timezones for London and Paris
Also, replace obsolete city name "Bangalore" with "Delhi",
and improve doc strings.
* lisp/time.el (zoneinfo-style-world-list)
(legacy-style-world-list): Evidently "Bangalore" was chosen for
Asia/Kolkata to avoid confusion about "Calcutta" vs "Kolkata".
However, it has similar confusion with "Bengaluru".
Use "Delhi" instead, as Delhi is larger, its name has not changed
for some time, and proposals to change its name have so far failed.
See: Sharma MS. Vijay Goel wants Delhi renamed as Dilli, but historians
say it will only spell trouble. Times of India. 2019-07-25.
(zoneinfo-style-world-list): Update doc string. “Posix-style” was
ambiguous as TZDB-style strings are specified only by POSIX.1-2024,
so use “TZDB-style” instead. Say “AREA/LOCATION” to be consistent.
If AREA/LOCATION is unsupported, Emacs signals an error on NetBSD
so don’t imply that some other timezone will be used.
(legacy-style-world-list): Remove ("GMT0BST" "London") and ("CET-1CDT"
"Paris"). These are wrong because neither London nor Paris follow
US DST rules.  Instead, use ("GMT0BST,M3.5.0/1,M10.5.0" "London")
and ("CET-1CEST,M3.5.0,M10.5.0/3" "Paris") if they work, and omit
London and Paris entries otherwise.
2025-09-14 10:14:58 -07:00
Eli Zaretskii
04342d3654 * lisp/net/shr.el (shr-tag-sub): Handle BOB (bug#79448). 2025-09-14 18:24:31 +03:00
Andreas Schwab
d37a55c0c8 * lisp/calc/calc.el (calc): Ony substitute binding of
calc-help-prefix after calc-ext has been loaded.
2025-09-14 13:10:08 +02:00
Mattias Engdegård
cb17a8bbf3 Use linear arrays in ispell test to work with old bash
* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash:
Avoid using associative arrays since they are not available
in old bash versions that come with some systems (bug#79177).
2025-09-14 12:40:09 +02:00
Mattias Engdegård
01e7d537b0 ; ispell-tests: use require instead of load 2025-09-14 11:31:53 +02:00
Mattias Engdegård
3300f2f40a ; * test/lisp/dom-tests.el: silence obsoletion warnings 2025-09-14 11:31:53 +02:00
Mattias Engdegård
c2a20f65d3 ; * test/lisp/net/tramp-tests.el: silence function-quoting warning 2025-09-14 11:31:53 +02:00
Eli Zaretskii
dd9f185bf6 ; Improve discoverability of tree-sitter related functionality
* doc/lispref/positions.texi (List Motion):
* doc/lispref/modes.texi (Major Mode Conventions, Major Modes)
(Parser-based Font Lock, Parser-based Indentation): Improve
indexing and cross-references to tree-sitter related stuff.
2025-09-14 09:53:16 +03:00
Eli Zaretskii
0dd6e5f642 Fix gdb-mi startup when asking user about debuginfod
* lisp/progmodes/gdb-mi.el (gdb-init-1): Delay processing of GDB
responses while waiting for the user to answer the question about
enabling debuginfod.  (Bug#79403)
2025-09-14 08:55:44 +03:00
Eli Zaretskii
28fecf40ef ; * lisp/time.el (zoneinfo-style-world-list): Doc fix (bug#437). 2025-09-14 08:22:45 +03:00
Eli Zaretskii
6f9a46f926 Fix 'ucs-normalize' tests following Unciode 17.0 import
* lisp/international/ucs-normalize.el
(ucs-normalize-composition-exclusions): Doc fix.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1): Update to _really_
match Unicode 17.0.

* admin/notes/unicode: Update instructions.
2025-09-14 07:34:41 +03:00
James Thomas
7cdaab61c4 (eww-switch-to-buffer): Prefer seq- functions to cl-
* lisp/net/eww.el (eww-switch-to-buffer): Don't reverse the list
of buffers since it doesn't do what we want any way (bug#79084).
2025-09-13 18:27:21 -04:00
Eli Zaretskii
83b623ea3a Fix 'define-globalized-minor-mode' when :variable is used
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Fix a typo (bug#79412).
2025-09-13 22:23:12 +03:00
Eli Zaretskii
fd5d35407a Fix Unicode-related tests
* test/lisp/international/mule-tests.el
(mule-cmds-tests--ucs-names-missing-names): Update no-name regions
of codepoints to Unicode 17.0.

* lisp/international/mule-cmds.el (ucs-names): Fix comments.

* admin/notes/unicode: Update instructions.
2025-09-13 17:52:30 +03:00
Eli Zaretskii
125b3588c9 Merge from origin/emacs-30
4745456677 ; * lisp/dired-x.el (dired-find-subdir): Doc fix (bug#794...
0832e5fec5 ; * lisp/vc/vc.el (vc-print-root-log): Improve docstring ...
2fafcdbf6a ; Minor copyedits in src/editfns.c
2025-09-13 07:23:12 -04:00
Eli Zaretskii
4745456677 ; * lisp/dired-x.el (dired-find-subdir): Doc fix (bug#79440). 2025-09-13 13:47:04 +03:00
James Thomas
0832e5fec5 ; * lisp/vc/vc.el (vc-print-root-log): Improve docstring (bug#79439). 2025-09-13 13:37:13 +03:00
Vincenzo Pupillo
abfd8a454a Add support for PHP 8.5 in 'php-ts-mode.el'
* lisp/progmodes/php-ts-mode.el: Doc string update.
(php-ts-mode--language-source-alist): PHP grammar update.
(php-ts-mode-find-sibling-rules): Doc string fix.
(php-ts-mode--parent-html-heuristic): Handled the case where there
is no HTML between two blocks of PHP code.
(php-ts-mode--array-element-heuristic): Fix typo.
(php-ts-mode--pipe-heuristic): New function that handle PHP's new
pipe operator.
(php-ts-mode--indent-styles): Removed commented code.  More
accurate indentation of ‘member_call_expression’.  Use of new
function to handle pipe operator indentation.  New rule for
indenting ‘property_hook_list’.
(php-ts-mode--test-yield-from-p): New predicate to check whether
the 'yield from' keyword is supported by the PHP grammar.
(php-ts-mode--test-pipe-p): New predicate to check whether the
‘pipe’ operator is supported by the PHP grammar.
(php-ts-mode--keywords): Use the new predicate
'php-ts-mode--test-yield-from-p'.  Now it is a var instead of a
const.
(php-ts-mode--operators): Use the new predicate
'php-ts-mode--test-pipe-p'.  Now it is a var instead of a const.
(php-ts-mode--font-lock-settings): New rules for
'nullsafe_member_access_expression', 'callable' primitive type.
New rule for the 'php_end_tag' if supported by the grammar.
More precise rules for 'scoped_call_expression' and
'member_call_expression'.
(php-ts-mode--inferior-php-process): Removed this unnecessary
variable.
(inferior-php-ts-mode-startup): Removed the use of
'php-ts-mode--inferior-php-process'.
(php-ts-mode-inferior--write-history): Removed the use of
'php-ts-mode--inferior-php-process'.
(Bug#79339)
2025-09-13 12:41:55 +03:00
Eli Zaretskii
d02181e39f ; * lisp/emacs-lisp/ring.el (ring-convert-sequence-to-ring): Bug#79330. 2025-09-13 12:06:35 +03:00
Eli Zaretskii
92fa2b60c6 Fix 'kill-region' when buffer has been changed outside of Emacs
* lisp/subr.el (read-char-choice): Let-bind 'last-command' to
prevent it from being overwritten by 'recursive-edit'.
(Bug#79388)
2025-09-13 11:56:15 +03:00
Alcor
4d91665367
Fix parsing single-digit color codes in rcirc
* lisp/net/rcirc.el (rcirc-color-attributes)
(rcirc-remove-markup-codes): Handle single-digit color codes correctly.
2025-09-13 10:45:41 +02:00
Spencer Baugh
603a685ad1 Allow disabling of reloading files on doc read failure
Reloading a byte-compiled file when we fail to fetch some
docstring in it is not guaranteed to work and can cause
subtle bugs which are worse than simply not having a
docstring.  Add 'documentation-dynamic-reload' variable to
allow disabling this behavior.  See the discussion in
https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00304.html
for more details.
* src/doc.c (syms_of_doc): Add 'documentation-dynamic-reload'.
(Fdocumentation, Fdocumentation_property): Check value of
'documentation-dynamic-reload'.
2025-09-13 10:33:20 +03:00
Michael Albinus
9430638e48 * lisp/comint.el (comint-password-prompt-regexp): Join two entries. 2025-09-13 09:22:26 +02:00
Andre A. Gomes
fe9b1fa014 Make comint understand SSH proxy password phrases
* lisp/comint.el (comint-password-prompt-regexp):
* test/lisp/comint-tests.el (comint-testsuite-password-strings):
Add SSH proxy password phrase.  (Bug#79424)
2025-09-13 09:16:25 +02:00
Michael Albinus
bfeffc4436 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-09-12 16:49:40 +02:00
Michael Albinus
59c7ee29dc ; Fix last change
* test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-tests.el: Fix declare-function.
2025-09-12 16:49:08 +02:00
Sean Whitton
4418a37c5d ; log-edit.el: Insert missing required cl-lib. 2025-09-12 15:41:38 +01:00
Sean Whitton
2ee74aca55 Delete obsolete log-edit-beginning-of-line
* lisp/vc/log-edit.el (message): No longer require.
(log-edit-beginning-of-line): Delete.  No longer required now
that Log Edit buffers use fields for headers.  (In combination
with the new fields, this binding led to C-a behaving strangely
for summaries with colons in them.)
(log-edit-mode-map): Unbind it.
2025-09-12 15:40:35 +01:00
Sean Whitton
85b991a62d ; vc-git--log-edit-summary-check: Use and-let*. 2025-09-12 15:32:19 +01:00
Sean Whitton
2817720083 ; vc-prepare-patch: Minor code improvements
* lisp/vc/vc.el (vc-prepare-patch): Use ngettext.  Avoid using
dolist's RESULT for side-effect.
2025-09-12 15:31:56 +01:00
Sean Whitton
1372061200 ; vc-diff-outgoing: Fix calling 'working-revision' backend function. 2025-09-12 15:26:44 +01:00
Michael Albinus
1b4e4fda5e Fix last change
* test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-hunspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-international-ispell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-tests.el: Fix load argument.
2025-09-12 16:18:26 +02:00