[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f5439a92910: Refine the Custom type of generated '*-modes' option
From: |
Eshel Yaron |
Subject: |
master f5439a92910: Refine the Custom type of generated '*-modes' options |
Date: |
Sat, 27 Apr 2024 11:24:14 -0400 (EDT) |
branch: master
commit f5439a929106d1482b185dce5369d4748658946f
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Refine the Custom type of generated '*-modes' options
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Refine the Custom type of the '*-modes' option, generated when
this macro is given a ':predicate' argument. (Bug#70589)
---
lisp/emacs-lisp/easy-mmode.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index eaad9646985..ba0f8bad393 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -580,7 +580,20 @@ modes derived from `text-mode'\". An element with value t
means \"use\"
and nil means \"don't use\". There's an implicit nil at the end of the
list."
mode)
- :type '(repeat sexp)
+ :type '(choice
+ (const :tag "Enable in all major modes" t)
+ (const :tag "Don't enable in any major mode" nil)
+ (repeat
+ :tag "Rules (earlier takes precedence)..."
+ (choice
+ (const :tag "Enable in all (other) modes" t)
+ (const :tag "Don't enable in any (other) mode" nil)
+ (symbol :value fundamental-mode
+ :tag "Enable in major mode")
+ (cons :tag "Don't enable in major modes"
+ (const :tag "Don't enable in..." not)
+ (repeat (symbol :value fundamental-mode
+ :tag "Major mode"))))))
,@group))
;; Autoloading define-globalized-minor-mode autoloads everything
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f5439a92910: Refine the Custom type of generated '*-modes' options,
Eshel Yaron <=