File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; ; If a child mode is derived from a parent mode, the child must be
2
+ ; ; listed before the parent. Otherwise the parent will shadow the
3
+ ; ; child and the child will never match.
4
+
5
+ ; ; Note that information about parent-child relationships is only
6
+ ; ; available for modes that have been loaded into Emacs. For a
7
+ ; ; comprehensive check, all modes recognized by language-id need to be
8
+ ; ; loaded into Emacs.
9
+
10
+ (cl-reduce (lambda (modes-so-far language )
11
+ (let ((language-modes (cdr language)))
12
+ (cl-reduce (lambda (modes-so-far mode )
13
+ (message " %S " modes-so-far)
14
+ (let ((mode (if (listp mode) (car mode) mode)))
15
+ (cl-assert (symbolp mode))
16
+ (let ((parent (apply #'provided-mode-derived-p
17
+ mode modes-so-far)))
18
+ (when (and parent (not (equal parent mode)))
19
+ (error " %S is shadowed by %S " mode parent)))
20
+ (cons mode modes-so-far)))
21
+ language-modes
22
+ :initial-value modes-so-far)))
23
+ language-id--definitions
24
+ :initial-value '())
You can’t perform that action at this time.
0 commit comments