summaryrefslogtreecommitdiff
path: root/elpa/auctex-13.1.3/style/menukeys.el
blob: ac375ea4ee8a07f3c058fe63a51c6afa4b704617 (plain)
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
;;; menukeys.el --- AUCTeX style for `menukeys.sty' (v1.4)  -*- lexical-binding: t; -*-

;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc.

;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
;; Created: 2016-02-07
;; Keywords: tex

;; This file is part of AUCTeX.

;; AUCTeX 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, or (at your option)
;; any later version.

;; AUCTeX 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 AUCTeX; see the file COPYING.  If not, write to the Free
;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
;; 02110-1301, USA.

;;; Commentary:

;; This file adds support for `menukeys.sty' (v1.4) from 2016/04/18.
;; `menukeys.sty' is part of TeXLive.

;;; Code:

;; Needed for auto-parsing:
(require 'tex)
(require 'latex)

;; Silence the compiler:
(declare-function font-latex-add-keywords
                  "font-latex"
                  (keywords class))

(declare-function LaTeX-xcolor-definecolor-list "xcolor" ())

(defvar LaTeX-menukeys-input-separators-list
  '("/" "=" "*" "+" "," ";" ":" "-" ">" "<" "bslash")
  "List of input separators for macros of menukeys package.")

(defvar LaTeX-menukeys-predefined-styles-list
  '("menus" "roundedmenus" "angularmenus" "roundedkeys"
    "shadowedroundedkeys"  "angularkeys"  "shadowedangularkeys"
    "typewriterkeys"       "paths"        "pathswithfolder"
    "pathswithblackfolder" "hyphenatepaths"
    "hyphenatepathswithfolder"
    "hyphenatepathswithblackfolder")
  "List of predefined styles for macros from menukeys package.")

;; Setup for \newmenustyle(simple):
(TeX-auto-add-type "menukeys-newmenustyle" "LaTeX")

(defvar LaTeX-menukeys-newmenustyle-regexp
  '("\\\\\\(?:new\\|copy\\)menustyle\\(?:simple\\)?*?{\\([^}]+\\)}"
    1 LaTeX-auto-menukeys-newmenustyle)
  "Matches the argument of \\newmenustyle and
\\newmenustylesimple from menukeys package.")

;; Setup for \newmenucolortheme:
(TeX-auto-add-type "menukeys-newmenucolortheme" "LaTeX")

(defvar LaTeX-menukeys-newmenucolortheme-regexp
  '("\\\\\\(?:new\\|copy\\)menucolortheme{\\([^}]+\\)}"
    1 LaTeX-auto-menukeys-newmenucolortheme)
  "Matches the argument of \\newmenucolortheme from menukeys package.")

;; Setup for \newmenumacro:
(TeX-auto-add-type "menukeys-newmenumacro" "LaTeX")

(defvar LaTeX-menukeys-newmenumacro-regexp
  `(,(concat
      "\\\\\\(new\\|renew\\|provide\\)menumacro"
      "{?"
      (regexp-quote TeX-esc)
      "\\([a-zA-Z]+\\)"
      "}?"
      "\\(?:\\[\\([^]]*\\)\\]\\)?")
    (2 3 1) LaTeX-auto-menukeys-newmenumacro)
  "Matches the arguments of \\newmenumacro from menukeys package.")

(defun LaTeX-menukeys-auto-prepare ()
  "Clear various `LaTeX-auto-menukeys-*' variables before parsing."
  (setq LaTeX-auto-menukeys-newmenustyle nil
        LaTeX-auto-menukeys-newmenucolortheme nil
        LaTeX-auto-menukeys-newmenumacro nil))

