Commit graph

178718 commits

Author SHA1 Message Date
Vincent Belaïche
51de35c9d8 Fix after entry hooking.
* lisp/ses.el (ses-edit-cell): Run ses-after-entry-functions
when called interactively.
Fix after entry hooking.
* lisp/ses.el (ses-edit-cell): Run ses-after-entry-functions
when called interactively.
2026-03-13 16:09:31 +01:00
Vincent Belaïche
8050bee438 Run ses-after-entry-functions with run-hook-with-args.
* lisp/ses.el (ses-after-entry-functions): Indicate that
`ses--row' and `ses--col' are dynamically bound while hook is run.
(ses-read-cell, ses-read-symbol): Use `run-hook-with-args' rather
than `dolist'+`funcall' to run hook `ses-after-entry-functions'.
2025-09-05 14:24:02 +02:00
Vincent Belaïche
29c646d1a1 FIXUP of «Add test for ses-range with argument setting browsing direction.»
Suppress useless settings for the test purpose.
2025-07-10 11:54:10 +02:00
Vincent Belaïche
7843ac6df2 Add test for ses-range with argument setting browsing direction. 2025-06-28 06:16:23 +02:00
Vincent Belaïche
ba07d43bba Document how to use ses-set.
* doc/translations/fr/misc/ses-fr.texi: (Automating editing a @acronym{SES}
  sheet): new node.
2025-06-28 06:16:21 +02:00
Vincent Belaïche
52f6446850 Rewrite ses-set to be lexical-binding-proof. 2025-06-28 06:16:20 +02:00
Vincent Belaïche
2aa018afeb Bind dynamically row col on calling ses-after-entry-functions. 2025-06-28 06:16:19 +02:00
Vincent Belaïche
8e936439e9 Add formula as an expression setters to ses-setq. 2025-06-28 06:16:18 +02:00
Vincent Belaïche
ef5ab15bac ses-setq new function. 2025-06-28 06:16:17 +02:00
Vincent Belaïche
182e3c0bfc Add SES tests for ses-setq. 2025-06-28 06:16:16 +02:00
Vincent Belaïche
f77596e9b6 Fix ses-select accordingly with changes for having ses-setq.
* lisp/ses.el (ses-select): Fix accordingly with new definition of
'ses-range'. 'ses-select' is no longer a macro, but a function,
and ranges are evaluated as list of values, not list of symbols.
Also the order of elements is not changed.
(ses-select): Add un extra optional argument to allow configure
the test function.
2025-06-28 06:16:15 +02:00
Vincent Belaïche
053b05ae62 Fix ses-insert-range.
* lisp/ses.el (ses-insert-range): Fix after change of definition of
'ses-range'.
2025-06-28 06:16:14 +02:00
Vincent Belaïche
283c4aabc8 ses-range as a wrapper macro for a helper function ses-range-engine.
* lisp/ses.el (ses--cell-value): New function.
(ses--range-engine): New function.
(ses-range): Delegate processing to helper function
ses--range-engine. Has an extra-argument value-extractor.
2025-06-28 06:16:10 +02:00
Vincent Belaïche
f693361495 New tests for ses-select.
* test/lisp/ses-tests.el (ses-select-different-list-sizes)
(ses-select-plain, ses-select-specific-test-function): New tests.
2025-06-28 06:14:35 +02:00
Vincent Belaïche
cacd245fc9 Make ses-range environment agnostic.
* lisp/ses.el (ses-sym-rowcol): Do not make border effect on interned
symbols.
(ses-formula-references): Do not use ses-range implementation any
longer, as the ses-range is now environnement agnostic, and as such do
not expand any longer to a list of symbols.
(ses-range): Do not make border effect on interned symbols, and be
environment agnostic. As such ses-range macro now expand to a sexp the
evaluation of which yields a list of symbol, and no longer to a list
of symbol with some function call to make it evaluate to the
list of values.

* test/lisp/ses-tests.el (ses-expand-range): New test.
2025-06-28 06:14:29 +02:00
Vincent Belaïche
378f7c063a ses-range < > shorthands.
* lisp/ses.el (ses-range): Fix handling of shorthands < >.
2025-06-28 06:13:14 +02:00
Vincent Belaïche
65d68d9294 Ensure SES idle timer hook operate in correct buffer context.
* lisp/ses.el (ses--idle-timer-hook): New defun.
(ses-mode): Does not call ses-command-hook directly from idle
timer, but rather use a wrapper function with some argument
argument to ensure that the current buffer is properly set when
the hook is called.
2025-06-27 16:43:41 +02:00
Vincent Belaïche
d07902e5ca Fix ses-test.el indentation. 2025-06-27 16:43:40 +02:00
Vincent Belaïche
20bb4d708b Typo SES-fr. 2025-06-27 16:43:39 +02:00
Vincent Belaïche
886307ec48 Generate manual for other languages than default.
* doc/translations/fr/info_common.mk:
* doc/translations/default/info_common.mk: New file.

* doc/misc/Makefile.in: Get INFO_COMMON from language respective
info_common.mk helper script.
(INFO_TARGETS): Make it depend from info_common.mk settings.
(ORG_SETUP, ORG_SRC): Make it point at language specific sub-directory.
(texi_sources, DVI_TARGETS, HTML_TARGETS, PDF_TARGETS)
(PS_TARGETS, echo-info, info_template,efaq%$(lang_suffix).dvi)
(efaq%$(lang_suffix).pdf, efaq%$(lang_suffix).texi)
(efaq%$(lang_suffix).html): Make it use language specific suffix.
(${buildinfodir}/%$(lang_suffix).info, %$(lang_suffix).dvi)
(%$(lang_suffix).pdf, %$(lang_suffix).html, %$(lang_suffix).ps):
Make it use language specific suffix/subdirectory.

* Makefile.in (DOCLANGS): New variable, list of languages.
(install-info, uninstall): List targets into 'info_misc' for all languages.
(TAGS tags): Make tags for all languages.
($(DOCS)): Create target for all languages.
(texi_misc_fr, texi_misc_default): Set macro for all languages.
(srcdir_doc_info_dir_inputs): Macro concatenate texi_misc_lll for
all language lll.
2025-06-27 16:43:38 +02:00
Sean Whitton
e25ee1082f ; * lisp/vc/vc-dispatcher.el (vc-finish-logentry): Fix thinko. 2025-06-27 14:18:14 +01:00
Sean Whitton
0c0ac8d48a 'C-u C-x .' clears the fill prefix
* lisp/textmodes/fill.el (set-fill-prefix): When called
interactively with a prefix argument, clear the fill prefix,
just like how 'C-u C-x C-n' clears the goal column.
* doc/emacs/text.texi (Fill Prefix):
* etc/NEWS: Document the change.
2025-06-27 14:14:36 +01:00
Sean Whitton
772099bc9b New user option vc-dir-save-some-buffers-on-revert
* lisp/vc/vc-dir.el (vc-dir-save-some-buffers-on-revert):
New user option.
(vc-dir-refresh): Use it.
* etc/NEWS: Document it.
2025-06-27 12:39:29 +01:00
Phil Sainty
d70f1e0cfe ; * lisp/proced.el (proced-update): Support non-symbol proced-filter values
Avoid errors like "Wrong type argument: symbolp, ((args . "REGEXP"))"
when `proced-filter' is a list of elementary filters.
2025-06-27 18:46:30 +12:00
Stefan Monnier
a002ca79ee lisp/vc/smerge-mode.el (smerge--refine-highlight-change): Fix misalignment 2025-06-26 12:55:27 -04:00
Eli Zaretskii
80cb688b04 Fix *Help* text when a command is bound to a single key
* lisp/help-fns.el (help-fns--key-bindings): Don't insert
redundant period.  (Bug#78905)
2025-06-26 17:39:19 +03:00
Jim Porter
2bdcf0250a When making a readable page in EWW, include the <title> and similar tags
* lisp/net/eww.el (eww--walk-readability, eww-readable-dom): New
functions.
(eww-display-html): Call 'eww-readable-dom'.
(eww-readable): Call 'eww-readable-dom'.  Don't copy over 'eww-data'
properties that our new readable page can handle on its own.
(eww-score-readability): Rewrite in terms of 'eww--walk-readability'.
Make obsolete.
(eww-highest-readability): Make obsolete.

* test/lisp/net/eww-tests.el (eww-test--lots-of-words)
(eww-test--wordy-page): New variables...
(eww-test/readable/toggle-display): ... use them.
(eww-test/readable/default-readable): Make sure that the readable page
includes the <title> and <link> tags (bug#77299).
2025-06-25 21:26:04 -07:00
James Cherti
faae9f572a Fix yaml-ts-mode comment-start-skip to improve commenting/uncommenting
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Fix 'comment-start-skip'
value to resolve an issue when commenting/uncommenting using the
'comment-or-uncomment-region' function.  The previous 'comment-start-skip'
value left some "-" uncommented after commenting and uncommenting
multiple YAML indented blocks (bug#78892).

Copyright-paperwork-exempt: yes
2025-06-25 21:50:06 +03:00
Juri Linkov
80f2f07c48 Add alternative "ruby-lsp" to eglot-server-programs.
* lisp/progmodes/eglot.el (eglot-server-programs):
Add "ruby-lsp" to eglot-alternatives for ruby-mode and ruby-ts-mode.
https://shopify.github.io/ruby-lsp/editors.html#emacs-eglot
2025-06-25 20:07:17 +03:00
Juri Linkov
f3c755129f Improve treesit settings for python-ts-mode (bug#73404).
* lisp/progmodes/python.el (python--thing-settings):
For the 'sexp' thing use all nodes except top-level
grouping nodes, comments and parens.  Add the 'list' thing.
(python-ts-mode): Use setq-local for treesit-thing-settings.
Modify 'forward-sexp-function' and 'treesit-sexp-thing'
after calling 'treesit-major-mode-setup'.
2025-06-25 19:57:05 +03:00
Juri Linkov
789a6b9693 Fix usage of 'treesit-defun-type-regexp' in treesit-tests.
* test/src/treesit-tests.el (treesit--ert-test-defun-navigation):
Replace 'treesit-defun-type-regexp' with
'(or treesit-defun-type-regexp 'defun)' that fixes the tests
for ts-modes that set up the 'defun' thing instead of
'treesit-defun-type-regexp'.
2025-06-25 19:45:54 +03:00
Po Lu
9ebcbf93ba Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs 2025-06-26 00:02:59 +08:00
Po Lu
704832f41b Attempt to fix initialization of startup variables on Android
* lisp/cus-start.el (standard): Revert last change if (featurep
'android), as Android systems perform dumping during the
initialization of the first user session.
2025-06-26 00:02:11 +08:00
Sean Whitton
d05b59c8be Improve discoverability of using dumb-emacs-ansi terminal type
* doc/emacs/misc.texi (Interactive Shell, Shell Options):
* lisp/comint.el (comint-terminfo-terminal): Mention setting
comint-terminfo-terminal to "dumb-emacs-ansi" when the system's
terminfo database contains a definition for that terminal type.
2025-06-25 16:21:54 +01:00
Elías Gabriel Pérez
6b078013f1 Allow automatically delete non-existent projects. (Bug#77566)
* etc/NEWS: Announce changes.
* lisp/progmodes/project.el (project-prune-zombie-projects): New
user option.
(project-prune-zombies-default): New function.
(project-forget-zombie-projects): Rework.
(project--ensure-read-project-list, project-prompt-project-dir)
(project-prompt-project-name): Call
'project-forget-zombie-projects' but inhibit its message.
2025-06-25 09:54:45 +03:00
Stefan Monnier
189ae7b1ed cus-start.el: Fix bug#78637
* lisp/cus-start.el <toplevel>: Test `dump-mode` rather than
`after-init-time` for `custom-delayed-init-variables`.
2025-06-24 18:24:28 -04:00
Jeremy Bryant
b687f02a73 ; * lisp/textmodes/reftex.el: Update author email (bug#77850). 2025-06-24 23:20:39 +02:00
Sean Whitton
192066d3b9 Load site-start.el before early-init.el
* lisp/startup.el (command-line): Load site-start.el before
early-init.el.
(site-run-file):
* doc/lispref/os.texi (Startup Summary, Init File):
* etc/NEWS: Document the change.
2025-06-24 17:33:39 +01:00
Andrea Corallo
baf0c82202 * Make native comp use lexbinding for sync compilations (bug#78818)
* lisp/emacs-lisp/comp.el (comp--final): Use lexical-binding in the temp file.
2025-06-23 22:04:05 +02:00
Michael Albinus
991d3ad80a Fix Tramp scripts
* lisp/net/tramp-sh.el (tramp-shell-file-name-all-completions)
(tramp-bundle-read-file-names): Fix scripts.
2025-06-23 18:00:08 +02:00
Alan Mackenzie
1a8e8203a1 CC Mode: Remove workarounds for missing "\_<", "\_>" in XEmacs
Also start using `symbols' as the PAREN argument to regexp-opt.

lisp/progmodes/cc-defs.el (c-make-keywords-re): Simplify,
remove the redundant `appendable' value of the ADORN parameter,
use the `symbols' value of the PAREN argument to regexp.
(c-emacs-features): Test that "\_<" and "\_>" work in regexps
before allowing CC Mode to start.

lisp/progmodes/cc-engine.el (c-looking-at-decl-block): When
GOTO-START is set, leave point at the _last_ Java annotation,
if any.  Clarify this in the doc string.
(c-guess-basic-syntax CASE 5G): Replace a not needed t
GOTO-START argument to c-looking-at-decl-block with nil.

lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Make the
syntax of ?@ in Java Mode symbol for processing annotations.
(c-opt-identifier-concat-key, c-opt-identifier-prefix-key)
(c-opt-after-id-concat-key, c-identifier-key)
(c-cpp-message-directives-re, c-cpp-include-key, c-pack-key)
(c-brace-stack-thing-key, c-brace-stack-no-semi-key): Replace
the `appendable' value of the ADORN argument to
c-make-keywords-re with t.
(c-annotation-re): New lang const and lang var.
(c-keywords-obarray): Replace an explicit (apply 'nconc (mapcar
... )) with c--mapcan, now that the obscure bug with mapcan in
Emacs has been resolved.

lisp/progmodes/cc-align.el (c-lineup-gnu-DEFUN-intro-cont)
(c-lineup-java-throws, c-snug-do-while)
lisp/progmodes/cc-awk.el (c-awk-pre-exp-alphanum-kwd-re)
(c-awk-after-if-for-while-condition-p)
(c-awk-after-function-decl-param-list)
(c-awk-after-continue-token)
(c-awk-after-rbrace-or-statement-semicolon)
(awk-font-lock-keywords)
lisp/progmodes/cc-cmds.el (c-defun-name-1)
lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist, c-forward-label, c-skip-conditional)
(c-looking-at-c++-lambda-expression, c-add-stmt-syntax)
(c-guess-basic-syntax CASE 11, CASE 12, CASE 13, CASE 15)
(CASE 5C.3, CASE 5D.4, CASE 7D)
lisp/progmodes/cc-fonts.el (c-cpp-matchers)
(c-basic-matchers-before, c-font-lock-declarations)
(c-font-lock-c++-modules, c-simple-decl-matchers)
(c-complex-decl-matchers, c-basic-matchers-after)
lisp/progmodes/cc-langs.el (c-paragraph-start)
(c-stmt-block-only-keywords-regexp)
(c-type-decl-prefix-keywords-key, c-type-decl-prefix-key)
(c-type-decl-suffix-key, c-known-type-key)
(c-enum-clause-introduction-re)
lisp/progmodes/cc-menus.el (cc-imenu-c++-generic-expression)
lisp/progmodes/cc-vars.el (c-make-noise-macro-regexps)
(c-make-macro-with-semi-re): Replace explicit "\<" and "\>"
with "\_<" and "\_>".  Replace explicit specification of
non-'_' character after word end with "\_>".  Replace
concatenation of "\<" and "\>" with regexps with (regexp-opt
... 'symbols).  Use (regexp-opt ... 'symbols) in general.
2025-06-23 11:50:07 +00:00
Stephen Berman
2b34f38b38 Optionally suppress recentf open file messages (bug#78666)
* etc/NEWS: Announce new user option.

* lisp/recentf.el (recentf-suppress-open-file-help): New defcustom.
(recentf-dialog-goto-first): Use it; otherwise, make calling
'widget-move' suppress message only for interactive recentf use.
(recentf-forward, recentf-backward): New commands, wrappers around
'widget-{forward, backward}' using 'recentf-suppress-open-file-help'.
(recentf-dialog): Use them in locally remapped key bindings.

* lisp/wid-edit.el (widget-forward, widget-backward): Add optional
argument to suppress :help-echo message and pass it to 'widget-move'.
2025-06-23 11:51:31 +02:00
Juri Linkov
edd18978aa ; Fix compilation warning in docstring of new function in treesit.el. 2025-06-23 09:54:48 +03:00
Peter Oliver
438a4cf673 Link to Tree-sitter parser sources from compatibility report
* admin/tree-sitter/treesit-admin.el
(treesit-admin--generate-compatibility-report): Add a link to the source
URL (bug#78848).
2025-06-23 09:47:36 +03:00
Peter Oliver
96858b9ced Show also tagged versions on Tree-sitter compatibility report
* admin/tree-sitter/compat-template.html: Accommodate two tables.
* admin/tree-sitter/treesit-admin.el
(treesit-admin--find-latest-compatible-revision): Pass through new arg
REVISION-TYPE.
(treesit-admin--last-compatible-grammar-for-modes): Optionally iterate
over tagged rather than all commits.
(treesit-admin--generate-compatibility-report): Generate a second table,
showing only tagged commits (bug#78848).
2025-06-23 09:47:34 +03:00
Peter Oliver
22db624c0e New function treesit--language-git-version-tags
* lisp/treesit.el (treesit--language-git-version-tags): New function to
  list version tags for a Tree-sitter parser Git repository (bug#78848).
2025-06-23 09:47:30 +03:00
Stefan Monnier
08fba517f6 (smerge-refine-shadow-cursor): New variable and face (bug#78806)
* lisp/vc/smerge-mode.el (smerge-refine-shadow-cursor): New variable
and face.
(smerge-refine-regions): Add `cursor-sensor-functions` property
to the covering overlays.
(smerge--refine-at-right-margin-p, smerge--refine-shadow-cursor):
New functions.
(smerge--refine-other-pos): New function, extracted from
`smerge-refine-exchange-point`.
(smerge-refine-exchange-point): Use it.
(smerge--refine-highlight-change): Add thin
highlighted space for insertion/deletion positions.

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect):
Run functions for `moved` events.  Demote errors.
(cursor-sensor-mode): Adjust docstring accordingly.

* doc/lispref/text.texi (Special Properties) <cursor-sensor-functions>:
Mention the new `moved` direction.
2025-06-23 00:00:38 -04:00
Jim Porter
e5ad9ae100 When navigating to anchor targets in EWW, retain 'eww-data' properties
Previously, navigating to an in-page anchor target would clear
'eww-data', removing many important properties like the original source
and the DOM.  Among other things, this prevented enabling/disabling
readable mode.

* lisp/net/eww.el (eww-follow-link): Copy previous 'eww-data'.
2025-06-22 09:29:39 -07:00
Michael Albinus
87fc539a0b Tramp: Cache also file-executable-p' in file-name-all-completions'
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp):
Fix comment.

* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Cache also `file-executable-p'.  Suggested by <mail@knazarov.com>.
(tramp-shell-file-name-all-completions): New script.
(tramp-bundle-read-file-names): Fix for special characters.  Cache
also `file-executable-p'.
(tramp-sh-handle-file-name-all-completions): Unify different cases.

* lisp/net/tramp.el (with-tramp-suspended-timers, without-remote-files):
Fix debug spec.
2025-06-22 17:29:52 +02:00
Eli Zaretskii
081c1aae99 Fix 'c-ts-mode' indentation when the style is defined as a function
* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Handle the
case where 'c-ts-mode-indent-style' is a function.  (Bug#78814)
2025-06-22 11:16:53 +03:00