-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathwolfram-mode.elc
108 lines (91 loc) · 14.7 KB
/
wolfram-mode.elc
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
;ELC
;;; Compiled
;;; in Emacs version 25.1.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\311\312\313\314\315DD\316\317\320\307\304&\210\311\321\313\314\322DD\323\317\324\307\304&\210\311\325\313\314\326DD\327\317\330\307\304&\210\311\331\313\314\332DD\333\317\334\307\304&\210\311\335\313\314\336DD\337\317\324\307\304&\207" [require comint smie custom-declare-group wolfram-mode nil "Editing Wolfram Language code" :group languages custom-declare-variable wolfram-mode-hook funcall function #[0 "\300\207" [nil] 1] "Normal hook run when entering `wolfram-mode'.\nSee `run-hooks'." :type hook wolfram-program #[0 "\300\207" [#1="math"] 1 #1#] "Command to invoke at `run-wolfram'." string wolfram-program-arguments #[0 "\300\207" [nil] 1] "Additional arguments to `wolfram-program'." (repeat string) wolfram-indent #[0 "\300\207" [8] 1] "Basic Indentation for newline." integer wolfram-path #[0 "\300\207" [nil] 1] "Directory in Mathematica $Path. Emacs has to be able to write in this directory."] 8)
#@28 Keymap for `wolfram-mode'.
(defvar wolfram-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\315#\210\211\207" [make-sparse-keymap define-key "" newline-and-indent "]" wolfram-electric-braket ")" wolfram-electric-paren "}" wolfram-electric-brace "" wolfram-send-region "" wolfram-send-last-mathexp ""] 5) (#$ . 1395))
#@38 Syntax table used in `wolfram-mode'.
(defvar wolfram-mode-syntax-table (byte-code "\300 \301\302\303#\210\301\304\303#\210\301\305\303#\210\301\306\303#\210\301\307\303#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\327#\210\301\330\327#\210\301\331\327#\210\301\332\327#\210\301\333\327#\210\301\334\327#\210\301\335\327#\210\301\336\327#\210\301\337\327#\210\301\340\327#\210\301\341\327#\210\301\342\327#\210\301\343\327#\210\301\344\345#\210\301\346\347#\210\301\350\351#\210\301\352\351#\210\301\353\351#\210\301\354\351#\210\301\355\351#\210\301\356\351#\210\211\207" [make-syntax-table modify-syntax-entry 32 " " 9 12 10 13 40 "()1n" 41 ")(4n" 42 "_ 23n" 91 "(]" 93 ")[" 123 "(}" 125 "){" 61 "." 58 37 60 62 38 124 95 47 33 64 35 39 92 "\\" 34 "\"" 45 "_" 46 96 94 36 43] 5) (#$ . 1820))
(define-abbrev-table 'wolfram-mode-abbrev-table nil)
(defvar wolfram-syntax-propertize-function #[514 "b\210`W\205 \300\301\302#\205 \303\304\224\304\225\305\306$\210\202 \207" [re-search-forward "\\\\[[A-Z][A-Za-z]*]" t put-text-property 0 syntax-table (3)] 7 "\n\n(fn START END)"])
(defvar wolfram-font-lock-keywords '(("^In[[0-9]+]:=" . font-lock-keyword-face) ("^Out[[0-9]+]=" . font-lock-keyword-face) ("^Out[[0-9]+]//[A-Za-z][A-Za-z0-9]*=" . font-lock-keyword-face) ("\\([A-Za-z][A-Za-z0-9`]*\\)[ ]*[[][ ]*[[]" 1 "default") ("\\([A-Za-z][A-Za-z0-9`]*\\)[ ]*[[]" 1 font-lock-function-name-face) ("//[ \f\n]*\\([A-Za-z][A-Za-z0-9`]*\\)" 1 font-lock-function-name-face) ("\\([A-Za-z][A-Za-z0-9`]*\\)[ \f\n]*/@" 1 font-lock-function-name-face) ("\\([A-Za-z][A-Za-z0-9`]*\\)[ \f\n]*//@" 1 font-lock-function-name-face) ("\\([A-Za-z][A-Za-z0-9`]*\\)[ \f\n]*@@" 1 font-lock-function-name-face) ("~[ ]*\\([A-Za-z][A-Za-z0-9`]*\\)[ ]*~" 1 font-lock-function-name-face) ("_[) ]*\\?\\([A-Za-z][A-Za-z0-9`]*\\)" 1 font-lock-function-name-face) ("\\(&&\\)" 1 "default") ("&" . font-lock-function-name-face) ("\\\\[[A-Za-z][A-Za-z0-9]*]" . font-lock-constant-face) ("$[A-Za-z0-9]+" . font-lock-variable-name-face) ("\\([A-Za-z0-9]+\\)[ ]*\\->" 1 font-lock-type-face) ("<<[ \f\n]*[A-Za-z][A-Za-z0-9]*`[ \f\n]*[A-Za-z][A-Za-z0-9]*[ \f\n]*`" . font-lock-type-face) ("[A-Za-z][A-Za-z0-9]*::[A-Za-z][A-Za-z0-9]*" . font-lock-warning-face) ("\\[Calculating\\.\\.\\.\\]" . font-lock-warning-face) ("\\[Mathematica.*\\]" . font-lock-warning-face) ("^Interrupt>" . font-lock-warning-face) ("-Graphics-" . font-lock-type-face) ("-DensityGraphics-" . font-lock-type-face) ("-ContourGraphics-" . font-lock-type-face) ("-SurfaceGraphics-" . font-lock-type-face) ("-Graphics3D-" . font-lock-type-face) ("-GraphicsArray-" . font-lock-type-face) ("-Sound-" . font-lock-type-face) ("-CompiledCode-" . font-lock-type-face)))
(defvar wolfram-outline-regexp "\\((\\*\\|.+?:=\\)")
(defvar wolfram-smie-grammar '((:smie-closer-alist (#6="{" . #3="}") (#5="(" . #2=")") (#4="<|" . #1="|>")) (#1# 1 (160)) (#2# 2 (161)) (#3# 3 (162)) ("]]" 4 (163)) ("]" 5 (164)) ("," 16 27) ("//" 72 72) ("/;" 72 72) (":" 72 72) ("^" 138 138) ("/" 127 127) ("*" 127 127) ("-" 116 116) ("+" 116 116) ("&&" 105 105) ("||" 105 105) ("==" 94 94) ("@@" 94 94) ("~" 83 83) ("/=" 61 61) ("*=" 61 61) ("-=" 61 61) ("+=" 61 61) ("/:" 165 0) ("=" 61 61) (":=" 61 61) ("&" 49 (166)) (";" 38 38) ("::" 50 167) (#4# (168) 1) (#5# (169) 2) (#6# (170) 3) ("[[" 149 4) ("[" 171 5)))
#@81 Wolfram Language SMIE indentation function for KIND and TOKEN.
(fn KIND TOKEN)
(defalias 'wolfram-smie-rules #[514 "B\211:\205\261 \211@\211\301=\203; A\211\302\232\203# \212\303 \210\304i)B\2026 \211\305\232\204/ \211\306\232\2035 \307!\2026 \310\262\202\257 \211\311=\203\210 A\211\312\232\203O \304B\202\203 \211\313\235\203Y \314\202\203 \211\315\235\203p \212\316 \210\317\310w\210\304i\\)B\202\203 \211\305\232\204| \211\306\232\203\202 \307!\202\203 \310\262\202\257 A\211\305\232\203\226 \307!\202\255 \211\306\232\203\242 \307!\202\255 \320=\203\254 \321\202\255 \310\262\262\207" [wolfram-indent :before "[" smie-default-backward-token column ";" "," smie-rule-separator nil :after ":=" ("|>" ")" "}" "]") (column . 0) ("<|" "(" "{" "[") beginning-of-line " " :elem 0] 8 (#$ . 5278)])
(byte-code "\300\301\302\"\210\300\303\304\"\207" [defalias wolfram-smie-forward-token smie-default-forward-token wolfram-smie-backward-token smie-default-backward-token] 3)
#@168 Hook run after entering Mathematica mode.
No problems result if this variable is not bound.
`add-hook' automatically binds it. (This is true for all hook variables.)
(defvar wolfram-mode-hook nil (#$ . 6272))
(byte-code "\300\301!\204\f \302\301\303\304#\210\300\207" [boundp wolfram-mode-map put definition-name wolfram-mode] 4)
(defvar wolfram-mode-map (make-sparse-keymap))
(byte-code "\300\301N\204 \302\300\301\303\304!#\210\302\305\306\307#\207" [wolfram-mode-map variable-documentation put purecopy "Keymap for `wolfram-mode'." wolfram-mode derived-mode-parent prog-mode] 5)
#@162 Major mode for editing Mathematica text files in Emacs.
\{wolfram-mode-map}
Entry to this mode calls the value of `wolfram-mode-hook'
if that value is non-nil.
(defalias 'wolfram-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204'