summaryrefslogtreecommitdiff
path: root/lisp/textmodes
Commit message (Collapse)AuthorAgeFilesLines
* ; Fix typosStefan Kangas2024-05-271-4/+4
|
* ; * lisp/textmodes/ispell.el (ispell-message): Add commentary.Eli Zaretskii2024-05-091-0/+4
|
* ; Fix bibtex-biblatex-field-alist docstring typo.Basil L. Contovounesios2024-03-121-1/+1
|
* Avoid signaling errors from 'pixel-fill-region'Eli Zaretskii2024-02-031-33/+35
| | | | | | | | * lisp/textmodes/pixel-fill.el (pixel-fill-region): Make sure the selected window displays the current buffer. This is important when this function is called inside 'with-current-buffer' or similar forms which temporarily change the buffer displayed in the selected window. (Bug#67791)
* ; Add 2024 to copyright yearsPo Lu2024-01-0254-54/+54
|
* ; Fix typoStefan Kangas2023-12-221-1/+1
|
* ; Improve documentation of ispell.el's dictionary databaseEli Zaretskii2023-12-171-2/+11
| | | | | * lisp/textmodes/ispell.el (ispell-dictionary-base-alist) (ispell-dictionary-alist): Doc fixes. (Bug#67857)
* Fix spell-checking email message with citationsEli Zaretskii2023-11-141-1/+2
| | | | | | This became broken 7 years ago, when the 'boundp condition was removed, and with it an important unrelated part of the code. * lisp/textmodes/ispell.el (ispell-message): Fix cite-regexp.
* Recognize backslash in `dns-mode` quoted valuesLassi Kortela2023-10-241-0/+1
| | | | | | | * lisp/textmodes/dns-mode.el (dns-mode-syntax-table): Recognize backslash as an escape character. (Bug#66660) (cherry picked from commit e6f05e189db73a0f0b29f987381ffef61a409232)
* Make `dns-mode` fontify quoted values correctlyStefan Kangas2023-10-241-0/+1
| | | | | | | | * lisp/textmodes/dns-mode.el (dns-mode-syntax-table): Fontify quoted values correctly. (Bug#62214) Suggested by Trent W. Buck <trentbuck@gmail.com>. (cherry picked from commit c586d984f279aa61de4f5dfc4f6df660188dd0f6)
* ; Fix error in 'tex-recenter-output-buffer'Eshel Yaron2023-09-061-9/+9
| | | | | | * lisp/textmodes/tex-mode.el (tex-recenter-output-buffer): Check that 'display-buffer' returned a window, rather than nil, before selecting it. (Bug#65762)
* Doc fixes for obsolete functions and variablesStefan Kangas2023-09-021-2/+2
| | | | | | | | | | | | | * admin/notes/multi-tty: * doc/emacs/building.texi (Debugger Operation): * doc/misc/efaq-w32.texi (Line ends by file system): * doc/misc/gnus.texi (Hashcash): * lisp/emacs-lisp/eieio.el (eieio-class-parents) (eieio-class-children): * lisp/progmodes/perl-mode.el: * lisp/textmodes/ispell.el (ispell-lookup-words): * src/buffer.h: Update or delete references to variables and functions made obsolete in Emacs 24.4.
* ; * lisp/textmodes/paragraphs.el: Remove leftover comment.Eshel Yaron2023-07-311-1/+0
| | | | | * lisp/textmodes/paragraphs.el: Remove a comment referring to code that was removed in cf605d5. (Bug#64947)
* ; Fix last change in tex-mode.elEli Zaretskii2023-06-131-1/+1
| | | | | * lisp/textmodes/tex-mode.el (tex-cmd-doc-view): Remove the second argument. (Bug#63956)
* Fix tex-mode display-buffer issuesEli Zaretskii2023-06-111-3/+3
| | | | | | | * lisp/window.el (display-tex-shell-buffer-action): New defcustom. * lisp/textmodes/tex-mode.el (tex-display-shell) (tex-cmd-doc-view, tex-recenter-output-buffer): Use it. (Bug#63956)
* Add a binding for enriched-toggle-markupRobert Pluim2023-05-291-0/+1
| | | | | | * lisp/textmodes/enriched.el (enriched-mode-map): Bind 'enriched-toggle-markup' to 'M-o m'. * etc/NEWS: Announce the change.
* Fix auto-filling in Texinfo modeEli Zaretskii2023-05-131-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes auto-filling in Texinfo buffers. It was broken by the fix to bug#49558, which made M-q fill over-long @noindent lines by refraining from customizing 'paragraph-separate' in Texinfo mode. The underlying problem here is that 'auto-fill-mode' doesn't call mode-specific filling functions, but does its job by itself, and depends on 'forward-paragraph' to find the beginning of the paragraph as appropriate for calculation of 'fill-prefix', and a different value of 'paragraph-separate' broke that. As a side effect, the change below also changes paragraph-movement commands in Texinfo back to how they behaved prior to that bugfix, but I don't see why the paragraph-movement behavior introduced by that fix made more sense. Try to move through a series of @-directives, like a paragraph preceded by several @cindex entries, and you will see the inconsistencies. In any case, the adverse effects of that fix on auto-filling is unacceptable. * lisp/textmodes/texinfo.el (fill-paragraph-separate): New variable. (texinfo-mode): Set 'fill-paragraph-separate' to the default value of 'paragraph-separate'. Customize 'paragraph-separate' to the Texinfo-specific value, as it was before commit dde591571abf. (texinfo--fill-paragraph): Bind 'paragraph-separate' to the value of 'fill-paragraph-separate', to keep 'M-q' happy.
* Improve documentation related to 'ispell-complete-word'Eli Zaretskii2023-04-111-4/+13
| | | | | | * lisp/textmodes/ispell.el (ispell-alternate-dictionary) (ispell-complete-word-dict, ispell-complete-word): Doc fixes. (Bug#62775)
* Revert 'forward-sentence-default-function' to return point (bug#62027)Manuel Giraud2023-03-071-4/+8
| | | | | | | * lisp/textmodes/paragraphs.el (forward-sentence-default-function): Revert to return the position of point. (count-sentences): Adapt to this change.
* Rename the newly added -ref- faces to -use-Dmitry Gutov2023-02-283-10/+10
| | | | | | * lisp/font-lock.el (font-lock-variable-use-face) (font-lock-property-use-face): Rename from font-lock-variable-ref-face and font-lock-property-ref-face. Update all references (bug#61655).
* Add more/finer faces for tree-sitterDmitry Gutov2023-02-253-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/modes.texi (Faces for Font Lock): Update the list of faces (bug#61655). * etc/NEWS: Update the list of new faces. * lisp/cus-theme.el (custom-theme--listed-faces): Update. * lisp/font-lock.el (font-lock-function-call-face) (font-lock-variable-ref-face, font-lock-property-ref-face): New faces. (font-lock-property-name-face): Rename from 'font-lock-property-face'. * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Use new faces. More 'enumerator' query to 'definition' feature. (c-ts-mode--fontify-declarator, c-ts-mode--fontify-variable): Use new faces. * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--font-lock-settings): Use new faces. * lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings): Use new faces. * lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings): Use new faces. * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings): Use new faces. * lisp/progmodes/js.el (js--treesit-fontify-assignment-lhs) (js--treesit-font-lock-settings): Use new faces. Highlight variable definitions inside array and object destructuring patterns. * lisp/progmodes/python.el (python--treesit-variable-p): Exclude identifiers in parameters. (python--treesit-settings): Use new faces. Highlight function parameters. Move 'keyword' up to still highlight 'self' as keyword. * lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings): Use new faces. * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings): Use new faces. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Use new faces. * lisp/textmodes/css-mode.el (css--treesit-settings): Use font-lock-property-ref-face. * lisp/textmodes/toml-ts-mode.el (toml-ts-mode--font-lock-settings): Use font-lock-property-ref-face. * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--font-lock-settings): Same.
* Make 'emacs-news-cycle-tag' work at all levelsRobert Pluim2023-02-211-1/+3
| | | | | | | * lisp/textmodes/emacs-news-mode.el (emacs-news-cycle-tag): Search for a heading starting with 2 or more '*' rather than exactly 3. * test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts (Point-Char): Add tests for 2 and 4 '*' levels.
* Rename 'emacs-news-toggle-tag' to 'emacs-news-cycle-tag'Robert Pluim2023-02-161-5/+5
| | | | | | | | | | | * lisp/textmodes/emacs-news-mode.el (emacs-news-cycle-tag): Renamed from 'emacs-news-toggle-tag'. (emacs-news-mode-map, emacs-news-mode-menu): Use new name. * test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts: Renamed from "toggle-tag.erts". * test/lisp/textmodes/emacs-news-mode-tests.el (emacs-news-cycle-tag): Rename test from 'emacs-news-toggle-tag', and call 'emacs-news-cycle-tag' with new resource file name.
* Add menu to news-modeRobert Pluim2023-02-161-0/+15
| | | | | | * lisp/textmodes/emacs-news-mode.el (emacs-news-mode-map): Add binding for 'emacs-news-delete-temporary-markers'. (emacs-news-mode-menu): Add menu for common actions.
* ; Mention Hunspell private-dictionary misfeature in doc stringsEli Zaretskii2023-02-121-2/+7
| | | | | | * lisp/textmodes/ispell.el (ispell-personal-dictionary) (ispell-local-pdict): Mention Hunspell misfeatures in doc strings. (Bug#61190)
* Make tree-sitter based modes optionalEli Zaretskii2023-01-203-6/+9
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: Update Commentary. Make 'auto-mode-alist' update conditional on the tree-sitter and grammar libraries being available. * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: Make 'auto-mode-alist' update for tree-sitter based modes be conditional on the tree-sitter and grammar libraries being available. (Bug#60559)
* Fix reftex-citation docstring (bug#60710)Manuel Uberti2023-01-101-1/+1
| | | | * lisp/textmodes/reftex-cite.el (reftex-citation): Fix spelling.
* Make 'toml-ts-mode' optionalEli Zaretskii2023-01-051-1/+0
| | | | | | | * etc/NEWS: Reflect the fact that 'toml-ts-mode' is optional. * lisp/textmodes/toml-ts-mode.el (auto-mode-alist): Don't autoload the addition of 'toml-ts-mode'. (Bug#60559)
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-0154-54/+54
|
* ; Fix typosStefan Kangas2022-12-311-1/+1
|
* lisp/textmodes/bibtex.el: fix bibtex-beginning-of-entry (bug#56636)Roland Winkler2022-12-291-4/+12
| | | | | lisp/textmodes/bibtex.el (bibtex-beginning-of-entry): use bibtex-any-entry-maybe-empty-head (bug#56636)
* lisp/textmodes/bibtex.el: Treat $ as punctuation in BibTeX fields (bug#50202)Roland Winkler2022-12-291-4/+8
|
* Add color fontification in css-ts-mode (bug#60405)Yuan Fu2022-12-291-1/+5
| | | | | * lisp/textmodes/css-mode.el (css-ts-mode): Add color fontification and syntax-propertize-function.
* ; * lisp/textmodes/css-mode.el (css-ts-mode): Fix imenu setup.Yuan Fu2022-12-291-2/+2
|
* ; Fix one more treesit byte-compilation warning.Eli Zaretskii2022-12-281-0/+1
|
* ; Avoid treesit-related byte-compiler warningsEli Zaretskii2022-12-281-0/+1
| | | | | | | | | * lisp/progmodes/json-ts-mode.el (treesit-node-child-by-field-name): * lisp/textmodes/toml-ts-mode.el (treesit-node-child-by-field-name): * lisp/progmodes/java-ts-mode.el (treesit-node-child-by-field-name): * lisp/progmodes/csharp-mode.el (treesit-node-child-by-field-name): Avoid byte-compilation warnings about treesit-node-type.
* Update tree-sitter major modes to use the new Imenu facilityYuan Fu2022-12-272-64/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See previous commit for more explanation. * lisp/progmodes/c-ts-mode.el (c-ts-mode--defun-name): Handle more types. (c-ts-mode--imenu-1) (c-ts-mode--imenu): Remove functions. (c-ts-base-mode): Setup Imenu. * lisp/progmodes/csharp-mode.el (csharp-ts-mode--imenu-1) (csharp-ts-mode--imenu): Remove functions. (csharp-ts-mode): Setup Imenu. * lisp/progmodes/java-ts-mode.el (java-ts-mode--imenu-1) (java-ts-mode--imenu): Remove functions. (java-ts-mode): Setup Imenu. * lisp/progmodes/js.el (js--treesit-imenu-1) (js--treesit-imenu): Remove functions. (js--treesit-valid-imenu-entry): New function. (js-ts-mode): Setup Imenu. * lisp/progmodes/json-ts-mode.el (json-ts-mode--defun-name): Trim the quotes. (json-ts-mode--imenu-1) (json-ts-mode--imenu): Remove functions. (json-ts-mode): Setup Imenu. * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--imenu) (rust-ts-mode--imenu-1): Remove functions. (rust-ts-mode): Setup Imenu. * lisp/progmodes/typescript-ts-mode.el: (typescript-ts-base-mode): Remove treesit-defun-prefer-top-level, it's not used anymore. Setup Imenu. Setup treesit-defun-name-function. * lisp/textmodes/css-mode.el (css--treesit-imenu-1) (css--treesit-imenu): Remove functions. (css-ts-mode): Setup Imenu. * lisp/textmodes/toml-ts-mode.el (toml-ts-mode--defun-name): Fix it and add a fallback. (toml-ts-mode--imenu-1) (toml-ts-mode--imenu): Remove functions. (toml-ts-mode): Setup Imenu.
* Support treesit-defun-name in tree-sitter major modesYuan Fu2022-12-242-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/csharp-mode.el (csharp-ts-mode--defun-name): New function. (csharp-ts-mode--imenu-1): Extract into new function. (csharp-ts-mode): Setup treesit-defun-name-function. * lisp/progmodes/java-ts-mode.el (java-ts-mode--defun-name): New function. (java-ts-mode--imenu-1): Extract into new function. (java-ts-mode): Setup treesit-defun-name-function. * lisp/progmodes/js.el (js-treesit-current-defun): Remove function. This function is not used (for a while already). (js--treesit-defun-name): New function. (js--treesit-imenu-1): Extract into new function. (js-ts-mode): Setup treesit-defun-name-function. * lisp/progmodes/json-ts-mode.el (json-ts-mode--defun-name): New function. (json-ts-mode--imenu-1): Extract into new function. (json-ts-mode): Setup treesit-defun-name-function. * lisp/progmodes/python.el (python--treesit-defun-name): New function. (python--imenu-treesit-create-index-1): Extract into new function. (python-ts-mode): Setup treesit-defun-name-function. * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--defun-name): New function. (rust-ts-mode--imenu-1): Extract into new function. (rust-ts-mode): Setup treesit-defun-name-function. * lisp/textmodes/css-mode.el (css--treesit-defun-name): New function. (css--treesit-imenu-1): Extract into new function. (css-ts-mode): Setup treesit-defun-name-function. * lisp/textmodes/toml-ts-mode.el (toml-ts-mode--get-table-name): Remove function. (toml-ts-mode--defun-name): New function. (toml-ts-mode--imenu-1): Extract into new function. (toml-ts-mode): Setup treesit-defun-name-function.
* ; Fix docstringIkumi Keita2022-12-221-2/+2
| | | | | * lisp/textmodes/reftex-vars.el (reftex-allow-detached-macro-args): Fix macro name in docstring.
* Add yaml-ts-mode (Bug#60105)Randy Taylor2022-12-161-0/+151
| | | | | | | | | * admin/notes/tree-sitter/build-module/batch.sh: * admin/notes/tree-sitter/build-module/build.sh: Add yaml support. * etc/NEWS: Mention it. * lisp/textmodes/yaml-ts-mode.el: New major mode with tree-sitter support. * lisp/progmodes/eglot.el (eglot-server-programs): Add it.
* ; Fix typosStefan Kangas2022-12-161-1/+1
|
* Introduce support for TOML config-formatJostein Kjønigsen2022-12-141-0/+187
| | | | | | | | | | | | | | | This commit introduces support for the semi-popular TOML config-format[1] through a new major-mode: toml-ts-mode. I've read through the full spec[2], and from what I can see this major-mode should provide correct syntax-highligting for every sort of config-declaration which adheres to the specification. Besides that it also adds support for imenu and basic tree-sitter based navigation. [1] https://toml.io/en/ [2] https://toml.io/en/v1.0.0
* Fix handling of % when searching in .tex or .dtx filesArash Esbati2022-12-141-4/+7
| | | | | | * lisp/textmodes/reftex.el (reftex-compile-variables): Consider % when building the regexp for searching only in .dtx files. (AUCTeX bug#59638)
* * lisp/textmodes/texinfo.el (texinfo-flymake): Improve docstring.Stefan Kangas2022-12-131-0/+2
|
* Adapt manual names in emacs-news-modeMichael Albinus2022-12-091-1/+1
| | | | | * lisp/textmodes/emacs-news-mode.el (emacs-news--buttonize): Allow hyphen in manual names.
* Fix syntax-table for tree-sitter modesTheodor Thornhill2022-12-071-0/+1
| | | | | | | | | | | | | | | | | | When adapting the 'c-populate-syntax-table' for tree-sitter, I misread the code, and thus some crucial entries were missing. For the relevant modes we use the same table as specified in the non-tree-sitter major mode. * lisp/progmodes/c-ts-mode.el (c-ts-mode--syntax-table): Add new entries. * lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add new entries. * lisp/progmodes/java-ts-mode.el (java-ts-mode--syntax-table): Add new entries. * lisp/progmodes/json-ts-mode.el (json-ts-mode--syntax-table): Add new entries. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--syntax-table): Add new entries. * lisp/textmodes/css-mode.el (css-ts-mode): Add new entries.
* Fix treesit-query-captureYuan Fu2022-12-051-5/+0
| | | | | | | | | | | | | | | | | | | Before this change Ftreesit_query_capture doesn't convert character position to byte position for BEG and END parameters. I observed fontification issue in css files but couldn't figure out why, now I know :-) I decide to keep treesit--font-lock-query-expand-range, since it might provide a escape hatch for problems we discover in the future, and it should be very cheap so no downside of keeping it. * lisp/textmodes/css-mode.el (css-ts-mode): Stop setting treesit--font-lock-query-expand-range. * lisp/treesit.el (treesit--font-lock-query-expand-range): Update docstring. * src/treesit.c (Ftreesit_query_capture): Convert BEG and END to byte position. Also added parentheses wround "beg_byte - visible_beg" in the call to ts_query_cursor_set_byte_range (i.e., style change).
* ; Fix typos (don't abbreviate "with" or "without")Stefan Kangas2022-12-011-1/+2
|
* Add more font-lock settings to css-ts-modeTheodor Thornhill2022-11-281-3/+31
| | | | | | * lisp/textmodes/css-mode.el (css--treesit-settings): Add new font-lock features 'query', 'keyword', 'operator' and 'bracket'. (css-ts-mode): Use new features.
* ; Fix typosStefan Kangas2022-11-231-1/+1
|