-
Notifications
You must be signed in to change notification settings - Fork 0
/
web-capf.el
3096 lines (2998 loc) · 130 KB
/
web-capf.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; web-capf.el --- Completions for web-related modes -*- lexical-binding: t -*-
;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
;; Author: Shun-ichi Tahara <jado@flowernet.jp>
;; Maintainer: Shun-ichi Tahara <jado@flowernet.jp>
;; Created: 2022
;; Version: 0.9
;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://github.com/jado4810/web-capf
;; Keywords: capf, completion, web, html, css
;; This file is part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This package provides the `web-capf' completion function,
;; which delives better completion for web-related modes,
;; such as `html-mode', `css-mode' and `web-mode'.
;;; Code:
(eval-when-compile
(require 'subr-x))
(defvar web-capf-compl-types
'((html-mode . html)
(css-mode . css)
(web-mode . complex-web))
"Alist of web-related major-modes and completion types.
Type complex-web works only with `web-mode'.
For the other-modes like `nxhtml-mode', need more implementations.")
(defvar web-capf-engines-and-modes
'((erb . ruby)
(ejs . javascript))
"Alist of `web-mode' engines and `web-capf' completion modes,
for sub block part of `web-mode'.")
(defvar web-capf-javascript-fallback nil
"Fallback capf for javascript part in `web-mode'.
Note that fallback in `completion-at-point-functions' might not work
if set, for example, `cape-keyword', because `major-mode' is different.
This calls capf with masquerading `major-mode' to `javascript-mode'.")
(defvar web-capf-php-fallback nil
"Fallback capf for php part in `web-mode'.
Note that fallback in `completion-at-point-functions' might not work
if set, for example, `cape-keyword', because `major-mode' is different.
This calls capf with masquerading `major-mode' to `php-mode'.")
(defvar web-capf-ruby-fallback nil
"Fallback capf for ruby part in `web-mode'.
Note that fallback in `completion-at-point-functions' might not work
if set, for example, `cape-keyword', because `major-mode' is different.
This calls capf with masquerading `major-mode' to `ruby-mode'.")
(defconst web-capf-html-decls-and-attrs
'((cdata) (doctype "html"))
"Alist of html5 declaration types and attribute names,
or cdata sections, which start with \"<!\".")
(defconst web-capf-html-insts
'("xml")
"List of html processing instructions for xml,
which start with \"<?\".")
(defconst web-capf-html-tags
'(a abbr address area article aside audio b base bdi bdo blockquote
body br button canvas caption cite code col colgroup data datalist
dd del details dfn dialog div dl dt em embed fieldset figcaption
figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i
iframe img input ins kbd label legend li link main map mark math
menu meta meter nav noscript object ol optgroup option output p
picture portal pre progress q rp rt ruby s samp script search
section select slot small source span strong style sub summary sup
svg table tbody td template textarea tfoot th thead time title tr
track u ul var video wbr)
"List of html5 tags, exclude subelements of mathml and svg.
All tags in this list are available at the outer part of html,
because some pieces of html might be specified.")
(defconst web-capf-html-noclose-tags
'(area base br col embed hr img input link meta source)
"List of html5 tags without close tags.")
(defconst web-capf-html-autoclose-tags
'((caption (tbody tfoot th thead tr) . (table))
(dd (dd dt) . (dl))
(dt (dd dt) . (dl))
(li (li) . (menu ol ul))
(optgroup (optgroup) . (select))
(option (opt optgroup) . (select))
(p (address article aside blockquote dir div dl fieldset footer
form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre
section table ul))
(rp (rp rt) . (ruby))
(rt (rp rt) . (ruby))
(tbody (tbody tfoot) . (table))
(td (td th) . (tr))
(tfoot (tbody) . (table))
(th (td th) . (tr))
(thead (tbody tfoot))
(tr (tr) . (table tbody tfoot thead)))
"List of html5 tags to be closed automatically.")
(defconst web-capf-html-tag-hierarchies
'((a (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk
abbr area audio b bdi bdo br canvas cite code data datalist
del dfn em i img input ins kbd map mark math meter noscript
object output picture progress q ruby s samp script small span
strong sub sup svg template time u var video wbr))
(abbr web-capf--html-il (web-capf--ancestor map area))
(address web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(article web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(aside web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(audio (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk
a abbr b bdi bdo br button canvas cite code data datalist
del dfn em embed i iframe img input ins kbd label map mark
math meter noscript object output picture progress q ruby
s samp script select small span strong sub sup svg
template textarea time u var wbr)
source track)
(b web-capf--html-il (web-capf--ancestor map area))
(blockquote web-capf--html-sec web-capf--html-blk
web-capf--html-il
(web-capf--ancestor map area))
(body web-capf--html-sec web-capf--html-blk web-capf--html-il
link main)
(button abbr audio b bdi bdo br canvas cite code data datalist del
dfn em i img input ins kbd map mark math meter noscript
object output picture progress q ruby s samp script small
span strong sub sup svg template time u var video wbr
(web-capf--ancestor map area))
(canvas (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk web-capf--html-il
area))
(caption web-capf--html-sec web-capf--html-il
blockquote details dialog div dl fieldset figure form hr
menu ol p pre ul
(web-capf--ancestor map area))
(cite web-capf--html-il (web-capf--ancestor map area))
(code web-capf--html-il (web-capf--ancestor map area))
(colgroup col template)
(data web-capf--html-il (web-capf--ancestor map area))
(datalist web-capf--html-il option (web-capf--ancestor map area))
(dd web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(del (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk web-capf--html-il area))
(details web-capf--html-sec web-capf--html-blk web-capf--html-il
summary (web-capf--ancestor map area))
(dfn (web-capf--norecurse web-capf--html-il)
(web-capf--ancestor map area))
(dialog web-capf--html-sec web-capf--html-blk web-capf--html-il
legend (web-capf--ancestor map area))
(div web-capf--html-sec web-capf--html-blk web-capf--html-il
dd dt main (web-capf--ancestor map area))
(dl div dd dt script template)
(dt web-capf--block web-capf--html-il
address (web-capf--ancestor map area))
(em web-capf--html-il (web-capf--ancestor map area))
(fieldset web-capf--html-sec web-capf--html-blk web-capf--html-il
legend (web-capf--ancestor map area))
(figcaption web-capf--html-sec web-capf--html-blk
web-capf--html-il
(web-capf--ancestor map area))
(figure web-capf--html-sec web-capf--html-blk web-capf--html-il
figcaption (web-capf--ancestor map area))
(footer web-capf--block web-capf--html-il
address article aside h1 h2 h3 h4 h5 h6 nav section
(web-capf--ancestor map area))
(form web-capf--html-sec web-capf--html-il
blockquote details dialog div dl fieldset figure hr menu ol
p pre table ul
(web-capf--ancestor map area))
(h1 web-capf--html-il (web-capf--ancestor map area))
(h2 web-capf--html-il (web-capf--ancestor map area))
(h3 web-capf--html-il (web-capf--ancestor map area))
(h4 web-capf--html-il (web-capf--ancestor map area))
(h5 web-capf--html-il (web-capf--ancestor map area))
(h6 web-capf--html-il (web-capf--ancestor map area))
(head base link meta noscript script style template title)
(header web-capf--block web-capf--html-il
address article aside h1 h2 h3 h4 h5 h6 nav section
(web-capf--ancestor map area))
(hgroup h1 h2 h3 h4 h5 h6 p)
(html body head)
(i web-capf--html-il (web-capf--ancestor map area))
(ins (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk web-capf--html-il area))
(kbd web-capf--html-il (web-capf--ancestor map area))
(label (web-capf--norecurse web-capf--html-il)
(web-capf--ancestor map area))
(legend web-capf--html-il (web-capf--ancestor map area))
(li web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(main web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(map (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk web-capf--html-il)
area)
(mark web-capf--html-il (web-capf--ancestor map area))
(menu li script template)
(meter (web-capf--norecurse web-capf--html-il)
(web-capf--ancestor map area))
(nav web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(noscript (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk web-capf--html-il
area link meta style))
(object web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(ol li script template)
(optgroup option script templete)
(output web-capf--html-il (web-capf--ancestor map area))
(p web-capf--html-il (web-capf--ancestor map area))
(picture img source)
(pre web-capf--html-il (web-capf--ancestor map area))
(progress (web-capf--norecurse web-capf--html-il)
(web-capf--ancestor map area))
(q web-capf--html-il (web-capf--ancestor map area))
(rb web-capf--html-il (web-capf--ancestor map area))
(rp web-capf--html-il (web-capf--ancestor map area))
(rt web-capf--html-il (web-capf--ancestor map area))
(rtc web-capf--html-il rt (web-capf--ancestor map area))
(ruby web-capf--html-il rb rp rt rtc (web-capf--ancestor map area))
(s web-capf--html-il (web-capf--ancestor map area))
(samp web-capf--html-il (web-capf--ancestor map area))
(search web-capf--html-sec web-capf--html-blk web-capf--html-il
main (web-capf--ancestor map area))
(section web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(select optgroup option script template)
(small web-capf--html-il (web-capf--ancestor map area))
(span web-capf--html-il (web-capf--ancestor map area))
(strong web-capf--html-il (web-capf--ancestor map area))
(sub web-capf--html-il (web-capf--ancestor map area))
(summary web-capf--html-il
h1 h2 h3 h4 h5 h6 (web-capf--ancestor map area))
(sup web-capf--html-il (web-capf--ancestor map area))
(table caption colgroup script tbody template tfoot thead tr)
(tbody script template tr)
(td web-capf--html-sec web-capf--html-blk web-capf--html-il
(web-capf--ancestor map area))
(template web-capf--html-sec web-capf--html-blk web-capf--html-il
base caption col colgroup dd dt figcaption legend li
link meta optgroup option param rb rp rt rtc source
style tbody td tfoot th thead title tr track
(web-capf--ancestor map area))
(tfoot script template tr)
(th web-capf--block web-capf--html-il
address (web-capf--ancestor map area))
(thead script template tr)
(time web-capf--html-il (web-capf--ancestor map area))
(tr script template td th)
(u web-capf--html-il (web-capf--ancestor map area))
(ul li script template)
(var web-capf--html-il (web-capf--ancestor map area))
(video (web-capf--parent-rule
web-capf--html-sec web-capf--html-blk
a abbr area b bdi bdo br button canvas cite code data
datalist del dfn em embed i iframe img input ins kbd label
map mark math meter noscript object output picture
progress q ruby s samp script select small span strong sub
sup svg template textarea time u var wbr)
source track))
"Alist of html5 tags hierarchy rules.")
(defconst web-capf-html-sec-tags
'(address article aside footer h1 h2 h3 h4 h5 h6 header hgroup nav
section)
"List of html5 tags available where section tags expected.")
(defconst web-capf-html-blk-tags
'(blockquote details dialog div dl fieldset figure form hr menu ol p
pre search table ul)
"List of html5 tags available where block-like tags expected.")
(defconst web-capf-html-il-tags
'(a abbr audio b bdi bdo br button canvas cite code data datalist
del dfn em embed i iframe img input ins kbd label map mark math
meter noscript object output picture progress q ruby s samp script
select small span strong sub sup svg template textarea time u var
video wbr)
"List of html5 tags available where inline-like tags expected.")
(defconst web-capf-html-tag-attrs
'((a
"download" "href" "hreflang" "ping" "referrerpolicy" "rel"
"target" "type")
(area
"alt" "coords" "download" "href" "hreflang" "ping"
"referrerpolicy" "rel" "shape" "target")
(audio
"autoplay" "controls" "controlslist" "crossorigin"
"disableremoteplayback" "loop" "muted" "preload" "src")
(base "href" "target")
(bdo "dir")
(blockquote "cite")
(button
"disabled" "form" "formaction" "formenctype" "formmethod"
"formnovalidate" "formtarget" "name" "type" "value")
(canvas "height" "width")
(col "span") (colgroup "span")
(data "value")
(del "cite" "datetime")
(details "open")
(dialog "open")
(embed "height" "src" "type" "width")
(fieldset "disabled" "form" "name")
(form
"accept-charset" "action" "autocomplete" "enctype" "method"
"name" "novalidate" "rel" "target")
(html "xmlns")
(iframe
"allow" "allowfullscreen" "csp" "height" "loading" "name"
"referrerpolicy" "sandbox" "src" "srcdoc" "width")
(img
"alt" "crossorigin" "decoding" "fetchpolicy" "height" "ismap"
"loading" "referrerpolicy" "sizes" "src" "srcset" "width"
"usemap")
(input
"accept" "alt" "autocomplete" "capture" "checked" "dirname"
"disabled" "form" "formaction" "formenctype" "formmethod"
"formnovalidate" "formtarget" "height" "list" "max" "maxlength"
"min" "minlength" "multiple" "name" "pattern" "placeholder"
"readonly" "required" "size" "src" "step" "type" "value" "width")
(ins "cite" "datetime")
(label "for")
(li "value")
(link
"as" "crossorigin" "disabled" "fetchpolicy" "href" "hreflang"
"imagesizes" "imagesrcset" "integrity" "media" "prefetch"
"referrerpolicy" "rel" "sizes" "type")
(map "name")
(meta "charset" "content" "http-equiv")
(meter "form" "high" "low" "max" "min" "optimum" "value")
(object "data" "form" "height" "name" "type" "usemap" "width")
(ol "reversed" "start" "type")
(optgroup "disabled" "label")
(option "disabled" "label" "selected" "value")
(output "for" "form" "name")
(portal "referrerpolicy" "src")
(progress "max" "value")
(q "cite")
(script
"async" "crossorigin" "defer" "integrity" "nomodule"
"referrerpolicy" "src" "type")
(select
"autocomplete" "disabled" "form" "multiple" "name" "required"
"size")
(slot "name")
(source "media" "sizes" "src" "srcset" "type")
(style "media" "type")
(td "colspan" "headers" "rowspan")
(textarea
"autocomplete" "cols" "disabled" "form" "maxlength" "minlength"
"name" "placeholder" "readonly" "required" "rows" "wrap")
(th "abbr" "colspan" "headers" "rowspan" "scope")
(time "datetime")
(track "default" "kind" "label" "srclang")
(video
"autoplay" "autopictureinpicture" "controls" "controlslist"
"crossorigin" "disablepictureinpicture" "disableremoteplayback"
"height" "loop" "muted" "playsinline" "poster" "preload" "src"
"width"))
"Alist of html5 tags and attribute names.")
(defconst web-capf-html-global-attrs
'("accesskey" "autocapitalize" "autofocus" "blocking" "class"
"contenteditable" "data" "dir" "draggable" "enterkeyhint"
"exportparts" "hidden" "id" "inert" "inputmode" "is" "itemid"
"itemprop" "itemref" "itemscope" "itemtype" "lang" "nonce" "part"
"role" "slot" "spellcheck" "style" "tabindex" "title" "translate")
"List of html5 global attribute names.")
(defconst web-capf-html-attr-vals
'((as
"audio" "document" "embed" "fetch" "font" "image" "object"
"script" "style" "track" "video" "worker")
(autocapitalize
"characters" "none" "off" "on" "sentences" "words")
(autocomplete
(form "off" "on")
(textarea "off" "on")
(t
"additional-name" "address-level1" "address-level2"
"address-level3" "address-level4" "address-line1"
"address-line2" "address-line3" "bday" "bday-day" "bday-month"
"bday-year" "cc-additional-name" "cc-csc" "cc-exp"
"cc-exp-month" "cc-exp-year" "cc-family-name" "cc-given-name"
"cc-name" "cc-number" "cc-type" "country" "country-name"
"current-password" "email" "family-name" "given-name"
"honorific-prefix" "honorific-suffix" "impp" "language" "name"
"new-password" "nickname" "off" "on" "one-time-code"
"organization" "organization-title" "photo" "postal-code" "sex"
"street-address" "tel" "tel-area-code" "tel-country-code"
"tel-extension" "tel-local" "tel-national" "transaction-amount"
"transaction-currency" "url" "username"))
(blocking "render")
(charset "utf-8")
(contenteditable class--bool)
(controlslist "nodownload" "nofullscreen" "noremoteplayback")
(crossorigin "anonymous" "use-credentials")
(decoding "async" "auto" "sync")
(dir
(bdo class--text-dir)
(t class--text-dir "auto"))
(draggable class--bool)
(enctype
"application/x-www-form-urlencoded" "multipart/form-data"
"text/plain")
(fetchpolicy "auto" "high" "low")
(formenctype enctype)
(formmethod method)
(formtarget target)
(http-equiv
"content-security-policy" "content-type" "default-style" "name"
"refresh" "x-ua-compatible")
(kind "captions" "chapters" "descriptions" "metadata" "subtitles")
(loading "eager" "lazy")
(method "dialog" "get" "post")
(shape "circle" "default" "poly" "rect")
(preload "auto" "metadata" "none")
(referrerpolicy
"no-referrer" "no-referrer-when-downgrade" "origin"
"origin-when-cross-origin" "same-origin" "strict-origin"
"strict-origin-when-cross-origin" "unsafe-url")
(rel
(a
"alternate" "author" "bookmark" "external" "help" "license"
"next" "nofollow" "noopener" "noreferrer" "opener" "prev"
"search" "tag")
(area
"alternate" "author" "bookmark" "external" "help" "license" "me"
"next" "nofollow" "noopener" "noreferrer" "opener" "prev"
"search" "tag")
(form
"external" "help" "license" "next" "nofollow" "noopener"
"noreferrer" "opener" "prev" "search")
(link
"alternate" "author" "canonical" "dns-prefetch" "help" "icon"
"license" "manifest" "me" "modulepreload" "next" "pingback"
"preconnect" "prefetch" "preload" "prerender" "prev" "search"
"shortlink" "stylesheet"))
(sandbox
"allow-downloads-without-user-activation" "allow-downloads"
"allow-forms" "allow-modals" "allow-orientation-lock"
"allow-pointer-lock" "allow-popups"
"allow-popups-to-escape-sandbox" "allow-presentation"
"allow-same-origin" "allow-scripts"
"allow-storage-access-by-user-activation" "allow-top-navigation"
"allow-top-navigation-by-user-activation")
(scope "col" "colgroup" "row" "rowgroup")
(spellcheck
(textarea class--bool "default")
(t class--bool))
(target "_blank" "_parent" "_self" "_top")
(translate "no" "yes")
(type
(button "button" "submit" "reset")
(input
"button" "checkbox" "color" "date" "datetime-local" "email"
"file" "hidden" "image" "month" "number" "password" "radio"
"range" "reset" "search" "submit" "tel" "text" "time" "url"
"week")
(ol "1" "a" "A" "i" "I")
(script "module" "text/javascript")
(style "text/css"))
(wrap "hard" "off" "soft")
(xmlns "http://www.w3.org/1999/xhtml"))
"Alist of html5 attribute names and values.")
(defconst web-capf-math-tag-hierarchies
'((math web-capf--math-ordinary)
(merror web-capf--math-ordinary)
(mfrac web-capf--math-ordinary)
(mmultiscripts web-capf--math-ordinary mprescripts)
(mover web-capf--math-ordinary)
(mpadded web-capf--math-ordinary)
(mphantom web-capf--math-ordinary)
(mroot web-capf--math-ordinary)
(mrow web-capf--math-ordinary)
(msqrt web-capf--math-ordinary)
(mstyle web-capf--math-ordinary)
(msub web-capf--math-ordinary)
(msubsup web-capf--math-ordinary)
(msup web-capf--math-ordinary)
(mtable mtr)
(mtd web-capf--math-ordinary)
(mtr mtd)
(munder web-capf--math-ordinary)
(munderover web-capf--math-ordinary)
(semantics web-capf--math-ordinary annotation annotation-xml))
"Alist of mathml tags hierarchy rules.")
(defconst web-capf-math-ordinary-tags
'(merror mfrac mi mmultiscripts mn mo mover mpadded mphantom mroot
mrow ms mspace msqrt mstyle msub msubsup msup mtable mtext munder
munderover semantics)
"List of mathml tags available where ordinary layout tags expected.")
(defconst web-capf-math-tag-attrs
'((annotation "encoding")
(annotation-xml "encoding")
(math "display" "xmlns")
(mfrac "linethickness")
(mi "mathvariant")
(mo
"accent" "fence" "largeop" "lspace" "maxsize" "minsize"
"movablelimits" "rspace" "separator" "stretchy" "symmetric")
(mover "accent")
(mpadded "depth" "height" "lspace" "voffset" "width")
(mspace "depth" "height" "width")
(mtable
"align" "columnalign" "columnlines" "columnspacing" "frame"
"framespacing" "rowalign" "rowlines" "rowspacing" "width")
(mtd "columnalign" "columnspan" "rowalign" "rowspan")
(mtr "columnalign" "rowalign")
(munder "accentunder")
(munderover "accent" "accentunder")
(semantics "encoding"))
"Alist of mathml tags and attribute names.")
(defconst web-capf-math-global-attrs
'("class" "data" "dir" "displaystyle" "href" "id" "scriptlevel"
"style" "tabindex")
"List of mathml global attribute names.")
(defconst web-capf-math-attr-vals
'((accent class--bool)
(accentunder class--bool)
(align class--math-vertical-align)
(columnalign "center" "left" "right")
(columnlines class--math-line-style)
(columnspacing class--math-function)
(depth class--math-function)
(dir class--text-dir)
(display "block" "inline")
(displaystyle class--bool)
(encoding
"MathML-Content" "MathML-Presentation" "MathML-Presentation"
"SVG1.1" "application/mathml-presentation+xml"
"application/openmath+xml" "application/x-tex" "application/xml"
"image/png" "image/svg+xml" "text/html")
(fence class--bool)
(frame class--math-line-style)
(framespacing class--math-function)
(height class--math-function)
(largeop class--bool)
(linethickness class--math-function)
(lspace class--math-function)
(mathvariant "normal")
(maxsize class--math-function)
(minsize class--math-function)
(movablelimits class--bool)
(rowalign class--math-vertical-align)
(rowlines class--math-line-style)
(rowspacing class--math-function)
(rspace class--math-function)
(scriptlevel class--math-function)
(separator class--bool)
(stretchy class--bool)
(symmetric class--bool)
(voffset class--math-function)
(width class--math-function)
(xmlns "http://www.w3.org/1998/Math/MathML"))
"Alist of mathml attribute names and values.")
(defconst web-capf-svg-tag-hierarchies
'((a web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(animate web-capf--svg-desc)
(animateMotion web-capf--svg-desc mpath)
(animateTransform web-capf--svg-desc)
(circle web-capf--svg-desc web-capf--svg-anim)
(clipPath web-capf--svg-desc web-capf--svg-anim web-capf--svg-shp
text use)
(defs web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(ellipse web-capf--svg-desc web-capf--svg-anim)
(feBlend animate set)
(feColorMatrix animate set)
(feComponentTransfer feFuncA feFuncB feFuncG feFuncR)
(feComposite animate set)
(feConvolveMatrix animate set)
(feDiffuseLighting web-capf--svg-desc
feDistantLight fePointLight feSpotLight)
(feDisplacementMap animate set)
(feDistantLight animate set)
(feDropShadow animate script set)
(feFlood animate set)
(feFuncA animate set)
(feFuncB animate set)
(feFuncG animate set)
(feFuncR animate set)
(feGaussianBlur animate set)
(feImage animate animateTransform set)
(feMerge feMergeNode)
(feMergeNode animate set)
(feMorphology animate set)
(feOffset animate set)
(fePointLight animate set)
(feSpecularLighting web-capf--svg-desc
feDistantLight fePointLight feSpotLight)
(feSpotLight animate set)
(feTile animate set)
(feTurbulence animate set)
(filter feBlend feColorMatrix feComponentTransfer feComposite
feConvolveMatrix feDiffuseLighting feDisplacementMap
feDropShadow feFlood feGaussianBlur feImage feMerge
feMorphology feOffset feSpecularLighting feTile
feTurbulence)
(foreignObject body html math svg) ;; xxx
(g web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(image web-capf--svg-desc web-capf--svg-anim)
(line web-capf--svg-desc web-capf--svg-anim)
(linearGradient web-capf--svg-desc
animate animateTransform set stop)
(marker web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(mask web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(mpath web-capf--svg-desc)
(path web-capf--svg-desc web-capf--svg-anim)
(pattern web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(polygon web-capf--svg-desc web-capf--svg-anim)
(polyline web-capf--svg-desc web-capf--svg-anim)
(radialGradient web-capf--svg-desc
animate animateTransform set stop)
(rect web-capf--svg-desc web-capf--svg-anim)
(set web-capf--svg-desc)
(stop animate set)
(svg web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(switch web-capf--svg-desc web-capf--svg-anim web-capf--svg-shp
a foreignObject g image svg switch text use)
(symbol web-capf--svg-desc web-capf--svg-st web-capf--svg-anim
web-capf--svg-shp web-capf--svg-misc)
(text web-capf--svg-desc web-capf--svg-anim a textPath tspan)
(textPath web-capf--svg-desc a animate set tspan)
(tspan web-capf--svg-desc a animate set tspan)
(use web-capf--svg-desc web-capf--svg-anim)
(view web-capf--svg-desc))
"Alist of svg tags hierarchy rules.")
(defconst web-capf-svg-desc-tags
'(desc metadata title)
"List of svg tags available where descriptive tags expected.")
(defconst web-capf-svg-st-tags
'(defs g linearGradient radialGradient stop svg symbol use)
"List of svg tags available where structural and gradient tags expected.")
(defconst web-capf-svg-anim-tags
'(animate animateMotion animateTransform set)
"List of svg tags available where animation tags expected.")
(defconst web-capf-svg-shp-tags
'(circle ellipse line path polygon polyline rect)
"List of svg tags available where shape tags expected.")
(defconst web-capf-svg-misc-tags
'(a clipPath filter foreignObject image marker mask pattern script
style switch text view)
"List of svg tags available where miscellaneous construction tags expected.")
(defconst web-capf-svg-tag-attrs
'((a
"clip-path" "color-interpolation" "cursor" "download" "filter"
"href" "hreflang" "mask" "opacity" "ping" "pointer-events"
"referrerpolicy" "rel" "systemLanguage" "target" "type"
"visibility")
(animate
"accumulate" "additive" "attributeName" "attributeType" "begin"
"by" "calcMode" "color-interpolation" "dur" "end" "fill" "from"
"href" "keyPoints" "keySplines" "keyTimes" "max" "min"
"repeatCount" "repeatDur" "restart" "systemLanguage" "to" "values")
(animateMotion
"accumulate" "additive" "attributeName" "attributeType" "begin"
"by" "calcMode" "dur" "end" "fill" "from" "href" "keyPoints"
"keySplines" "keyTimes" "max" "min" "origin" "path" "repeatCount"
"repeatDur" "restart" "rotate" "systemLanguage" "to" "values")
(animateTransform
"accumulate" "additive" "attributeName" "attributeType" "begin"
"by" "calcMode" "dur" "end" "fill" "from" "href" "keyPoints"
"keySplines" "keyTimes" "max" "min" "repeatCount" "repeatDur"
"restart" "systemLanguage" "to" "type" "values")
(circle
"clip-path" "color-interpolation" "cursor" "cx" "cy" "fill"
"fill-opacity" "filter" "marker-end" "marker-mid" "marker-start"
"mask" "opacity" "paint-order" "pathLength" "pointer-events" "r"
"shape-rendering" "stroke" "stroke-dasharray" "stroke-dashoffset"
"stroke-opacity" "stroke-width" "systemLanguage" "vector-effect"
"visibility")
(clipPath
"clip-path" "clip-rule" "clipPathUnits" "color-interpolation"
"mask" "pointer-events" "systemLanguage")
(defs
"color-interpolation" "cursor" "pointer-events" "systemLanguage")
(ellipse
"clip-path" "color-interpolation" "cursor" "cx" "cy" "fill"
"fill-opacity" "filter" "marker-end" "marker-mid" "marker-start"
"mask" "opacity" "paint-order" "pathLength" "pointer-events" "rx"
"ry" "shape-rendering" "stroke" "stroke-dasharray"
"stroke-dashoffset" "stroke-opacity" "stroke-width"
"systemLanguage" "vector-effect" "visibility")
(feBlend
"color-interpolation-filters" "height" "in" "in2" "mode" "result"
"width" "x" "y")
(feColorMatrix
"color-interpolation-filters" "height" "in" "result" "type"
"values" "width" "x" "y")
(feComponentTransfer
"color-interpolation-filters" "height" "in" "result" "width" "x"
"y")
(feComposite
"color-interpolation-filters" "height" "in" "in2" "k1" "k2" "k3"
"k4" "operator" "result" "width" "x" "y")
(feConvolveMatrix
"bias" "color-interpolation-filters" "divisor" "edgeMode" "height"
"in" "kernelMatrix" "order" "preserveAlpha" "result" "targetX"
"targetY" "width" "x" "y")
(feDiffuseLighting
"color-interpolation-filters" "diffuseConstant" "height" "in"
"lighting-color" "result" "surfaceScale" "width" "x" "y")
(feDisplacementMap
"color-interpolation-filters" "height" "in" "in2" "result" "scale"
"width" "x" "xChannelSelector" "y" "yChannelSelector")
(feDistantLight "azimuth" "elevation")
(feDropShadow
"color-interpolation-filters" "dx" "dy" "flood-color"
"flood-opacity" "height" "in" "result" "stdDeviation" "width" "x"
"y")
(feFlood
"color-interpolation-filters" "flood-color" "flood-opacity"
"height" "result" "width" "x" "y")
(feFuncA
"amplitude" "exponent" "intercept" "tableValues" "type" "x" "y")
(feFuncB
"amplitude" "exponent" "intercept" "tableValues" "type" "x" "y")
(feFuncG
"amplitude" "exponent" "intercept" "tableValues" "type" "x" "y")
(feFuncR
"amplitude" "exponent" "intercept" "tableValues" "type" "x" "y")
(feGaussianBlur
"color-interpolation-filters" "edgeMode" "height" "in" "result"
"stdDeviation" "width" "x" "y")
(feImage
"color-interpolation-filters" "crossorigin" "height" "href"
"preserveAspectRatio" "result" "width" "x" "y")
(feMerge
"color-interpolation-filters" "height" "result" "width" "x" "y")
(feMergeNode "in" "x" "y")
(feMorphology
"color-interpolation-filters" "height" "in" "operator" "radius"
"result" "width" "x" "y")
(feOffset
"color-interpolation-filters" "dx" "dy" "height" "in" "result"
"width" "x" "y")
(fePointLight "x" "y" "z")
(feSpecularLighting
"color-interpolation-filters" "height" "in" "lighting-color"
"result" "specularConstant" "specularExponent" "surfaceScale"
"width" "x" "y")
(feSpotLight
"color-interpolation-filters" "limitingConeAngle" "pointsAtX"
"pointsAtY" "pointsAtZ" "specularExponent" "x" "y" "z")
(feTile
"color-interpolation-filters" "height" "in" "result" "width" "x"
"y")
(feTurbulence
"baseFrequency" "color-interpolation-filters" "height"
"numOctaves" "result" "seed" "stitchTiles" "type" "width" "x" "y")
(filter "filterUnits" "height" "primitiveUnits" "width" "x" "y")
(foreignObject
"color-interpolation" "height" "opacity" "overflow"
"pointer-events" "systemLanguage" "vector-effect" "visibility"
"width" "x" "y")
(g
"clip-path" "color-interpolation" "cursor" "filter" "mask"
"opacity" "pointer-events" "systemLanguage")
(image
"clip-path" "color-interpolation" "crossorigin" "cursor"
"decodint" "filter" "height" "href" "image-rendering" "mask"
"opacity" "overflow" "pointer-events" "preserveAspectRatio"
"systemLanguage" "vector-effect" "visibility" "width" "x" "y")
(line
"clip-path" "color-interpolation" "cursor" "filter" "marker-end"
"marker-mid" "marker-start" "mask" "opacity" "paint-order"
"pathLength" "pointer-events" "shape-rendering" "stroke"
"stroke-dasharray" "stroke-dashoffset" "stroke-linecap"
"stroke-opacity" "stroke-width" "systemLanguage" "vector-effect"
"visibility" "x1" "x2" "y1" "y2")
(linearGradient
"color-interpolation" "gradientTransform" "gradientUnits" "href"
"spreadMethod" "x1" "x2" "y1" "y2")
(marker
"clip-path" "color-interpolation" "cursor" "filter" "markerHeight"
"markerUnits" "markerWidth" "mask" "opacity" "orient" "overflow"
"pointer-events" "preserveAspectRatio" "refX" "refY" "viewBox")
(mask
"clip-path" "color-interpolation" "cursor" "filter" "height"
"mask" "maskContentUnits" "maskUnits" "pointer-events"
"systemLanguage" "width" "x" "y")
(mpath "href")
(path
"clip-path" "color-interpolation" "cursor" "d" "fill"
"fill-opacity" "fill-rule" "filter" "marker-end" "marker-mid"
"marker-start" "mask" "opacity" "paint-order" "pathLength"
"pointer-events" "shape-rendering" "stroke" "stroke-dasharray"
"stroke-dashoffset" "stroke-linecap" "stroke-linejoin"
"stroke-miterlimit" "stroke-opacity" "stroke-width"
"systemLanguage" "vector-effect" "visibility")
(pattern
"clip-path" "color-interpolation" "cursor" "filter" "height"
"href" "mask" "overflow" "patternContentUnits" "patternTransform"
"patternUnits" "pointer-events" "preserveAspectRatio"
"systemLanguage" "viewBox" "width" "x" "y")
(polygon
"clip-path" "color-interpolation" "cursor" "fill" "fill-opacity"
"fill-rule" "filter" "marker-end" "marker-mid" "marker-start"
"mask" "opacity" "paint-order" "pathLength" "pointer-events"
"points" "shape-rendering" "stroke" "stroke-dasharray"
"stroke-dashoffset" "stroke-linejoin" "stroke-miterlimit"
"stroke-opacity" "stroke-width" "systemLanguage" "vector-effect"
"visibility")
(polyline
"clip-path" "color-interpolation" "cursor" "fill" "fill-opacity"
"fill-rule" "filter" "marker-end" "marker-mid" "marker-start"
"mask" "opacity" "paint-order" "pathLength" "pointer-events"
"points" "shape-rendering" "stroke" "stroke-dasharray"
"stroke-dashoffset" "stroke-linecap" "stroke-linejoin"
"stroke-miterlimit" "stroke-opacity" "stroke-width"
"systemLanguage" "vector-effect" "visibility")
(radialGradient
"color-interpolation" "cx" "cy" "fr" "fx" "fy" "gradientTransform"
"gradientUnits" "href" "r" "spreadMethod")
(rect
"clip-path" "color-interpolation" "cursor" "fill" "fill-opacity"
"filter" "height" "marker-end" "marker-mid" "marker-start" "mask"
"opacity" "paint-order" "pathLength" "pointer-events" "rx" "ry"
"shape-rendering" "stroke" "stroke-dasharray" "stroke-dashoffset"
"stroke-linejoin" "stroke-miterlimit" "stroke-opacity"
"stroke-width" "systemLanguage" "vector-effect" "visibility"
"width" "x" "y")
(script "href" "type")
(set
"attributeName" "begin" "dur" "end" "fill" "href" "keyPoints"
"max" "min" "repeatCount" "repeatDur" "restart" "systemLanguage"
"to")
(stop "offset" "stop-color" "stop-opacity")
(style "media" "type")
(svg
"clip-path" "color-interpolation" "cursor" "filter" "height"
"mask" "opacity" "overflow" "pointer-events" "preserveAspectRatio"
"systemLanguage" "viewBox" "width" "x" "y")
(switch
"color-interpolation" "cursor" "filter" "opacity" "pointer-events"
"systemLanguage")
(symbol
"clip-path" "color-interpolation" "cursor" "filter" "height"
"mask" "opacity" "overflow" "pointer-events" "preserveAspectRatio"
"refX" "refY" "viewBox" "width" "x" "y")
(text
"clip-path" "color-interpolation" "cursor" "direction"
"dominant-baseline" "dx" "dy" "fill" "fill-opacity" "fill-rule"
"filter" "font-family" "font-size" "font-size-adjust"
"font-stretch" "font-style" "font-variant" "font-weight"
"lengthAdjust" "letter-spacing" "mask" "opacity" "overflow"
"paint-order" "pointer-events" "rotate" "stroke"
"stroke-dasharray" "stroke-dashoffset" "stroke-linecap"
"stroke-linejoin" "stroke-miterlimit" "stroke-opacity"
"stroke-width" "systemLanguage" "text-anchor" "text-decoration"
"text-rendering" "textLength" "unicode-bidi" "vector-effect"
"visibility" "word-spacing" "writing-mode" "x" "y")
(textPath
"alignment-baseline" "baseline-shift" "color-interpolation"
"direction" "dominant-baseline" "fill" "fill-opacity" "fill-rule"
"font-family" "font-size" "font-size-adjust" "font-stretch"
"font-style" "font-variant" "font-weight" "href" "lengthAdjust"
"letter-spacing" "method" "opacity" "paint-order" "path"
"pointer-events" "side" "spacing" "startOffset" "stroke"
"stroke-dasharray" "stroke-dashoffset" "stroke-linecap"
"stroke-linejoin" "stroke-miterlimit" "stroke-opacity"
"stroke-width" "systemLanguage" "text-anchor" "text-decoration"
"textLength" "unicode-bidi" "vector-effect" "visibility"
"word-spacing" "writing-mode")
(tspan
"alignment-baseline" "baseline-shift" "color-interpolation"
"direction" "dominant-baseline" "dx" "dy" "fill" "fill-opacity"
"fill-rule" "font-family" "font-size" "font-size-adjust"
"font-stretch" "font-style" "font-variant" "font-weight"
"lengthAdjust" "letter-spacing" "opacity" "paint-order"
"pointer-events" "rotate" "stroke" "stroke-dasharray"
"stroke-dashoffset" "stroke-linecap" "stroke-linejoin"
"stroke-miterlimit" "stroke-opacity" "stroke-width"
"systemLanguage" "text-anchor" "text-decoration" "textLength"
"unicode-bidi" "vector-effect" "visibility" "word-spacing"
"writing-mode" "x" "y")
(use
"clip-path" "color-interpolation" "cursor" "filter" "height"
"href" "mask" "opacity" "pointer-events" "systemLanguage"
"vector-effect" "width" "x" "y")
(view "preserveAspectRatio" "viewBox"))
"Alist of svg tags and attribute names.")
(defconst web-capf-svg-global-attrs
'("class" "color" "data" "display" "id" "lang" "style" "tabindex"
"transform" "transform-origin" "xml:base" "xml:lang" "xml:space")
"List of svg global attribute names.")
(defconst web-capf-svg-attr-vals
'((accumulate "none" "sum")
(additive "replace" "sum")
(alignment-baseline
"after-edge" "alphabetic" "auto" "baseline" "before-edge" "bottom"
"center" "central" "hanging" "ideographic" "mathematical" "middle"
"text-after-edge" "text-before-edge" "top")
(amplitude class--math-function)
(azimuth class--math-function)
(baseFrequency class--math-function)
(baseline-shift class--math-function "sub" "super")
(begin class--svg-timing-attr)
(bias class--math-function)
(by class--math-function)
(calcMode "discrete" "linear" "paced" "spline")
(clip-path web-capf--css-prop-vals)
(clip-rule class--fill-rule "inherit")
(clipPathUnits class--svg-unit)
(color web-capf--css-prop-vals)
(color-interpolation class--svg-color-space)
(color-interpolation-filters class--svg-color-space)
(crossorigin web-capf--html-attr-vals)
(cursor web-capf--css-prop-vals)
(cx class--math-function)
(cy class--math-function)
(d class--svg-path)
(decoding web-capf--html-attr-vals)
(diffuseConstant class--math-function)
(direction web-capf--css-prop-vals)
(display web-capf--css-prop-vals)
(divisor class--math-function)
(dominant-baseline
class--letter-align
"central" "mathematical" "middle" "text-bottom" "text-top")
(dur class--math-function "indefinite" "media")
(dx class--math-function)
(dy class--math-function)
(edgeMode "duplicate" "none" "wrap")
(elevation class--math-function)
(end class--svg-timing-attr)
(exponent class--math-function)
(fill
(animate "freeze" "keep")
(animateMotion "freeze" "keep")
(animate "freeze" "keep")
(animateTransform "freeze" "keep")
(set "freeze" "keep")
(t class--svg-paint))
(fill-opacity class--math-function)
(fill-rule class--fill-rule)
(filter web-capf--css-prop-vals)
(filterUnits class--svg-unit)
(flood-color class--color)
(flood-opacity class--math-function)
(font-family web-capf--css-prop-vals)
(font-size web-capf--css-prop-vals)
(font-size-adjust web-capf--css-prop-vals)
(font-stretch web-capf--css-prop-vals)
(font-style web-capf--css-prop-vals)
(font-variant web-capf--css-prop-vals)
(font-weight web-capf--css-prop-vals)
(fr class--math-function)
(from class--math-function)
(fx class--math-function)
(fy class--math-function)
(gradientTransform class--transform-function)
(gradientUnits class--svg-unit)