(defun LaTeX-menukeys-auto-cleanup ()
  "Process the parsed elements for menukeys package.
This function adds parsed elements from the variable
`LaTeX-menukeys-newmenumacro-list' to AUCTeX via the function
`TeX-add-symbols'.  The variable
`LaTeX-menukeys-newmenumacro-list' and not the function with the
same name is used since this function looks for the order of
commands which are set by \\renewmenumacro in order to pick the
current separator.  These renew-commands are also removed first
from the variable `TeX-symbol-list' before being re-added."
  (dolist (x (apply #'append LaTeX-menukeys-newmenumacro-list))
    (let ((macro (nth 0 x))
          (sep   (nth 1 x))
          (renew (when (string= (nth 2 x) "renew")
                   (nth 2 x))))
      ;; When we are renewmenumacro'ing, delete the entry first from the
      ;; variable `TeX-symbol-list' and then add the new spec:
      (when renew
        (setq TeX-symbol-list
              (assq-delete-all (car (assoc macro (TeX-symbol-list))) TeX-symbol-list)))
      (TeX-add-symbols
       `(,macro [ TeX-arg-eval completing-read
                               (TeX-argument-prompt t nil
                                                    ,(concat "Input separator "
                                                             "(default "
                                                             (if (and sep (not (string= sep "")))
                                                                 sep
                                                               ",")
                                                             ")"))
                               LaTeX-menukeys-input-separators-list ] t ))
      (when (and (featurep 'font-latex)
                 (eq TeX-install-font-lock 'font-latex-setup))
        (font-latex-add-keywords `((,macro "[{"))
                                 'textual)))))

(add-hook 'TeX-auto-prepare-hook #'LaTeX-menukeys-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-menukeys-auto-cleanup t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)

(defun TeX-arg-menukeys-newmenumacro (optional &optional renew)
  "Query and insert the arguments of \\newmenumacro from menukeys package.
After inserting, add the name of macro and the optional separator
to the name of known macros via `TeX-add-symbols'.  If
font-latex.el is loaded, also use `font-latex-add-keywords' on
macro.  If RENEW is non-nil, query for an already defined macro."
  (let ((macro (if renew
                   (completing-read
                    (concat "Macro: " TeX-esc)
                    (TeX-delete-duplicate-strings (mapcar #'car (LaTeX-menukeys-newmenumacro-list))))
                 (TeX-read-string (concat "Macro: " TeX-esc))))
        (sep   (completing-read
                (TeX-argument-prompt optional nil "Input separator (default ,)")
                LaTeX-menukeys-input-separators-list))
        (style (completing-read
                (TeX-argument-prompt optional nil "Style")
                (LaTeX-menukeys-newmenustyle-list))))
    (TeX-argument-insert (concat TeX-esc macro) optional)
    (when (and sep (not (string= sep "")))
      (insert (format "[%s]" sep)))
    (TeX-argument-insert style optional)
    ;; When we are renewmenumacro'ing, delete the entry first from the
    ;; variable `TeX-symbol-list' and then add the new spec:
    (when renew
      (setq TeX-symbol-list
            (assq-delete-all (car (assoc macro (TeX-symbol-list))) TeX-symbol-list)))
    (TeX-add-symbols
     `(,macro [ TeX-arg-eval completing-read
                             (TeX-argument-prompt t nil
                                                  ,(concat "Input separator "
                                                          "(default "
                                                          (if (and sep (not (string= sep "")))
                                                              sep
                                                            ",")
                                                          ")"))
                             LaTeX-menukeys-input-separators-list ] t ))
    (when (and (featurep 'font-latex)
               (eq TeX-install-font-lock 'font-latex-setup))
      (font-latex-add-keywords `((,macro       "[{"))
                               'textual))))

(TeX-add-style-hook
 "menukeys"
 (lambda ()

   ;; Add menukeys to the parser
   (TeX-auto-add-regexp LaTeX-menukeys-newmenustyle-regexp)
   (TeX-auto-add-regexp LaTeX-menukeys-newmenucolortheme-regexp)
   (TeX-auto-add-regexp LaTeX-menukeys-newmenumacro-regexp)

   ;; Activate predefined stuff
   (apply #'LaTeX-add-menukeys-newmenustyles LaTeX-menukeys-predefined-styles-list)
   (LaTeX-add-menukeys-newmenucolorthemes "gray" "blacknwhite")

   ;; Run style hooks for xcolor, tikz and relsize
   (TeX-run-style-hooks "xcolor" "tikz" "relsize")

   ;; 4.1 Basic macros: These are not defined if the package option
   ;; definemenumacros ist set to false (default is true).  We check
   ;; for the package option here and add them.
   (unless (LaTeX-provided-package-options-member "menukeys" "definemenumacros=false")
     (TeX-add-symbols
      ;; \menu      [<separator>]{<sequence>}
      ;; \directory [<separator>]{path}
      ;; \keys      [<separator>]{keystrokes}
      '("menu"
        [ TeX-arg-eval completing-read
          (TeX-argument-prompt t nil "Input separator")
          LaTeX-menukeys-input-separators-list ]
        t)

      '("directory"
        [ TeX-arg-eval completing-read
          (TeX-argument-prompt t nil "Input separator")
          LaTeX-menukeys-input-separators-list ]
        t)

      '("keys"
        [ TeX-arg-eval completing-read
          (TeX-argument-prompt t nil "Input separator")
          LaTeX-menukeys-input-separators-list ]
        t)))

   (TeX-add-symbols
    ;; 4.2.1 Predefined styles
    ;; \drawtikzfolder[<front fill>][<draw>]
    '("drawtikzfolder"
      [ TeX-arg-eval completing-read
        (TeX-argument-prompt t nil "Front color")
        (LaTeX-xcolor-definecolor-list) ]
      [ TeX-arg-eval completing-read
        (TeX-argument-prompt t nil "Line color")
        (LaTeX-xcolor-definecolor-list) ] )

    ;; 4.2.2 Declaring styles
    ;; \newmenustylesimple*{<name>}[<pre>]{<style>}[<sep>][<post>]{<theme>}
    '("newmenustylesimple"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenustyles name)
           (format "%s" name))))
      [ t ] nil [ nil ] [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    '("newmenustylesimple*"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenustyles name)
           (format "%s" name))))
      [ t ] nil [ nil ] [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    ;; \newmenustyle*{<name>}[<pre>]{<first>}[<sep>]{<mid>}{<last>}{<single>}[<post>]{<theme>}
    '("newmenustyle"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenustyles name)
           (format "%s" name))))
      [ t ] nil [ nil ] nil nil nil [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    '("newmenustyle*"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenustyles name)
           (format "%s" name))))
      [ t ] nil [ nil ] nil nil nil [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    '("CurrentMenuElement" 0)

    ;; 4.2.3 Copying styles
    '("copymenustyle"
      (TeX-arg-eval
       (lambda ()
         (let ((copy (TeX-read-string
                      (TeX-argument-prompt nil nil "Copy")))
               (orig (completing-read
                      (TeX-argument-prompt nil nil "Original")
                      (LaTeX-menukeys-newmenustyle-list))))
           (LaTeX-add-menukeys-newmenustyles copy)
           (TeX-argument-insert copy nil)
           (format "%s" orig)))))

    ;; 4.2.4 Changing styles
    ;; \changemenuelement*{name}{element}{definition}
    '("changemenuelement"
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Name")
                    (LaTeX-menukeys-newmenustyle-list))
      2)

    '("changemenuelement*"
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Name")
                    (LaTeX-menukeys-newmenustyle-list))
      2)

    ;; Same arguments as \newmenustylesimple
    '("renewmenustylesimple"
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Name")
                    (LaTeX-menukeys-newmenustyle-list))
      [ t ] nil [ nil ] [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    '("providemenustylesimple"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenustyles name)
           (format "%s" name))))
      [ t ] nil [ nil ] [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    ;; Same arguments as \newmenustyle
    '("providemenustyle"
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Name")
                    (LaTeX-menukeys-newmenustyle-list))
      [ t ] nil [ nil ] nil nil nil [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    '("renewmenustyle"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenustyles name)
           (format "%s" name))))
      [ t ] nil [ nil ] nil nil nil [ nil ]
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Color theme")
                    (LaTeX-menukeys-newmenucolortheme-list)))

    ;; 4.3 Color themes
    ;; 4.3.2 Create a theme
    ;; \newmenucolortheme{<name>}{<model>}{<bg>}{<br>}{<txt>}[<a>][<b>][<c>]
    '("newmenucolortheme"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenucolorthemes name)
           (format "%s" name))))
      (TeX-arg-eval
       (lambda ()
         (let ((model (completing-read
                       (TeX-argument-prompt nil nil "Model")
                       (LaTeX-xcolor-color-models))))
           (TeX-argument-insert model nil)
           (if (string= model "named")
               (let ((bg (completing-read
                          (TeX-argument-prompt nil nil "Node background color")
                          (LaTeX-xcolor-definecolor-list)))
                     (br (completing-read
                          (TeX-argument-prompt nil nil "Node border color")
                          (LaTeX-xcolor-definecolor-list)))
                     (txt (completing-read
                           (TeX-argument-prompt nil nil "Node text color")
                           (LaTeX-xcolor-definecolor-list))))
                 (TeX-argument-insert bg nil)
                 (TeX-argument-insert br nil)
                 (format "%s" txt))
             (let ((bg (TeX-read-string
                        (TeX-argument-prompt nil nil "Node background color spec")))
                   (br (TeX-read-string
                        (TeX-argument-prompt nil nil "Node border color spec")))
                   (txt (TeX-read-string
                         (TeX-argument-prompt nil nil "Node text color spec"))))
               (TeX-argument-insert bg nil)
               (TeX-argument-insert br nil)
               (format "%s" txt))))))
      (TeX-arg-conditional (y-or-n-p "With additional optional arguments? ")
                           ( [ 3 ] )
                           (ignore)))

    ;; 4.3.3 Copy a theme
    '("copymenucolortheme"
      (TeX-arg-eval
       (lambda ()
         (let ((copy (TeX-read-string
                      (TeX-argument-prompt nil nil "Copy")))
               (orig (completing-read
                      (TeX-argument-prompt nil nil "Original")
                      (LaTeX-menukeys-newmenucolortheme-list))))
           (LaTeX-add-menukeys-newmenucolorthemes copy)
           (TeX-argument-insert copy nil)
           (format "%s" orig)))))

    ;; 4.3.4 Change a theme
    '("changemenucolor"
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Name")
                    (LaTeX-menukeys-newmenucolortheme-list))
      (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Element")
                    '("bg" "br" "txt"))
      (TeX-arg-eval
       (lambda ()
         (let ((model (completing-read
                       (TeX-argument-prompt nil nil "Model")
                       (LaTeX-xcolor-color-models))))
           (TeX-argument-insert model nil)
           (if (string= model "named")
               (let ((color (completing-read
                             (TeX-argument-prompt nil nil "Color")
                             (LaTeX-xcolor-definecolor-list))))
                 (format "%s" color))
             (let ((color (TeX-read-string
                           (TeX-argument-prompt nil nil "Color spec"))))
               (format "%s" color)))))))

    ;; Same arguments as \newmenucolortheme
    '("renewmenucolortheme"
      (TeX-arg-eval
       (lambda ()
         (let ((name (TeX-read-string
                      (TeX-argument-prompt nil nil "Name"))))
           (LaTeX-add-menukeys-newmenucolorthemes name)
           (format "%s" name))))
      (TeX-arg-eval
       (lambda ()
         (let ((model (completing-read
                       (TeX-argument-prompt nil nil "Model")
                       (LaTeX-xcolor-color-models))))
           (TeX-argument-insert model nil)
           (if (string= model "named")
               (let ((bg (completing-read
                          (TeX-argument-prompt nil nil "Node background color")
                          (LaTeX-xcolor-definecolor-list)))
                     (br (completing-read
                          (TeX-argument-prompt nil nil "Node border color")
                          (LaTeX-xcolor-definecolor-list)))
                     (txt (completing-read
                           (TeX-argument-prompt nil nil "Node text color")
                           (LaTeX-xcolor-definecolor-list))))
                 (TeX-argument-insert bg nil)
                 (TeX-argument-insert br nil)
                 (format "%s" txt))
             (let ((bg (TeX-read-string
                        (TeX-argument-prompt nil nil "Node background color spec")))
                   (br (TeX-read-string
                        (TeX-argument-prompt nil nil "Node border color spec")))
                   (txt (TeX-read-string
                         (TeX-argument-prompt nil nil "Node text color spec"))))
               (TeX-argument-insert bg nil)
               (TeX-argument-insert br nil)
               (format "%s" txt))))))
      (TeX-arg-conditional (y-or-n-p "With additional optional arguments? ")
                           ( [ 3 ] )
                           (ignore)))

    ;; 4.4 Menu macros
    ;; 4.4.2 Defining or changing menu macros
    ;; \newmenumacro{<macro>} [<input sep>]{<style>}
    '("newmenumacro"     TeX-arg-menukeys-newmenumacro)
    '("providemenumacro" TeX-arg-menukeys-newmenumacro)
    '("renewmenumacro"   (TeX-arg-menukeys-newmenumacro t)))

   ;; 4.5 Keys: These macros are defined when definekeys option is not
   ;; false.
   ;; 0 : No argment, one macro
   ;; 1 : One argument, with completion
   ;; 2 : No argment, three macros: \<key>, \<key>win, \<key>mac
   (unless (LaTeX-provided-package-options-member "menukeys" "definekeys=false")
     (let ((keycmds '(("shift" . 0)   ("capslock" . 2)  ("tab" . 2)
                      ("esc" . 2)     ("ctrl" . 2)      ("alt" . 2)
                      ("AltGr" . 0)   ("cmd"   . 0)     ("Space" . 0)
                      ("SPACE" . 0)   ("return" . 2)    ("enter"  . 2)
                      ("winmenu" . 0) ("backspace" . 0) ("del" . 0)
                      ("arrowkeyup" . 0)   ("arrowkeydown" . 0)
                      ("arrowkeyleft" . 0) ("arrowkeyright" . 0)
                      ("arrowkey" . 1)
                      ;; Text inside some keys:
                      ("ctrlname" . 0) ("delname" . 0) ("spacename" . 0)))
           (os '("mac" "win"))
           collector)
       (dolist (cmd keycmds)
         (cond
          ((= (cdr cmd) 0)
           (push (car cmd) collector))
          ((= (cdr cmd) 1)
           (push (list (car cmd) '(TeX-arg-eval completing-read
                                                "Direction: "
                                                '("^" "v" ">" "<")))
                 collector))
          ((= (cdr cmd) 2)
           (push (car cmd) collector)
           (dolist (x os)
             (push (concat (car cmd) x) collector)))))
       (apply #'TeX-add-symbols collector)))

   ;; Fontification:
   (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
     (font-latex-add-keywords '(("menu"            "[{")
                                ("directory"       "[{")
                                ("keys"            "[{")
                                ("drawtikzfolder"  "[["))
                              'textual)
     (font-latex-add-keywords '(("newmenustylesimple"       "*{[{[[{")
                                ("newmenustyle"             "*{[{[{{{[{")
                                ("copymenustyle"            "{{")
                                ("changemenuelement"        "*{{{")
                                ("renewmenustylesimple"     "{[{[[{")
                                ("providemenustylesimple"   "{[{[[{")
                                ("providemenustyle"         "{[{[{{{[{")
                                ("renewmenustyle"           "{[{[{{{[{")
                                ("newmenucolortheme"        "{{{{{[[[")
                                ("copymenucolortheme"       "{{")
                                ("changemenucolor"          "{{{{")
                                ("renewmenucolortheme"      "{{{{{[[[")
                                ("newmenumacro"             "|{\\[{")
                                ("providemenumacro"         "|{\\[{")
                                ("renewmenumacro"           "|{\\[{"))
                              'function)))
 TeX-dialect)

(defvar LaTeX-menukeys-package-options-list
  '(("definemenumacros" ("true" "false"))
    ("definekeys"       ("true" "false"))
    ("mackeys"          ("text" "symbols"))
    ("os"               ("mac"  "win")))
  "Package options for menukeys package.")

(defun LaTeX-menukeys-package-options ()
  "Prompt for package options for the menukeys package."
  (TeX-read-key-val t LaTeX-menukeys-package-options-list))

;;; menukeys.el ends here