emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Turning on/off tree-sitter modes


From: Dmitry Gutov
Subject: Re: Turning on/off tree-sitter modes
Date: Tue, 26 Nov 2024 02:40:38 +0200
User-agent: Mozilla Thunderbird

On 26/11/2024 02:35, Dmitry Gutov wrote:

Maybe like this:

Or a more compact version:

  Major Mode Remap Alist:
  Alist:
  INS DEL From major mode: nil
              To mode (or function): ignore

diff --git a/lisp/files.el b/lisp/files.el
index 9c105dbe1a5..0ffc725c36e 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3606,7 +3606,8 @@ major-mode-remap-alist
 FUNCTION is typically a major mode which \"does the same thing\" as
 MODE, but can also be nil to hide other entries (either in this var or
 in `major-mode-remap-defaults') and means that we should call MODE."
-  :type '(alist (symbol) (function)))
+  :type '(alist :key-type (symbol :tag "From major mode")
+                :value-type (function :tag "To mode (or function)")))

 (defvar major-mode-remap-defaults nil
   "Alist mapping file-specified modes to alternative modes.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]