aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Fix documentation of 'emacs-news-mode' commandsEli Zaretskii48 hours1-9/+27
| | | | | | | | * lisp/textmodes/emacs-news-mode.el (emacs-news-next-untagged-entry) (emacs-news-previous-untagged-entry, emacs-news-cycle-tag) (emacs-news-count-untagged-entries, emacs-news-goto-section) (emacs-news-find-heading, emacs-news-open-line) (emacs-news-delete-temporary-markers): Doc fixes. (Bug#80569)
* * lisp/textmodes/fill.el (unfill-paragraph): Fix for wide chars.Sean Whitton2 days1-1/+3
|
* unfill-paragraph: Reimplement in terms of fill-regionSean Whitton5 days1-43/+15
| | | | | * lisp/textmodes/fill.el (unfill-paragraph): Reimplement in terms of fill-region.
* ; Move unfill-paragraph to fill.el. Document it in (elisp)Filling.Sean Whitton5 days1-0/+57
|
* Rename 'any' to 'member-if' and deprecate 'cl-member-if'Sean Whitton6 days1-3/+3
| | | | | | | | | | | | * lisp/subr.el (any): Rename from this ... (member-if): ... to this. All uses changed. (any): New function alias. * lisp/emacs-lisp/cl-seq.el (cl-member-if): Mark obsolete. * lisp/obsolete/cl.el (member-if): Delete obsolete function alias. * doc/lispref/lists.texi (List Elements): * doc/misc/cl.texi (Lists as Sets): * etc/NEWS: Document the change.
* Revert "Rename 'any' to 'member-if' and deprecate 'cl-member-if'"Mattias Engdegård7 days1-3/+3
| | | | | | This reverts commit 2bdf15f6d8293b21234cd236f39ce68f62e1f6c3. There is no consensus for this change.
* Rename 'any' to 'member-if' and deprecate 'cl-member-if'Sean Whitton7 days1-3/+3
| | | | | | | | | | | | | | * lisp/subr.el (any): Rename from this ... (member-if): ... to this. All uses changed. Implement '&key KEY-FN' for backwards compatibility. (any): New function alias. * lisp/emacs-lisp/cl-seq.el (cl-member-if): Make an alias for 'member-if'. * lisp/obsolete/cl.el (member-if): Delete obsolete function alias. * doc/lispref/lists.texi (List Elements): * doc/misc/cl.texi (Lists as Sets): * etc/NEWS: Document the change.
* Fix broken `FOO-mode-indent-offset` conventionStefan Monnier2026-02-223-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variable names to control indentation have never been standardized, but over the years some conventions have naturally arisen, mostly the use of `FOO-indent-offset`, `FOO-basic-offset`, or `FOO-indent-level` for `FOO-mode`. When the new TS modes were introduced, a mistake was made that I failed to catch at the time, where those modes used `FOO-mode-indent-offset` instead of the "standard" `FOO-indent-offset`. In order to save packages like `editorconfig-mode` and `indent-bars-mode` from having to cater to yet-another-convention, rename those vars to what they should have been all along. * lisp/editorconfig.el (editorconfig-indentation-alist): Remove the ad-hoc entries for the deviating modes using `FOO-mode-indent-offset`. * lisp/textmodes/toml-ts-mode.el (toml-ts-indent-offset): * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-js-css-indent-offset) (mhtml-ts--js-css-indent-offset): * lisp/textmodes/html-ts-mode.el (html-ts-indent-offset): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-indent-offset): * lisp/progmodes/php-ts-mode.el (php-ts-indent-offset) (php-ts-js-css-indent-offset, php-ts-html-indent-offset): * lisp/progmodes/json-ts-mode.el (json-ts-indent-offset): * lisp/progmodes/java-ts-mode.el (java-ts-indent-offset) (java-ts-method-chaining-indent-offset): * lisp/progmodes/go-ts-mode.el (go-ts-indent-offset): * lisp/progmodes/csharp-mode.el (csharp-ts-indent-offset): * lisp/progmodes/cmake-ts-mode.el (cmake-ts-indent-offset): * lisp/progmodes/c-ts-mode.el (c-ts-indent-offset): Rename `FOO-mode-indent-offset` to `FOO-indent-offset`, with obsolete alias.
* ; Use 'treesit-declare-unavailable-functions' in markdown-ts-mode.Eli Zaretskii2026-02-221-4/+1
|
* Add support for hiding markup delimiters in markdown-ts-modeRahul Martim Juliato2026-02-211-13/+52
| | | | | | | | | | | | | | | | | | * lisp/textmodes/markdown-ts-mode.el (markdown-ts-hide-markup): New defcustom controlling visibility of markup delimiters. (markdown-ts--fontify-delimiter): Fontify delimiter nodes and conditionally apply invisibility. (markdown-ts--set-hide-markup): Internal helper to update invisibility state. (markdown-ts-toggle-hide-markup): Interactive command to toggle delimiter visibility. (markdown-ts-setup): Initialize delimiter hiding according to 'markdown-ts-hide-markup' and register managed properties. (markdown-ts--treesit-settings): Use 'markdown-ts--fontify-delimiter' for delimiter nodes. (require 'outline): Ensure outline faces are available so headings are fontified correctly on first load.
* ; Fix last changeEli Zaretskii2026-02-141-2/+2
| | | | | * lisp/textmodes/page-ext.el (pages-directory-list-all-headers-p) (pages-directory-count-lines-p): Doc fixes.
* Add revert capability for page directory bufferMarco Wahl2026-02-141-1/+21
| | | | | | | | * lisp/textmodes/page-ext.el (pages-directory-revert-function): New function. (pages-directory-list-all-headers-p, pages-directory-count-lines-p) (pages-directory-regexp): New variables to store the page directory style. (Bug#80319)
* (yaml-ts-mode-yamllint-options): Use a list of stringsStefan Monnier2026-02-041-8/+4
| | | | | | | | | It is both simpler to code and marginally more general (allows spaces in arguments). * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode-yamllint-options): Use a list. (yaml-ts-mode-flymake): Adjust accordingly.
* Support cons cell for 'line-spacing'Daniel Mendler2026-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce the change. * src/dispextern.h (struct glyph_row): Add 'extra_line_spacing_above' member. (struct it): Add 'extra_line_spacing_above' member. * src/frame.h (struct frame): Add 'extra_line_spacing_above' member. Update comment for 'extra_line_spacing.' * src/buffer.c (syms_of_buffer): Update the docstring of 'line-spacing' to describe the cons cell usage. * src/buffer.h (struct buffer): Update comment for 'extra_line_spacing'. * src/frame.c (gui_set_line_spacing): Handle cons cell value for 'line-spacing'. Calculate and set 'extra_line_spacing_above' for both integer and float pairs. * src/xdisp.c (init_iterator): Initialize 'extra_line_spacing_above' from buffer or frame 'line-spacing', handling cons cells for both integer and float values. (gui_produce_glyphs): Use 'extra_line_spacing_above' to distribute spacing between ascent and descent. Update 'max_extra_line_spacing' calculation. (resize_mini_window): Take line spacing into account when resizing the mini window. Pass height of a single line to 'grow_mini_window' and 'shrink_mini_window'. * src/window.c (grow_mini_window, shrink_mini_window): Add unit argument which defines height of a single line. * src/window.h (grow_mini_window, shrink_mini_window): Adjust function prototypes accordingly with unit argument. * lisp/subr.el (total-line-spacing): New function to calculate total spacing from a number or cons cell. (posn-col-row): Use total-line-spacing. * lisp/simple.el (default-line-height): Use 'total-line-spacing'. * lisp/textmodes/picture.el (picture-mouse-set-point): Use 'total-line-spacing'. * lisp/window.el (window-default-line-height): Use 'total-line-spacing'. (window--resize-mini-window): Take 'line-spacing' into account. * test/lisp/subr-tests.el (total-line-spacing): New test. * test/src/buffer-tests.el (test-line-spacing): New test. * doc/emacs/display.texi (Display Custom): Document that 'line-spacing' can be a cons cell. (Line Height): Document the new cons cell format for 'line-spacing' to allow vertical centering. Co-authored-by: Przemysław Alexander Kamiński <alexander@kaminski.se> Co-authored-by: Daniel Mendler <mail@daniel-mendler.de>
* ; Fix :type of 'yaml-ts-mode-yamllint-options'Eli Zaretskii2026-01-221-2/+5
| | | | | * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode-yamllint-options): Fix :type and doc string.
* ; * lisp/textmodes/yaml-ts-mode.el: Fix docstring wider than 80 characters.Juri Linkov2026-01-211-1/+1
|
* Flymake support for yaml-ts-mode.Vincenzo Pupillo2026-01-211-0/+85
| | | | | | | | | * etc/NEWS: Announce the new customization option (bug#80215). * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): New customization group. (yaml-ts-mode-yamllint-options): New customization option. (yaml-ts-mode--flymake-process): New variable that stores the reference to the flymake process. (yaml-ts-mode-flymake): New function that implements support for Flymake.
* ; Remove redundant cl-lib runtime dependencies across lisp/USAMI Kenta2026-01-175-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/editorconfig-tools.el: * lisp/emacs-lisp/shorthands.el: * lisp/info-xref.el: * lisp/international/quail.el: * lisp/international/rfc1843.el: * lisp/mail/ietf-drums.el: * lisp/mail/rfc2047.el: * lisp/mail/yenc.el: * lisp/net/pop3.el: * lisp/net/sasl-scram-sha256.el: * lisp/net/shr-color.el: * lisp/progmodes/grep.el: * lisp/scroll-bar.el: * lisp/textmodes/emacs-news-mode.el: * lisp/textmodes/reftex-auc.el: * lisp/textmodes/reftex-dcr.el: * lisp/textmodes/reftex-global.el: * lisp/textmodes/reftex-sel.el: * lisp/url/url-dav.el: * lisp/vc/vc-src.el: * lisp/xwidget.el: * lisp/yank-media.el: Remove redundant (require 'cl-lib). (Bug#80129)
* New minor mode center-line-modeAmin Bandali2026-01-171-0/+50
| | | | | | | | | | | | | | * lisp/textmodes/text-mode.el (center-line-mode--track-changes): New local variable for storing the id of the change tracker registered for the current buffer. (center-line-mode--track-changes-signal): New function to be called by the track-changes library whenever there is a change in the current buffer. (center-line-mode--track-changes-function): New function called from the above signal function, iterates over the lines of the modified region, calling 'center-line' for each non-empty line. (center-line-mode): New minor mode. * etc/NEWS: Document the new minor mode.
* ; Improve docs for last change.Sean Whitton2026-01-141-3/+3
|
* Allow Ispell to save corrections as abbrevsPaul Nelson2026-01-141-40/+112
| | | | | | | | | | | | | | | * lisp/textmodes/ispell.el (ispell-save-corrections-as-abbrevs): New user option. (ispell--abbrev-saving-allowed) (ispell--save-correction-as-abbrev): New variables. (ispell--maybe-save-correction-abbrev): New function. (ispell-word, ispell-process-line): Use them to save corrections as abbrevs when appropriate (bug#79985). (ispell-command-loop): Add C-u as command character to toggle abbrev saving for an immediately following replacement command. (ispell-help): Document C-u binding. * doc/emacs/fixit.texi (Spelling): Document new feature.
* sgml-mode.el: Prefer `forward-sexp` over `forward-list`Stefan Monnier2026-01-131-36/+25
| | | | | | | | | | | | | | | They're always called immediately before a `<` char, in which case they do the same anyway. This saves us from having to touch `forward-list-function` in addition to `forward-exp-function`. While at it, change `sgml-tags-invisible` to use `define-minor-mode`. * lisp/textmodes/sgml-mode.el (sgml-delete-tag) (sgml-electric-tag-pair-before-change-function): Prefer `forward-sexp` over `forward-list`. (sgml-tags-invisible): Define with `define-minor-mode`. Don't disable `cursor-sensor-mode` when we don't need it any more, since some other package may be using it. Remove redundant binding of `inhibit-read-only`.
* * lisp/textmodes/html-ts-mode.el: Special handling of 'show-paren-mode'.Juri Linkov2026-01-131-1/+18
| | | | | | | (html-ts-mode--show-paren-data): New function to exclude unbalanced tags when the closing tag is missing. (html-ts-mode): Set 'show-paren-data-function' to 'html-ts-mode--show-paren-data' (bug#80151).
* * lisp/textmodes/sgml-mode.el: Fix for html-ts-mode.Juri Linkov2026-01-131-3/+8
| | | | | | | | | | | (sgml-electric-tag-pair-before-change-function): Let-bind 'forward-list-function' to nil. (sgml-delete-tag): Let-bind 'forward-sexp-function' and 'forward-list-function' to nil. (sgml-tags-invisible): Let-bind 'forward-list-function' to nil. All this is required to use the default definitions of sexp/list that significantly differ from treesit definitions (bug#80151).
* ; Don't mark some symbols as linksArash Esbati2026-01-011-13/+13
| | | | | | | * lisp/textmodes/reftex-vars.el (reftex-auto-recenter-toc) (reftex-label-alist, reftex-index-phrases-logical-and-regexp) (reftex-index-phrases-logical-or-regexp): Don't mark symbols as links.
* ; Add 2026 to copyright years.Sean Whitton2026-01-0157-57/+57
|
* December 2025 spelling fixesPaul Eggert2025-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
* New 'R' code letter for 'interactive' formsSean Whitton2025-12-081-3/+1
| | | | | | | | | | | | | | | | | | | * src/callint.c (callint_argfuns): Add use-region-beginning and use-region-end. (syms_of_callint): Protect use-region-beginning and use-region-end. Add DEFSYM for Quse_region_p. (Fcall_interactively): New 'R' code letter. * lisp/textmodes/paragraphs.el (repunctuate-sentences): * lisp/vc/diff-mode.el (diff-delete-other-hunks, diff-apply-hunk) (diff-revert-and-kill-hunk, diff-apply-buffer): * lisp/vc/log-view.el (log-view-mark-entry) (log-view-unmark-entry): Use it. * doc/lispref/commands.texi (Interactive Codes): * doc/lispref/markers.texi (The Region): * etc/NEWS: * lisp/simple.el (use-region-beginning, use-region-end) (use-region-p): * src/callint.c (Finteractive): Document it.
* * lisp/textmodes/bibtex.el (bibtex-mode): Fix hs variables (bug#79934).Elías Gabriel Pérez2025-12-081-2/+2
|
* ; Improve documentation of fill-region-as-paragraph-semlfRoi Martin2025-12-061-2/+2
| | | | | * lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Create hyperlinks to URLs.
* ; Improve documentation of 'fill-region-as-paragraph'Eli Zaretskii2025-12-061-1/+5
| | | | | | * lisp/textmodes/fill.el (fill-region-as-paragraph-default) (fill-separate-heterogeneous-words-with-space): Doc fixes. (Bug#79575)
* Improve performance of 'flyspell-goto-next-error'Kristoffer Balintona2025-12-041-10/+4
| | | | | | * lisp/textmodes/flyspell.el (flyspell-goto-next-error): Use 'next-overlay-change' and 'previous-overlay-change'. (Bug#79933)
* Fix whitespace in remember.elEli Zaretskii2025-12-011-1/+1
| | | | | * lisp/textmodes/remember.el (remember-mode): Remove redundant whitespace. Patch by Huang Jing <rne.kou@icloud.com> (bug#79928).
* Fix bug in semantic linefeed fillingRoi Martin2025-11-301-7/+11
| | | | | | | | | Fix bug in semantic linefeed filling related to wide characters and `sentence-end-without-space'. * lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Fix the calculation of the maximum column. Do not depend on where `fill-region-as-paragraph-default' leaves point after being called. (Bug#79575)
* Remove the cached values in tree-sitter modes (bug#79363)Yuan Fu2025-11-281-48/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cached values are not needed anymore since Emacs now caches the compiled queries. * lisp/progmodes/cmake-ts-mode.el: (cmake-ts-mode--indent-rules-cached): Remove. (cmake-ts-mode--indent-rules): Return values directly. (cmake-ts-mode--font-lock-settings-cached): Remove. (cmake-ts-mode--font-lock-settings): Return values directly. * lisp/progmodes/php-ts-mode.el: (php-ts-mode--font-lock-settings-cached): Remove. (php-ts-mode--font-lock-settings): Return values directly. (php-ts-mode--custom-html-font-lock-settings-cached): Remove. (php-ts-mode--custom-html-font-lock-settings): Return values directly. * lisp/textmodes/mhtml-ts-mode.el: (mhtml-ts-mode--treesit-font-lock-settings-cached): Remove. (mhtml-ts-mode--treesit-font-lock-settings): Return values directly. (mhtml-ts-mode--treesit-indent-rules-cached): Remove. (mhtml-ts-mode--treesit-indent-rules): Return values directly. * lisp/progmodes/cmake-ts-mode.el: (cmake-ts-mode--indent-rules-cached): Remove (cmake-ts-mode--indent-rules): Return values directly. (cmake-ts-mode--font-lock-settings-cached): Remove. (cmake-ts-mode--font-lock-settings): Return values directly. * lisp/progmodes/csharp-mode.el: (csharp-ts-mode--font-lock-settings-cached): Remove. (csharp-ts-mode--font-lock-settings): Return values directly.
* Fix ispell’s handling of comment-end when adding local wordsReuben Thomas2025-11-221-30/+35
| | | | | | | | | | | | | | | | | | | * lisp/textmodes/ispell.el (ispell-add-per-file-word-list): Deal with `comment-end' in a way that works for comments that don’t nest. We proceed as follows: when `comment-end' is non-empty, we only ever insert one start and one end comment, the first time we add a local word. This works with both C-style (which don’t nest) and Rust-style comments (which do). If we’re using line comments (i.e. comments that only have a `comment-start'), then continue to insert one on each line. * test/lisp/textmodes/ispell-tests/ispell-tests.el (ispell/ispell-add-per-file-word-list/nxml): Adjust test. Bug#79871
* Improve hideshow support for heex-ts-mode and yaml-ts-modeJuri Linkov2025-11-101-0/+3
| | | | | | | | * lisp/progmodes/heex-ts-mode.el (heex-ts--thing-settings): Add 'defun' thing. (heex-ts-mode): Use it in 'hs-treesit-things'. * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Set 'hs-treesit-things' and 'hs-adjust-block-end-function'.
* hideshow: Rework previous changesElías Gabriel Pérez2025-11-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/hideshow.el: Set default values of buffer-local variables. (hs-inside-comment-p): Restore. (hs--set-variable): Rename from 'hs--get-mode-value'. (hs-grok-mode-type): Rework. * lisp/nxml/nxml-mode.el: * lisp/progmodes/f90.el: * lisp/progmodes/fortran.el: * lisp/progmodes/icon.el: * lisp/progmodes/lua-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/verilog-mode.el: * lisp/progmodes/vhdl-mode.el: * lisp/textmodes/mhtml-mode.el: * lisp/textmodes/sgml-mode.el: * lisp/treesit.el (treesit-major-mode-setup): Rename 'hs-forward-sexp-func' to 'hs-forward-sexp-function', 'hs-adjust-block-beginning' to 'hs-adjust-block-beginning-function', 'hs-find-block-beginning-func' to 'hs-find-block-beginning-function', 'hs-find-next-block-func' to 'hs-find-next-block-function', 'hs-looking-at-block-start-p-func' to 'hs-looking-at-block-start-predicate', 'hs-inside-comment-p-func' to 'hs-inside-comment-predicate'.
* hideshow: Rework previous changesElías Gabriel Pérez2025-11-063-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/programs.texi (Hideshow): * etc/NEWS: Fix doc. * lisp/progmodes/hideshow.el: Update Commentary Header. (hs-modes-alist): Remove. (hs--get-mode-value, hs-grok-mode-type): Rework. * lisp/treesit.el (treesit-major-mode-setup): * lisp/emacs-lisp/lisp-mode.el: * lisp/nxml/nxml-mode.el: * lisp/progmodes/cc-mode.el: * lisp/progmodes/f90.el: * lisp/progmodes/fortran.el: * lisp/progmodes/hideshow.el: * lisp/progmodes/icon.el: * lisp/progmodes/js.el: * lisp/progmodes/lua-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/verilog-mode.el: * lisp/progmodes/vhdl-mode.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/mhtml-mode.el: * lisp/textmodes/sgml-mode.el: * lisp/treesit.el: Fix and rework previous changes.
* hideshow: Rewrite 'hs-special-modes-alist'Elías Gabriel Pérez2025-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the format in 'hs-special-modes-alist' to make easier to exclude some values, add support for settings inheritance according to current major mode and parents, and support string hiding for lisp modes. Bug#79671 * lisp/progmodes/hideshow.el (hs-modes-alist): New variable. (hs-special-modes-alist): Mark as obsolete. (hs-forward-sexp-func, hs-adjust-block-beginning) (hs-find-block-beginning-func, hs-find-next-block-func) (hs-looking-at-block-start-p-func): Set default values to nil. (hs-inside-comment-p): Remove function. (hs-adjust-block-end, hs-treesit-things): New buffer-local variables. (hs-block-positions): Minor updates. (hs--get-mode-value): New function. (hs-grok-mode-type): Rewrite. * lisp/progmodes/f90.el (hs-special-modes-alist): * lisp/progmodes/fortran.el (hs-special-modes-alist): * lisp/progmodes/icon.el (icon-mode): * lisp/progmodes/lua-mode.el (lua-mode): * lisp/progmodes/python.el (python-base-mode): * lisp/progmodes/verilog-mode.el (verilog-mode): * lisp/progmodes/vhdl-mode.el (vhdl-hs-minor-mode): Rewrite settings. * lisp/progmodes/python.el (python-ts-hs-adjust-block-end-fn): New function. * lisp/treesit.el (treesit-hs-block-end) (treesit-hs-find-block-beginning, treesit-hs-find-next-block) (treesit-hs-looking-at-block-start-p): Minor updates. * doc/emacs/programs.texi (Hideshow): * etc/NEWS: Document changes.
* Skip unknown language for code block in markdown-ts-mode (bug#79670)Yuan Fu2025-10-291-5/+10
| | | | | | | * lisp/textmodes/markdown-ts-mode.el: (markdown-ts--convert-code-block-language): Return nil if the langauge doesn't have a corresponding major mode in markdown-ts-code-block-source-mode-map.
* Check if treesit-major-mode-remap-alist is bound in ts-modes autoload formsJuri Linkov2025-10-165-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/markdown-ts-mode.el: * lisp/textmodes/mhtml-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: In autoload forms replace '(treesit-available-p)' with (boundp 'treesit-major-mode-remap-alist). Calling 'treesit-available-p' in loaddefs.el is too early since the tree-sitter library might not be loaded yet. Checking if 'treesit-major-mode-remap-alist' is bound is equivalent to checking if Emacs is compiled with tree-sitter support. (bug#79622)
* Replace obsolete floatfig package with floatfltArash Esbati2025-10-101-4/+5
| | | | | | | | | | | * doc/misc/reftex.texi (Builtin Label Environments): Mention the floatflt LaTeX package instead of the obsolete floatfig. * lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Replace obsolete floatfig entry with floatflt. Add entry for "floatingtable". Fix type indicator for "tabwindow". (reftex-default-label-alist-entries): Use floatflt as well.
* Remove setting of reference formatArash Esbati2025-10-091-2/+2
| | | | | | * lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Don't set the reference format for ?f and ?t type indicators in entries of subfig.
* ; (read-string-from-buffer): Fix thinko and typo.Eshel Yaron2025-09-271-4/+2
|
* Fix font lock and cache indent rules in mhtml-ts-modeRoi Martin2025-09-211-39/+50
| | | | | | | | | | | | Fix font lock in mhtml-ts-mode when the required tree-sitter grammars are automatically installed (bug#79363). Also, cache tree-sitter indent rules. * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--treesit-font-lock-settings): Evaluate the rules only after the tree-sitter grammars are installed. (mhtml-ts-mode--treesit-indent-rules): Cache indent rules. (mhtml-ts-mode): Call the new `mhtml-ts-mode--treesit-font-lock-settings' function.
* * lisp/textmodes/mhtml-ts-mode.el: Fix for recent changes in js-ts-mode.Juri Linkov2025-09-181-2/+2
| | | | | | | (mhtml-ts-mode--treesit-font-lock-settings): Replace variable 'js--treesit-font-lock-settings' with the function call. (mhtml-ts-mode--treesit-indent-rules): Replace variable 'js--treesit-indent-rules' with the function call (bug#79363).
* Add tests to ispell.el interactive functionsLockywolf2025-09-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/ispell.el (ispell-accept-output): Fix variable init. * test/lisp/textmodes/ispell-resources/fake-aspell-new.bash: Update mock aspell to be able to serve all tests. * test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el: (ispell/aspell/ispell-word/english/correct): Implement. (ispell/aspell/ispell-word/english/incorrect): Implement. (ispell/aspell/ispell-word/english/wrong-language): Implement. * test/lisp/textmodes/ispell-tests/ispell-hunspell-tests.el Fix byte compilation errors. * test/lisp/textmodes/ispell-international-ispell-tests.el Fix byte compilation errors. * test/lisp/textmodes/ispell-tests/ispell-tests-common.el (with-ispell-global-dictionary): Implement a macro to set and restore ispell.el's global dictionary. * test/lisp/textmodes/ispell-tests/ispell-tests.el: (ispell/ispell-buffer-local-words/ispell-words-keyword): Fix CI run. (ispell/ispell-accept-buffer-local-defs/simple): Fix skip condition. (ispell/ispell--run-on-word/default): Fix skip condition. (ispell/ispell-word/default/check-only/correct): Fix global variable. (ispell/ispell-word/default/check-only/correct/add-init): Fix global variable. (ispell/ispell-word/default/check-only/incorrect): Fix skip condition. (ispell/ispell-region/incorrect): Fix postcondition. (ispell/ispell-call-process/simple): Fix emacs path. (ispell/ispell-call-process/simple-writable): Fix emacs path. (ispell/ispell-call-process-region/cat-empty): Fix emacs path. (ispell/ispell-call-process-region/cat-random): Fix emacs path. (ispell/ispell-kill-ispell): Implement. (ispell/ispell/buffer): Implement. (ispell/ispell/region): Implement. (ispell/ispell-change-dictionary): Implement. (ispell/ispell-comments-and-strings/correct): Implement. (ispell/ispell-comments-and-strings/incorrect): Implement. (ispell/ispell-comment-or-string-at-point): Implement. (ispell/ispell-pdict-save): Implement. (ispell/ispell-pdict-save/force): Implement. (ispell/ispell-pdict-save/modified): Implement. (ispell/ispell-pdict-save/unmodified): Implement. (ispell/ispell-lookup-words/simple): Implement. (ispell/ispell-complete-word/ispell-completion-at-point): Implement. (ispell/ispell-complete-word-interior-frag/simple): Implement. (ispell/ispell-minor-mode/simple): Implement. (ispell/ispell-message/correct): Implement. (ispell/ispell-message/incorrect): Implement.
* * lisp/textmodes/markdown-ts-mode.el: Fix embed settings.Juri Linkov2025-08-291-22/+28
| | | | | | | (markdown-ts--range-settings): Move embed settings for html/toml/yaml to 'markdown-ts-setup'. (markdown-ts-setup): Append range rules to 'treesit-range-settings' only when grammars for html/toml/yaml are installed.
* Silence byte-compile warnings when treesit is not availableJuri Linkov2025-08-185-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/markdown-ts-mode.el: * lisp/textmodes/mhtml-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: Declare 'treesit-major-mode-remap-alist' and 'treesit-language-available-p' to silence warnings that are false alarms. Also improve docstrings.