aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/modes.texi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in smie-rules-function documentationMorgan Willcock2026-02-111-1/+1
| | | | | | | | | | Fix a typo in the documentation for the expected arguments when calling smie-rules-function to set the indentation offset of function arguments. * doc/lispref/modes.texi (SMIE Indentation): * lisp/emacs-lisp/smie.el (smie-rules-function): Fix typo in documentation for smie-rules-function arguments.
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Merge from origin/emacs-30Eli Zaretskii2025-11-011-10/+11
|\ | | | | | | 0974418f2a8 Improve and correct documentation of 'font-lock-keywords-...
| * Improve and correct documentation of 'font-lock-keywords-only'Eli Zaretskii2025-10-251-10/+11
| | | | | | | | | | | | * lisp/font-lock.el (font-lock-keywords-only): * doc/lispref/modes.texi (Syntactic Font Lock): Improve documentation of 'font-lock-keywords-only'. (Bug#79692)
* | (custom-initialize-after-file): New functionStefan Monnier2025-10-221-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some global minor modes require initialization. Those that are preloaded currently abuse `custom-initialize-delay` for that, but it's suboptimal and doesn't help those that aren't preloaded. So introduce a new function to fill that need. While at it, make `define-globalized-minor-mode` use it automatically when useful. * lisp/custom.el (custom-initialize-after-file-load): New function. * lisp/tooltip.el (tooltip-mode): * lisp/paren.el (show-paren-mode): * lisp/rfn-eshadow.el (file-name-shadow-mode): * lisp/epa-hook.el (auto-encryption-mode): * lisp/minibuffer.el (minibuffer-regexp-mode, minibuffer-nonselected-mode): * lisp/electric.el (electric-indent-mode): Use it instead of `custom-initialize-delay` since the value does not depend on the runtime context. (electric-quote-mode): Don't use `custom-initialize-delay` since the default value is nil anyway. * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Automatically add `:initialize` if needed. * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Remove `:initialize`, now provided automatically. * doc/lispref/customize.texi (Variable Definitions): * doc/lispref/modes.texi (Defining Minor Modes): Document and Suggest `custom-initialize-after-file-load` instead of `custom-initialize-delay`.
* | (font-lock-defaults): Clarify the use of SYNTAX-ALIST (bug#79586)Stefan Monnier2025-10-141-2/+12
| | | | | | | | | | | | * doc/lispref/modes.texi (Font Lock Basics): * lisp/font-core.el (font-lock-defaults): Document when SYNTAX-ALIST is used and how it interacts with syntactic fontification.
* | modes.texi: Declare official support for a standard "abuse"Stefan Monnier2025-10-081-0/+6
| | | | | | | | | | | | * doc/lispref/modes.texi (Search-based Fontification): Explicitly mention the "abuse" of matchers that perform the highlighting instead of matching.
* | Merge from origin/emacs-30Sean Whitton2025-10-031-3/+4
|\ \ | |/ | | | | | | 6a8fda1f339 Fix process name matching in 'tramp-process-running-p' 217fd4f09ea ; * doc/lispref/modes.texi (Defining Minor Modes): Fix la...
| * ; * doc/lispref/modes.texi (Defining Minor Modes): Fix last change.Eli Zaretskii2025-09-271-3/+4
| |
* | Merge from origin/emacs-30Eli Zaretskii2025-09-271-1/+11
|\ \ | |/ | | | | | | | | | | 6d35c807e5f ; Improve documentation of globalized minor modes 704fab0452a ; Improve documentation of handling errors 307f465f7b9 ; * doc/lispref/text.texi (Suspicious Text): Fix suspicio... 6bedbafc7ad ; * doc/lispref/text.texi (Suspicious Text): Indexing fix.
| * ; Improve documentation of globalized minor modesEli Zaretskii2025-09-271-1/+11
| | | | | | | | | | * doc/lispref/modes.texi (Defining Minor Modes): Document the subtlety with ':init-value t' for globalized modes.
* | ; Improve discoverability of tree-sitter related functionalityEli Zaretskii2025-09-141-2/+9
| | | | | | | | | | | | | | * 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.
* | Correctly document the format of tabulated-list-groupsRahguzar2025-08-211-3/+4
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-groups): Correct format in doc string (bug#79220). * doc/lispref/modes.texi (Tabulated List Mode): Correct format in manual.
* | Merge from origin/emacs-30Eli Zaretskii2025-06-141-4/+1
|\ \ | |/ | | | | | | | | | | | | | | | | df3fb94f091 Insert missing step to make use of directory tracking OSC... 1bed2949583 * lisp/keymap.el (keymap-set): Refer to 'key-description'... 941158fc133 Support new tree-sitter grammar filename format (bug#78754) 888f846d377 Fix crash when evaluating "(signal nil 5)" (bug#78738) 51b9e92ab8e Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... c0a913ea4f3 ; * doc/lispref/modes.texi (Font Lock Basics): Remove old... 37de076017a Adapt emba integration (don't merge)
| * ; * doc/lispref/modes.texi (Font Lock Basics): Remove old info (bug#78720).Eli Zaretskii2025-06-081-4/+1
| |
* | Merge from origin/emacs-30Eli Zaretskii2025-04-301-3/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | cc5b1a01a2c ; * doc/misc/efaq-w32.texi (Location of init file): Fix a... 6c2aaedfceb Fix compilation errors in emacsclient.c with MinGW GCC 15 d56e5ba97ee ; * etc/DEBUG: Add link to GCC bug #78685. 80cbd1e31cc ; Fix key notation in Introduction to Emacs Lisp 1224e5fd961 ; * lisp/files.el (revert-buffer-restore-functions): Doc ... 79e7eeb3296 ; Improve documentation of 'format-time-string' 2838b64fc8b ; * lisp/textmodes/text-mode.el (text-mode-variant): Fix ... 9adb05422ea ; Improve obsolescence of 'text-mode-variant' 4858d818488 ; * lisp/files.el (revert-buffer-restore-functions): Doc ... 2a8e223b8d7 ; Mention early-init file in Emacs FAQ for Windows 14c707b42d9 ; Isearch: Fix key bindings in docstrings
| * ; Improve obsolescence of 'text-mode-variant'Eli Zaretskii2025-04-291-3/+0
| | | | | | | | | | | | | | | | * lisp/textmodes/text-mode.el (text-mode-variant): Improve obsolescence announcement text. * doc/lispref/modes.texi (Example Major Modes): Update example. (Bug#78125).
* | New user option to hide minor mode lighters (bug#77361)Pengji Zhang2025-04-131-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/bindings.el (mode-line-collapse-minor-modes): New user option. (mode-line-minor-modes): New variable to hold mode line constructs for minor modes. (mode-line--make-lighter-menu): New helper function to generate the menu for hidden minor modes. (mode-line--minor-modes): New helper function to computer mode line constructs for minor mode lighters. (mode-line-modes): Use the new variable 'mode-line-minor-modes', and adjust the order of elements so the indicator for hidden minor modes is shown towards the end. * doc/lispref/modes.texi (Mode Line Basics): Move the paragraph for 'mode-line-compact' from here... * doc/emacs/display.texi (Optional Mode Line): ...to here, and document the new user option. * etc/NEWS: Annouce the new user option.
* | * lisp/treesit.el (treesit-up-list, treesit-outline-level): Improve.Juri Linkov2025-02-221-3/+3
| | | | | | | | | | Try to get the parent parser host node that contains the embedded parser and continue the search from it (bug#76398).
* | New variable 'treesit-aggregated-outline-predicate' (bug#76398)Juri Linkov2025-02-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/modes.texi (Outline Minor Mode): Add 'treesit-aggregated-outline-predicate'. * lisp/treesit.el (treesit-aggregated-outline-predicate): New buffer-local variable. (treesit-outline--at-point): Use 'treesit-aggregated-outline-predicate'. (treesit-closest-parser-boundary): New function. (treesit-outline-search): Use 'treesit-aggregated-outline-predicate' and 'treesit-closest-parser-boundary'. (treesit-outline-level): Use 'treesit-aggregated-outline-predicate'. (treesit-major-mode-setup): Add 'treesit-aggregated-outline-predicate'. * lisp/textmodes/html-ts-mode.el (html-ts-mode--outline-predicate): Improve. * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode): Set 'treesit-aggregated-outline-predicate'.
* | Improve autoconf-mode macro detectionBasil L. Contovounesios2025-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/modes.texi (Search-based Fontification): Fix indentation of (MATCHER . FACESPEC) example. * doc/misc/cc-mode.texi (Performance Issues): Index defun-prompt-regexp under variables, not functions. * lisp/progmodes/autoconf.el (autoconf--symbol, autoconf--macro): New rx definitions. (autoconf-definition-regexp): Use an optional second capture group to indicate a function rather than variable definition. Detect AC_DEFINE defining a function-like CPP macro. Skip more shell syntax such as variable ${} expansion and command `` substitution in AC_DEFINE_UNQUOTED variable. Match AH_VERBATIM, AM_CONDITIONAL, and AM_MISSING_PROG as defining variables, and AC_DEFUN, AC_DEFUN_ONCE, AU_ALIAS, and AU_DEFUN as defining functions. Document first capture group in docstring. (autoconf-font-lock-keywords): Use autoconf--macro to match more Autoconf macros, such as those defined in the Autoconf Archive and Gnulib. Reserve font-lock-function-name-face for function definitions as determined by autoconf-definition-regexp, and use font-lock-variable-name-face for the rest instead. Use Font Lock face symbols directly in place of their corresponding variable. Fontify M4 changequote primitive only as a standalone symbol. (autoconf-imenu-generic-expression): Add commentary mentioning new submenu possibility. (autoconf-current-defun-function): Update docstring accuracy. Replace line-end-position with pos-eol since there are no fields. (autoconf-mode): Define defun-prompt-regexp in terms of autoconf--macro to support more toplevel macros, such as those defined in Autoheader, M4sh, etc. Set open-paren-in-column-0-is-defun-start to nil to avoid false positives when an Autoconf quote character is in column zero. * test/lisp/progmodes/autoconf-resources/configure.ac: New file. * test/lisp/progmodes/autoconf-tests.el (autoconf-tests-current-defun-function-define) (autoconf-tests-current-defun-function-subst): Replace character motion with search. (autoconf-tests-autoconf-mode-comment-syntax): Ditto. Test both dnl and # comments. Use syntax-ppss-context. (autoconf-tests-font-lock): New test.
* | Add treesit-simple-indent-standalone-predicate (bug#74386)Yuan Fu2025-02-131-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el: (treesit-simple-indent-standalone-predicate): New variable. (treesit-simple-indent-presets): Use the predicate. (treesit-simple-indent-presets): Update docstring. * lisp/progmodes/c-ts-common.el: (c-ts-common--standalone-parent): (c-ts-common--prev-standalone-sibling): Use the predicate if non-nil. Also, handle method chaining by default. * doc/lispref/modes.texi (Parser-based Indentation): Add documentation.
* | Merge from origin/emacs-30Eli Zaretskii2025-02-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6447634f171 ; * admin/MAINTAINERS: Add CC Mode. 486d5d524ca Update cc-mode URL to point to nongnu.org 17ef46e849d ; * etc/NEWS: Note CVE-2024-53920 further up also. 05ee2b741f0 ; * CONTRIBUTE: Suggest to run more tests sometimes. e74efd9a428 * CONTRIBUTE: Recommend running the unit test prior to co... a9cde2463ab Don't signal an error in treesit-node-at 5d021a711a9 ; Improve documentation of '.dir-locals.el' 84595cbcc78 ; (let-alist): Document double-dot escape syntax. (Bug#75... 5617b07a45b ; Prefer HTTPS to HTTP in docs fdd23023c84 ; * admin/MAINTAINERS: Sort external packages alphabetica... 74dcfe155a9 ; * etc/NEWS: Remove temporary documentation markers. a87c382caba ; * etc/NEWS: Add missing temporary documentation tags. 3c820cd2650 Document insert-directory-program as a user option 2c1edf5f62a doc/lispref/modes.texi (Syntactic Font Lock): Update for ... # Conflicts: # etc/NEWS
| * doc/lispref/modes.texi (Syntactic Font Lock): Update for commit 644c6b414f3Stefan Monnier2025-01-251-1/+1
| | | | | | | | | | Remove outdated `nil` element, as discussed in https://lists.gnu.org/archive/html/help-gnu-emacs/2025-01/msg00244.html
* | Merge from origin/emacs-30Eli Zaretskii2025-01-251-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67903f5909d Restore the old behavior of `bookmark-write-file' 062da7003f9 ; Improve prompts and error messages in 'info-look' 52dc01f1c8b ; * admin/admin.el (set-version): Note about Android. fb282da2a07 Avoid double spaces around abbrevations in Texinfo bc1ab8ac3d8 ; * doc/emacs/custom.texi (Init Rebinding): Fix spacing. b41ef43af19 ; Fix previous change 5638b1d6bd4 Ispell: Use "personal dictionary" terminology consistently cc791e7499f ; Check man pages for mistakes less frequently 4ed4792e3b9 ; * admin/release-process: Minor copy-edits. 4a867c823b7 Add language server "ruff server" for Python 9e687c2871f Fix go-ts-mode type declaration indentation (Bug#75785) f751b3afa4f ; Minor improvements for doc strings in map.el cda78edc7d9 ; Fix typos ce50a1d3c18 ; * src/w32.c (w32_memory_info): Fix coding style of last... 58d3d4820ad Fix bug in w32_memory_info 77386412050 Avoid crashes in redisplay due to problematic font setups 0e3687e6006 Improve 'key-valid-p' docstring 9878092d2b9 Minor copyedits in internals.texi 4726900fdc5 Better document side-effect free and pure C functions 04c475a39f2 ; Fix documentation about faces of tool-tip text # Conflicts: # admin/codespell/codespell.exclude
| * Avoid double spaces around abbrevations in TexinfoStefan Kangas2025-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Init Rebinding): * doc/emacs/dired.texi (Operating on Files): * doc/emacs/emacs.texi (Top): * doc/emacs/emerge-xtra.texi (Emerge): * doc/emacs/files.texi (Files): * doc/emacs/frames.texi (Drag and Drop): * doc/emacs/misc.texi (Hyperlinking): * doc/emacs/modes.texi (Modes): * doc/emacs/mule.texi (Input Methods): * doc/emacs/windows.texi (Window Tool Bar): * doc/lispintro/emacs-lisp-intro.texi (Lexical & Dynamic Binding Differences): * doc/lispref/elisp.texi (Top): * doc/lispref/functions.texi (Functions, Generic Functions): * doc/lispref/hash.texi (Defining Hash): * doc/lispref/keymaps.texi (Creating Keymaps): * doc/lispref/lists.texi (Property Lists): * doc/lispref/modes.texi (%-Constructs): * doc/lispref/nonascii.texi (Character Properties): * doc/lispref/processes.texi (Misc Network): * doc/lispref/searching.texi (Regexp Functions): * doc/lispref/syntax.texi (Syntax Table Internals): * doc/lispref/text.texi (Filling, Checksum/Hash) (JSONRPC deferred requests): * doc/misc/calc.texi (What is Calc, Modes Tutorial): * doc/misc/cc-mode.texi (List Line-Up, Operator Line-Up) (Custom Macros, Indenting Directives): * doc/misc/efaq.texi (Colors on a TTY, Security risks with Emacs): * doc/misc/eglot.texi (Eglot Variables): * doc/misc/erc.texi (Connecting): * doc/misc/eshell.texi (Aliases, Completion): * doc/misc/flymake.texi (Backend functions): * doc/misc/gnus-faq.texi (FAQ 5 - Composing messages): * doc/misc/gnus.texi (Gnus Unplugged, Window Layout) (Filtering Incoming Mail, History): * doc/misc/idlwave.texi (Online Help, Catalogs): * doc/misc/wisent.texi (Wisent Overview): Be more consistent with abbreviations. Use @: or comma or rewrite to avoid double spaces. Ref: https://lists.gnu.org/r/emacs-devel/2025-01/msg00909.html
| * Update copyright year to 2025Stefan Kangas2025-01-021-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Lisp Reference Manual: Index standard symbol properties.Stephen Gildea2025-01-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/symbols.texi (Standard Properties): * doc/lispref/commands.texi: * doc/lispref/customize.texi (Variable Definitions): * doc/lispref/help.texi: * doc/lispref/keymaps.texi: * doc/lispref/minibuf.texi (Minibuffer History): * doc/lispref/modes.texi (Setting Hooks): * doc/lispref/sequences.texi (Char-Tables): * doc/lispref/text.texi (Undo): * doc/lispref/variables.texi: Each standard symbol property has exactly one index entry, uniformly formatted as "(symbol property)".
* | Merge from origin/emacs-30Eli Zaretskii2025-01-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | afe776051ec [project-vc]: Make project-buffers more consistent with p... a720458fdd0 (elisp-flymake-byte-compile): Improve UX with `debug-on-e... 7acfea19358 ; * doc/lispref/modes.texi (Customizing Keywords): Fix ty... d47a7d6f0fe ; Add missing parameters in keymap doc 07e9f27c3e0 ; * doc/misc/calc.texi: Fix makeinfo warnings (bug#75166). 43a8f0de5ec Always match underscore variables for elixir-ts-mode
| * ; * doc/lispref/modes.texi (Customizing Keywords): Fix typo (bug#75193).Kohei Tsuruta2024-12-301-1/+1
| |
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | ; * doc/lispref/modes.texi (Imenu): Fix wording and markup.Eli Zaretskii2024-12-251-3/+4
| |
* | Add treesit-aggregated-simple-imenu-settingsYuan Fu2024-12-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we support setting up Imenu for multiple languages * doc/lispref/modes.texi: Update manual. * lisp/treesit.el: (treesit-aggregated-simple-imenu-settings): New variable. (treesit--imenu-merge-entries): New function. (treesit--generate-simple-imenu): This was previously treesit-simple-imenu. (treesit-simple-imenu): Support treesit-aggregated-simple-imenu-settings. (treesit-major-mode-setup): Recognize treesit-aggregated-simple-imenu-settings. * test/src/treesit-tests.el (treesit-imenu): New test.
* | Add keyword :reversed to treesit-font-lock-rulesYuan Fu2024-12-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | This keyword will be useful for implementing string-interpolation feature. * doc/lispref/modes.texi (Parser-based Font Lock): Document the new keyword. * lisp/treesit.el (treesit-font-lock-settings): Document. (treesit-font-lock-setting-reversed): New function. (treesit-font-lock-rules): Add new keyword. (treesit-font-lock-recompute-features): Handle new keyword.
* | Make font-lock face variables obsoleteStefan Kangas2024-12-181-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using these variables as "another mechanism for changing face appearance" never really worked, since mode authors were free to use the face instead of the variable (i.e. quoting the symbol). This means that when users customized the variables, it would change its appearance only in some cases, which is a rather surprising interface. Indeed, it turns out that some modes have not always been consistent, and mixed using the variable and the face, increasing the confusion even further. Thus, the only thing users could rely on to always work was to leave the variables at their default value, and to customize the face. We now recommend customizing the face, and are obsoleting these variables. This will lead to some minor code-churn, but it is believed that it will be ultimately worth it. To fix existing Lisp code, you should typically only need to quote the symbol, as this commit shows. It might be the case that we will have to keep the obsolete variables, that have been with us since Emacs 19, around for a longer time-period than normal, to allow package authors to adapt. * lisp/font-lock.el (font-lock-comment-face) (font-lock-comment-delimiter-face, font-lock-string-face) (font-lock-doc-face, font-lock-doc-markup-face, font-lock-keyword-face) (font-lock-builtin-face, font-lock-function-name-face) (font-lock-variable-name-face, font-lock-type-face) (font-lock-constant-face, font-lock-warning-face) (font-lock-negation-char-face, font-lock-preprocessor-face): Make face variables obsolete in favor of customizing the faces directly instead. (Bug#71469) * doc/lispref/modes.texi (Faces for Font Lock): Don't document above obsolete variables. * lisp/cedet/data-debug.el (data-debug-insert-hash-table) (data-debug-insert-widget-properties, data-debug-insert-string) (data-debug-insert-number): * lisp/emacs-lisp/lisp-mode.el (elisp--font-lock-backslash) (lisp-font-lock-syntactic-face-function): * lisp/emacs-lisp/package.el (describe-package-1): * lisp/generic-x.el (rc-generic-mode, rul-generic-mode): * lisp/org/org-table.el (org-table-edit-formulas): * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes) (c-maybe-font-lock-wrong-style-comments, c-font-lock-declarators) (c-font-lock-c++-lambda-captures, c-font-lock-c++-modules): * lisp/progmodes/cperl-mode.el (cperl-find-sub-attrs) (cperl-look-at-leading-count, cperl-process-here-doc) (cperl-find-pods-heres): * lisp/progmodes/gdb-mi.el (gdb-init-1, gdb-update, gdb-running) (gdb-starting, gdb-stopped, gdb-internals) (gdb-breakpoints--add-breakpoint-row, gdb-locals-handler-custom) (gdb-registers-handler-custom, gdb-get-source-file): * lisp/progmodes/js.el (js--font-lock-keywords-1) (js--font-lock-keywords-2, js-font-lock-syntactic-face-function): * lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock): * lisp/progmodes/meta-mode.el (meta-indent-in-string-p): * lisp/progmodes/prolog.el (prolog-font-lock-keywords): * lisp/progmodes/python.el (python-font-lock-syntactic-face-function): * lisp/progmodes/ruby-ts-mode.el (ruby-ts--comment-font-lock): * lisp/progmodes/sh-script.el (sh-font-lock-syntactic-face-function): * lisp/textmodes/tex-mode.el (doctex-font-lock-syntactic-face-function): * test/lisp/faces-tests.el (faces--test-color-at-point): * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-extra-delimiters) (cperl-test-bug-47112, cperl-test-bug-65834, cperl-test-bug-66145) (cperl-test-bug-66161, cperl-test-bug-69604): * test/lisp/progmodes/python-tests.el (python-ts-mode-compound-keywords-face) (python-ts-mode-named-assignment-face-1) (python-ts-mode-assignment-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-level-fontification-wo-interpolation) (python-ts-mode-disabled-string-interpolation) (python-ts-mode-interpolation-doc-string): * test/lisp/progmodes/ruby-mode-tests.el (ruby-heredoc-font-lock, ruby-heredoc-highlights-interpolations) (ruby-exit!-font-lock, ruby-regexp-interpolation-is-highlighted) (ruby-recognize-symbols-starting-with-at-character) (ruby-hash-character-not-interpolation) (ruby-interpolation-suppresses-quotes-inside) (ruby-interpolation-suppresses-one-double-quote) (ruby-interpolation-inside-percent-literal) (ruby-interpolation-inside-percent-literal-with-paren) (ruby-interpolation-inside-another-interpolation) (ruby-interpolation-inside-double-quoted-percent-literals) (ruby-no-interpolation-in-single-quoted-literals): Don't use above obsolete variables. * lisp/progmodes/cc-fonts.el (font-lock-constant-face): Don't declare now-unused variable.
* | ; * doc/lispref/modes.texi (Parser-based Font Lock): Fix markup.Eli Zaretskii2024-12-081-1/+2
| |
* | Allow treesit--font-lock-level-setter to be an alistYuan Fu2024-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-font-lock-level): Allow the value to be an alist mapping major modes to font lock levels. (treesit--font-lock-level-setter): Rewrite. (treesit--compute-font-lock-level): New function. (treesit-font-lock-recompute-features): Use new function. * doc/lispref/modes.texi (Parser-based Font Lock): Minor fix.
* | ; Fix recently-updated documentationEli Zaretskii2024-12-021-12/+12
| | | | | | | | | | * doc/lispref/modes.texi (Parser-based Indentation): Fix markup, typos and wording.
* | Allow treesit-simple-indent's rule to be a single functionYuan Fu2024-12-011-5/+16
| | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-simple-indent-rules): Allow the rule to be a single function. Also replace cl-loop with dolist plus catch-throw. (treesit--indent-rules-optimize): Handle the case when a rule is a function. * doc/lispref/modes.texi (Parser-based Indentation): Update manuel.
* | Add accessors for treesit-font-lock-settingsYuan Fu2024-09-201-2/+13
|/ | | | | | | | | | | | | | | | | | | Since each SETTING in treesit-font-lock-settings is considered an opaque object, provide accessor functions for each field. * lisp/treesit.el: (treesit-font-lock-settings): Update docstring. (treesit-font-lock-setting-query): (treesit-font-lock-setting-enable): (treesit-font-lock-setting-feature): (treesit-font-lock-setting-override): New functions. (treesit--font-lock-setting-feature): Remove function. (treesit--font-lock-setting-enable): Rename to treesit--font-lock-setting-clone-enable to avoid confusion with treesit-font-lock-setting-enable. (treesit-add-font-lock-rules): Use renamed function. (treesit-font-lock-fontify-region): Add a comment. * doc/lispref/modes.texi (Parser-based Font Lock): Update manual.
* ; * doc/lispref/modes.texi (Mode Line Data): Fox wording.Eli Zaretskii2024-09-041-1/+1
|
* ; Caveats about using :eval in 'mode-line-format'Eli Zaretskii2024-09-031-2/+3
| | | | | | * doc/lispref/modes.texi (Mode Line Data): Warn against more infinite-recursion cases in ':eval' in mode line. Reported by Nicolas P. Rougier <nicolas.rougier@inria.fr>.
* ; * doc/lispref/modes.texi (Mode Line Data): Fix formatting.Eli Zaretskii2024-07-271-1/+1
|
* ; Fix punctuation in docsStefan Kangas2024-07-211-1/+1
|
* Add documentation for window-tool-bar packageJared Finder2024-06-091-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | Also change window-tool-mode to not pay attention to if tool-bar-map has a buffer local value or not as that made the documentation complicated. Documentation added in Emacs manual, Elisp manual, package commentary, and docstrings. Also extend window-tool-bar support to Emacs 27 and newer. (bug#68765) * doc/emacs/emacs.texi (Top): * doc/emacs/frames.texi (Menu Bars): * doc/emacs/glossary.texi (Glossary): * doc/emacs/modes.texi (Minor Modes): * doc/emacs/windows.texi (Windows, Tab Line): Mention Window Tool Bar. (Window Tool Bar): New documentation. * doc/lispref/elisp.texi (Top): * doc/lispref/modes.texi (Mode Line Format, Mode Line Basics) (Mode Line Data): Mention Tab Lines. (Tab Lines): New documentation. * etc/NEWS: Mention newly added variable and package. * lisp/window-tool-bar.el (window-tool-bar-mode): Don't display tool bar when tool-bar-map is nil. * lisp/window-tool-bar.el (tool-bar-always-show-default): Define variable for older Emacs versions.
* ; Fix last tree-sitter changes in Elisp manual.Basil L. Contovounesios2024-05-221-6/+5
|
* Improve treesit-major-mode-setup indentation setup (bug#71086)Yuan Fu2024-05-211-3/+6
| | | | | | * lisp/treesit.el (treesit-major-mode-setup): Setup indentation when treesit-indent-function is set. * doc/lispref/modes.texi (Parser-based Indentation): Fix manual.
* (define-globalized-minor-mode): Require the use of `run-mode-hooks`Stefan Monnier2024-04-131-5/+8
| | | | | | | | | | | | | | | | | | | | | | When `define-globalized-minor-mode` was introduced (Emacs-22), `run-mode-hooks` was brand new, so we could not expect all major modes to use it and we had to rely on brittle workarounds to try and approximate `after-change-major-mode-hook`. These workarounds have undesirable side effects, and (we hope) they're not needed any more now that virtually all major modes have been changed to use `run-mode-hooks` (or `define-derived-mode`). * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Rely only on `after-change-major-mode-hook`, remove the "cmhh" [typo for the intended "cmmh", BTW] workaround. * doc/lispref/modes.texi (Mode Hooks): Clarify the importance of `after-change-major-mode-hook` w.r.t `define-globalized-minor-mode`. (Defining Minor Modes): Rewrite the explanation of which buffers are affected, including adjusting it to the fact that `fundamental-mode` has used run `run-mode-hooks` for last 10 years.
* (major-mode-remap(-defaults)): New var and function (bug#69191)Stefan Monnier2024-03-031-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While `major-mode-remap-alist` provides a way for users to indicate the major mode of their choice, we need a similar variable for the use of packages. This patch adds a new `major-mode-remap-defaults` and changes various packages to obey it or make use of it. I think it nicely cleans the regexp duplication between CC-mode and `c-ts-mode.el` and also makes it easier/cleaner for users to override the changes made by `*-ts-mode.el`. * lisp/files.el (major-mode-remap-defaults): New variable. (major-mode-remap): New function. (set-auto-mode-0): Use it. * doc/lispref/modes.texi (Auto Major Mode): Document them. * lisp/textmodes/tex-mode.el (tex--redirect-to-submode): Use `major-mode-remap`. (major-mode-remap-defaults): Set it to remap AUCTeX modes by default. * lisp/progmodes/ruby-ts-mode.el (auto-mode-alist): Leave it alone. (major-mode-remap-defaults): Set this one instead. * lisp/progmodes/c-ts-mode.el (c-or-c++-ts-mode): Use `major-mode-remap`. (auto-mode-alist): Leave it alone. (major-mode-remap-defaults): Set this one instead. * lisp/org/ox.el (org-export-to-buffer): Modernize docstring accordingly. * lisp/progmodes/cc-mode.el (c-or-c++-mode): * lisp/org/ox-latex.el (org-latex-export-as-latex): * lisp/org/ox-koma-letter.el (org-koma-letter-export-as-latex): * lisp/org/ox-beamer.el (org-beamer-export-as-latex): Use `major-mode-remap` when available.
* * doc/lispref/modes.texi (Tabulated List Mode): Unindent example.Juri Linkov2024-03-021-3/+3
|