Sources/OrgCore/Export/ODTSourceModes.swift

90 lines · 8218 bytes

2 symbols in this file
 1/// The names `NAME-mode` is a function for in `emacs -Q` (Emacs 31.1, Org 9.8.7, ox-odt
 2/// loaded): the source block languages ox-odt fontifies, after `org-src-lang-modes`.
 3enum ODTSourceModes {
 4    static func fontified(_ language: String) -> Bool {
 5        modes.contains(langModes[language] ?? language)
 6    }
 7
 8    /// `org-src-lang-modes`.
 9    static let langModes: [String: String] = [
10        "C": "c", "C++": "c++", "asymptote": "asy", "beamer": "latex", "calc": "fundamental", "cpp": "c++",
11        "ditaa": "artist", "desktop": "conf-desktop", "dot": "graphviz-dot", "elisp": "emacs-lisp",
12        "ocaml": "tuareg", "screen": "shell-script", "sqlite": "sql", "toml": "conf-toml", "shell": "sh",
13        "ash": "sh", "sh": "sh", "bash": "sh", "jsh": "sh", "bash2": "sh", "dash": "sh", "dtksh": "sh",
14        "ksh": "sh", "es": "sh", "rc": "sh", "itcsh": "sh", "tcsh": "sh", "jcsh": "sh", "csh": "sh",
15        "ksh88": "sh", "oash": "sh", "pdksh": "sh", "mksh": "sh", "posix": "sh", "wksh": "sh", "wsh": "sh",
16        "zsh": "sh", "rpm": "sh",
17    ]
18
19    static let modes: Set<String> = Set("""
20        *table--cell-describe Buffer-menu Buffer-menu-group-by Info LaTeX TeX abbrev add-minor allout
21        allout-widgets antlr antlr-v4 archive array artist asm authinfo auto-composition auto-compression
22        auto-encryption auto-fill auto-image-file auto-insert auto-lower auto-raise auto-revert
23        auto-revert-tail auto-save auto-save-visited autoconf awk bash-ts bat bibtex bibtex-style
24        binary-overwrite blink-cursor bovine-grammar buffer-face bug-reference bug-reference-prog button c
25        c++ c++-ts c-initialize-cc c-or-c++ c-or-c++-ts c-ts calendar capitalized-words center-line
26        cfengine-auto cfengine2 cfengine3 change-log checkdoc-minor cl-font-lock-built-in
27        cl-old-struct-compat clean cmake-ts column-number comint comint-fontify-input common-lisp compilation
28        compilation-minor compilation-shell-minor completion-in-region completion-list completion-preview
29        conf conf-colon conf-desktop conf-javaprop conf-npmrc conf-ppd conf-space conf-toml conf-unix
30        conf-windows conf-xdefaults context-menu cperl csharp csharp-ts css css-ts cua cua-rectangle-mark
31        cua-selection current-input cursor-face-highlight cursor-intangible cursor-sensor custom-group-of
32        custom-set-minor customize cvs-status cwarn dcl decipher delete-selection delete-selection-local
33        delete-trailing-whitespace delphi describe describe-minor desktop-save diary dictionary
34        dictionary-tooltip diff diff-minor dired dirtrack display-battery display-fill-column-indicator
35        display-line-numbers display-time dns doc-view doc-view-minor dockerfile-ts doctex double dsssl
36        dynamic-completion ebrowse-member ebrowse-tree edit-abbrevs editorconfig editorconfig-conf eldoc
37        electric-indent electric-indent-local electric-layout electric-layout-local electric-pair
38        electric-pair-local electric-quote electric-quote-local elide-head elisp-byte-code elixir-ts
39        emacs-authors emacs-lisp emacs-lock emacs-news emacs-news-view enriched epa-global-mail epa-mail erts
40        eshell etags-regen etc-authors eww f90 fido fido-vertical file-name-shadow find-function flymake
41        flyspell flyspell-prog follow font-lock font-lock-change font-lock-value-in-major footnote forms
42        fortran frame--current-background frame--current-backround frame-set-background
43        frame-terminal-default-bg fundamental gdb-script generic glasses global-auto-composition
44        global-auto-revert global-completion-preview global-cwarn global-dictionary-tooltip
45        global-display-fill-column-indicator global-display-line-numbers global-ede global-eldoc
46        global-font-lock global-goto-address global-hi-lock global-highlight-changes global-hl-line
47        global-prettify-symbols global-reveal global-so-long global-subword global-superword global-tab-line
48        global-visual-line global-visual-wrap-prefix global-whitespace global-whitespace-newline
49        global-window-tool-bar global-word-wrap-whitespace global-xref-mouse glyphless-display
50        gnus-mailing-list gnus-score go-mod-ts go-ts go-work-ts goto-address goto-address-prog gpm-mouse grep
51        gud-tooltip header-line-indent heex-ts help hexl hi-lock hide-ifdef highlight-changes
52        highlight-changes-visible hl-line hs-indentation hs-minor html html-ts icalendar icomplete
53        icomplete-vertical icon idl ido iimage image image-dired-minor image-minor indent-according-to
54        indent-tabs indented-text isearch isearch--describe-regexp isearch--describe-word isearch-describe
55        isearch-fold-quotes ispell-minor iswitchb java java-ts javascript jit-lock jit-lock-debug js js-base
56        js-json js-jsx js-ts json-ts kill-ring-deindent latex ld-script less-css line-number lisp lisp-data
57        lisp-interaction lock-file log-view lost-selection lua lua-ts m2 m4 mail mail-abbrevs makefile
58        makefile-automake makefile-bsdmake makefile-gmake makefile-imake makefile-makepp master menu-bar
59        menu-bar-display-line-numbers mercury message messages-buffer metafont metapost mh-folder mhtml
60        mhtml-ts midnight minibuffer minibuffer-depth-indicate minibuffer-electric-default
61        minibuffer-inactive minibuffer-nonselected minibuffer-regexp mixal mode-line-invisible modula-2
62        mouse-avoidance mouse-shift-adjust mouse-wheel msb next-error-follow-minor normal
63        normal-erase-is-backspace nroff nxml objc occur occur-edit octave octave-maybe opascal org org-agenda
64        org-agenda-archives org-agenda-clockreport org-agenda-entry-text org-agenda-follow org-agenda-log
65        org-babel-interpret-file org-beamer org-cdlatex org-check-for-org org-element--next org-export-stack
66        org-fontify-like-in-org org-indent org-list-checkbox-radio org-num org-run-like-in-org org-src
67        org-src-get-lang org-table-follow-field org-table-header-line orgtbl outline outline-minor overwrite
68        package-autosuggest paragraph-indent-minor paragraph-indent-text pascal pending-delete perl php-ts
69        picture pike pixel-scroll pixel-scroll-precision plain-TeX plain-tex plstore pr-toggle pr-txt
70        prettify-special-glyphs prettify-symbols process-menu prog prolog ps python python-base python-ts
71        rcirc-track-minor read-extended-command read-only recentf rectangle-mark refill reftex
72        reftex-index-phrases reftex-isearch-minor repeat reveal rmail rng-validate rst rst-minor ruby
73        ruby-base ruby-ts ruler rust-ts save-place save-place-local savehist scheme scroll-all scroll-lock
74        scss semantic server ses set-auto set-binary set-buffer-major set-input set-input-interrupt
75        set-input-meta sgml sh sh--redirect-bash-ts sh-base sh-electric-here-document shell-script show-paren
76        show-paren-local sieve simula size-indication slitex smerge snmp snmpv2 so-long so-long-minor special
77        speedbar-frame speedbar-window sql srecode-template srt strokes subword superword system-taskbar
78        tab-bar tab-bar-history tab-line tab-switcher table-fixed-width tabulated-list tags-table tar tcl
79        temp-buffer-resize tex texinfo text tildify todo todo-archive todo-filtered-items toggle-rot13
80        toggle-viper toml-ts tooltip tooltip-show-help-non transient-mark treesit--explorer-tree
81        treesit--read-major treesit-explore treesit-inspect tsx-ts tty-tip turn-off-follow
82        turn-on-auto-revert turn-on-auto-revert-tail turn-on-eldoc turn-on-follow turn-on-gnus-dired
83        turn-on-gnus-mailing-list turn-on-prettify-symbols turn-on-visual-line type-break typescript-ts
84        typescript-ts-base undelete-frame universal-argument- url-handler variable-pitch vc vc-auto-revert
85        vera verilog vhdl view viper visible visual-line visual-wrap-prefix wdired-change-to-wdired
86        which-function which-key which-key-show-full-major which-key-show-major whitespace whitespace-newline
87        whitespace-page-delimiters widget-minor windmove window-divider window-tool-bar winner wisent-grammar
88        word-wrap-whitespace xml xref-mouse xterm-mouse yaml-ts zone
89        """.split(whereSeparator: \.isWhitespace).map(String.init))
90}