Commit graph

166005 commits

Author SHA1 Message Date
Eli Zaretskii
1b12397263 ; Don't record multiple versions of use-package
* lisp/use-package/use-package-ensure-system-package.el: Remove
Version: header, to avoid confusing loaddefs-gene.  (Bug#68304)
2024-01-07 17:15:18 +02:00
Eli Zaretskii
8729a2a10d Fix 'rmail-summary-by-thread'
* lisp/mail/rmailsum.el (rmail-summary-by-thread): Call
'rmail-new-summary' from the original buffer, not from
'rmail-buffer' to avoid failing the logic in 'rmail-new-summary'
that decides whether to pop up a new window.  Reported by Andrea
Monaco <andrea.monaco@autistici.org>.
2024-01-06 19:30:16 +02:00
Jean-Christophe Helary
2a8c00bfc0 * doc/emacs/back.texi: Fix a typo. 2024-01-06 18:51:22 +02:00
Eli Zaretskii
bf7034048c ; * doc/emacs/custom.texi (Changing a Variable): Update example (bug#68279). 2024-01-06 13:45:33 +02:00
Eli Zaretskii
466d1c98a9 Fix icons.el when icon does not exist as a file
* lisp/emacs-lisp/icons.el (icons--create): Handle the case when
ICON is a file that doesn't exists or is unreadable.  Suggested by
David Ponce <da_vid@orange.fr>.  (Bug#66846)
2024-01-06 13:26:29 +02:00
Eli Zaretskii
2a861124e8 ; Improve documentation of 'buffer-match-p'
* doc/lispref/buffers.texi (Buffer List):
* doc/lispref/windows.texi (Choosing Window): Add caveats for
calling 'buffer-match-p' too early, when CONDITION is
'derived-mode' or 'major-mode'.  (Bug#68081)
2024-01-06 11:15:31 +02:00
Juri Linkov
dc9d02f8a0 * lisp/isearch.el (isearch-search-and-update): Let-bind 'isearch-cmds'.
When 'isearch-wrap-pause' is 'no' or 'no-ding', let-bind 'isearch-cmds'
to avoid changing it by 'isearch-push-state' in 'isearch-repeat',
so that a later DEL (isearch-delete-char) doesn't stop at the
intermediate failing state (bug#68158).
2024-01-05 09:40:05 +02:00
Andrea Corallo
9308d9a74a * src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table Qunbound use. 2024-01-04 11:15:13 +01:00
Eli Zaretskii
a2a6619b28 Provide decent documentation for 'help-quick'
* lisp/help.el (help-quick, help-quick-toggle): Doc fix.

* doc/emacs/help.texi (Help Summary, Misc Help): Document
'help-quick-toggle'.
2024-01-04 10:17:30 +02:00
Eli Zaretskii
ab66b749a2 ; * src/window.c (Fset_window_margins): Doc fix. 2024-01-03 15:14:41 +02:00
Dmitry Gutov
1a677d1429 treesit--pre-syntax-ppss: Fix args-out-of-range in internal--syntax-propertize
* lisp/treesit.el (treesit--pre-syntax-ppss): Make sure the lower
bound is still within the current restriction (bug#67977).
2024-01-02 15:32:03 +02:00
Po Lu
dc4e6b1329 ; Update copyright years in more files 2024-01-02 10:17:39 +08:00
Po Lu
64b3777631 ; Run set-copyright from admin.el 2024-01-02 09:53:43 +08:00
Po Lu
8e1c56ae46 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
Mike Kupfer
3204825f56 Fix mangled Subject header field when forwarding (Bug#67360)
* lisp/mh-e/mh-comp.el (mh-forward): Overwrite subject when
forwarding.
2024-01-01 10:32:48 -08:00
Kyle Meyer
7591acfe38 Update to Org 9.6.15 2024-01-01 12:47:27 -05:00
Eli Zaretskii
240b4594f1 ; * etc/TODO: Add an item about 'Info-hide-note-references'. 2023-12-31 15:17:18 +02:00
Eli Zaretskii
01be4fe39d * doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#68164).
Suggested by Jens Quade <jq@qdevelop.de>.
2023-12-31 09:44:32 +02:00
Stefan Kangas
55555a6a0d org-protocol: Minor copy-edits to Commentary
* lisp/org/org-protocol.el: Minor copy-edits to Commentary.
2023-12-30 17:53:53 +01:00
Denis Zubarev
4696869d3d Improve syntax highlighting for python-ts-mode
Fix fontification of strings inside of f-strings interpolation, e.g. for
f"beg {'nested'}" - 'nested' was not fontified as string.  Do not
override the face of builtin functions (all, bytes etc.) with the
function call face.  Add missing assignment expressions (:= *=).
Fontify built-ins (dict,list,etc.) as types when they are used in type
hints.  Highlight union types (type1|type2).  Highlight base class names
in the class definition.  Fontify class patterns in case statements.
Highlight the second argument as a type in isinstance/issubclass call.
Highlight dotted decorator names.

* lisp/progmodes/python.el (python--treesit-keywords): Add compound
keyword "is not".
(python--treesit-builtin-types): New variable that stores all python
built-in types.
(python--treesit-type-regex): New variable.  Regex matches if text is
either built-in type or text starts with capital letter.
(python--treesit-builtins): Extract built-in types to other variable.
(python--treesit-fontify-string): fix f-string interpolation.  Enable
interpolation highlighting only if string-interpolation is presented
on the enabled levels of treesit-font-lock-feature-list.
(python--treesit-fontify-string-interpolation): Remove function.
(python--treesit-fontify-union-types): Fontify nested union types.
(python--treesit-fontify-union-types-strict): Fontify nested union
types, only if type identifier matches against
python--treesit-type-regex.
(python--treesit-fontify-dotted-decorator): Fontify all parts of
dotted decorator name.
(python--treesit-settings): Change/add rules.  (Bug#67061)

* test/lisp/progmodes/python-tests.el
(python-ts-tests-with-temp-buffer): Function for setting up test
buffer.
(python-ts-mode-compound-keywords-face)
(python-ts-mode-named-assignement-face-1)
(python-ts-mode-assignement-face-2)
(python-ts-mode-nested-types-face-1)
(python-ts-mode-union-types-face-1)
(python-ts-mode-union-types-face-2)
(python-ts-mode-types-face-1)
(python-ts-mode-types-face-2)
(python-ts-mode-types-face-3)
(python-ts-mode-isinstance-type-face-1)
(python-ts-mode-isinstance-type-face-2)
(python-ts-mode-isinstance-type-face-3)
(python-ts-mode-superclass-type-face)
(python-ts-mode-class-patterns-face)
(python-ts-mode-dotted-decorator-face-1)
(python-ts-mode-dotted-decorator-face-2)
(python-ts-mode-builtin-call-face)
(python-ts-mode-interpolation-nested-string)
(python-ts-mode-disabled-string-interpolation)
(python-ts-mode-interpolation-doc-string): Add tests.
2023-12-30 13:15:07 +02:00
Yuan Fu
5303152872
Revert "Fix treesit-node-field-name and friends (bug#66674)"
This reverts commit 9874561f39.

See bug#67990.  Basically our original code is correct, the error is
in libtree-sitter, which only manifests in certain cases.

https://github.com/tree-sitter/tree-sitter/pull/2104
2023-12-29 19:52:07 -08:00
Eli Zaretskii
fa0bb88302 ; * src/buffer.c (syms_of_buffer) <default-directory>: Doc fix (bug#68088). 2023-12-28 21:46:59 +02:00
Stefan Kangas
44517037ae ; Fix typo 2023-12-26 22:09:57 +01:00
Eli Zaretskii
ccf46acefd ; Fix last change. 2023-12-26 14:51:37 +02:00
Eli Zaretskii
c86b039dff ; * etc/DEBUG: Improve advice for debugging native-compilation (bug#67900). 2023-12-26 14:49:50 +02:00
Stefan Kangas
9afba605bb Explain status "r" in epa-list-keys
* lisp/epa.el (epa-list-keys): Add revoked status to description.
Suggested by CHENG Gao <chenggao@icloud.com>.
2023-12-25 16:05:27 +01:00
Eli Zaretskii
6271422196 ; * lisp/dired.el (dired--make-directory-clickable): Reformat comment. 2023-12-25 15:07:21 +02:00
Jared Finder
fcbb004489 Fix mouse clicks on directory line in Dired
The option 'dired-kill-when-opening-new-dired-buffer' should be
also honored when clicking the mouse to kill prev buffer.
* lisp/dired.el (dired--make-directory-clickable): Call
'dired--find-possibly-alternative-file' instead of 'dired', in
the click callback.  (Bug#67856)
2023-12-25 15:02:34 +02:00
Eli Zaretskii
be8a7155b4 Fix 'split-root-window-right' and 'split-root-window-below'
* lisp/window.el (split-root-window-right)
(split-root-window-below): Fix the 'interactive' spec to avoid
misbehaving when invoked with no prefix argument.  (Bug#67452)
2023-12-25 14:59:26 +02:00
Stefan Kangas
eb19984c4d Mark icalendar.el as maintained by emacs-devel
* lisp/calendar/icalendar.el: Mark emacs-devel as the maintainer.
Ref: https://debbugs.gnu.org/34315#152
2023-12-24 15:02:55 +01:00
Eli Zaretskii
03dc914fd3 ; Fix footnotes in ELisp Intro manual 2023-12-24 10:46:04 +02:00
Xiyue Deng
ceacf75395 Fix usage of `setq-default' and offer more suggestions
cd61af0 changed from default-major-mode to major-mode in the first
code sample but didn't change the rest.  This patch fixes this and add
some explanations of why use `setq-default' instead of `setq'.  In
addition, it gives background on suggesting using text-mode as default
mode and suggest other alternatives.

* doc/lispintro/emacs-lisp-intro.texi (Text and Auto-fill): Fix usage
of `setq-default' and offer more suggestions.  (Bug#67848)
2023-12-24 10:38:46 +02:00
Yuan Fu
2701da0eee
Fix python-ts-mode triple quote syntax (bug#67262)
* lisp/progmodes/python.el (python--treesit-syntax-propertize): New function.
(python-ts-mode): Activate python--treesit-syntax-propertize.
2023-12-23 19:08:56 -08:00
Yuan Fu
683c7c9687
Increment parser timestamp when narrowing changes (bug#67977)
When narrowing changes, parse reparses, so the timestamp should
definitely increment, just like in ts_record_changes.

Failing to increment this timestamp, outdated nodes would think they
are still up-to-date, and try to print their type name.  Printing
their type name involves accessing the old parse tree, which is
already freed during the last reparse.

I also found that we don't increment timestamp when changing parser
ranges and fixed that as well.

* src/treesit.c (treesit_sync_visible_region):
(Ftreesit_parser_set_included_ranges): Increment timestamp.
* src/treesit.h (Lisp_TS_Parser): Add some comments.
2023-12-23 18:43:51 -08:00
Dmitry Gutov
8ae42c825e ruby-ts-mode: Fix indentation for string_array closer
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Fix indentation for string_array closer.
2023-12-24 04:22:34 +02:00
Dmitry Gutov
9cfa498e0a treesit-major-mode-setup: Use 'treesit--syntax-propertize-notifier'
* lisp/treesit.el (treesit-major-mode-setup): Make sure
'treesit--syntax-propertize-notifier' is used (bug#66732)
2023-12-24 04:07:15 +02:00
Dmitry Gutov
da2e440462 ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--syntax-propertize):
Fix an out-of-bounds error with heredoc at eob.
2023-12-24 03:58:49 +02:00
Yuan Fu
6ea507296a
Correctly refontify changed region in tree-sitter modes (bug#66732)
We already have treesit--font-lock-notifier that should mark changed
regions to be refontified, but it's called too late in the redsiplay &
fontification pipeline.  Here we add treesit--pre-redisplay that
forces reparse and calls notifier functions in
pre-redisplay-functions, which is early enough for the marking to take
effect.

Similarly, we force reparse in
syntax-propertize-extend-region-functions so syntax-ppss will have the
up-to-date syntax information when it scans the buffer text.  We also
record the lowest start position of the affected regions, and make
sure next syntex-propertize starts from that position.

* lisp/treesit.el (treesit--pre-redisplay-tick):
(treesit--syntax-propertize-start): New variable.
(treesit--syntax-propertize-notifier):
(treesit--pre-redisplay):
(treesit--pre-syntax-ppss): New functions.
(treesit-major-mode-setup): Add hooks.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Remove notifier.
(ruby-ts--parser-after-change): Remove notifier function.
2023-12-23 15:03:26 -08:00
Michael Albinus
a475165738 * doc/man/emacsclient.1: Fix --tramp option. 2023-12-23 12:04:37 +01:00
Peter Oliver
1e5357d3d1 * doc/man/emacsclient.1: Add missing sections (bug#66598)
Copyright-paperwork-exempt: yes
2023-12-23 11:45:22 +02:00
Xiyue Deng
fba7b9db39 Add explanation for extra parentheses in ELisp Introduction
* doc/lispintro/emacs-lisp-intro.texi (fwd-para while): Add
a note to explain the extra parentheses.  (Bug#67820)
2023-12-23 11:35:33 +02:00
Xiyue Deng
7723282682 Add sample code to the "let*" section in "forward-paragraph"
* doc/lispintro/emacs-lisp-intro.texi (fwd-para let): Add code
sample.  (Bug#67817)
2023-12-23 10:48:06 +02:00
Denis Zubarev
7a00ca92c1
Fix treesit test (bug#67117)
* test/src/treesit-tests.el (treesit-search-subtree-forward-1):
(treesit-search-subtree-backward-1): Replace treesit--thing-at with
treesit-query-capture (treesit--thing-at isn't available in Emacs 29).
2023-12-22 22:59:30 -08:00
Yuan Fu
d220893216
Fix c++-ts-mode indentation (bug#67975)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make indent
rule match precise so it doesn't match declaration_list.
2023-12-22 21:25:45 -08:00
Stefan Kangas
d386a8aa43 Recommend customizing eglot for python-base-mode
* doc/misc/eglot.texi (Project-specific configuration): Recommend
setting directory local variables for 'python-base-mode' instead of
'python-mode'.  This makes any customizations effective also for
'python-ts-mode'.
2023-12-22 22:39:55 +01:00
Eli Zaretskii
bd0c758971 Improve documentation of new native-compilation commands
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu)
(emacs-lisp-native-compile, emacs-lisp-native-compile-and-load):
Doc fixes.

* doc/lispref/compile.texi (Native-Compilation Functions):
Document 'emacs-lisp-native-compile' and
'emacs-lisp-native-compile-and-load'.
2023-12-22 16:49:49 +02:00
Stefan Kangas
1ad126c0f2 ; Fix typo 2023-12-22 11:45:40 +01:00
Stefan Monnier
77678244b8 doc/lispintro: Don't mention set (bug#67734)
* doc/lispintro/emacs-lisp-intro.texi (Using set): Delete.
(Using setq): Adjust accordingly.
(setq): Rename from "set & setq" and don't refer to `set` any more.
(Review): Don't mention `set` any more.
2023-12-21 10:24:29 -05:00
Eli Zaretskii
cb3684e9df Fix script for some characters
* lisp/international/characters.el (char-script-table): Fix script
for 2 characters.

* admin/unidata/blocks.awk: Fix script for Yijing Hexagram
Symbols.  (Bug#67924)
2023-12-20 15:55:41 +02:00
Eli Zaretskii
2922d683b7 ; * src/treesit.c (treesit_traverse_child_helper): Fix comment. 2023-12-19 18:53:18 +02:00