|
52 | 52 | ;; (modify-syntax-entry ?- "w" st) |
53 | 53 | (modify-syntax-entry ?. "w" st) |
54 | 54 | (modify-syntax-entry ?! "w" st) |
55 | | - (modify-syntax-entry ?% "-" st) |
| 55 | + (modify-syntax-entry ?% "-" st) |
56 | 56 | (modify-syntax-entry ?\" "\"\"" st) |
57 | 57 | ;; Comment syntax |
58 | 58 | (modify-syntax-entry ?\; "<" st) |
|
83 | 83 | ;;(compile (format "csound -o %s" (buffer-file-name))) |
84 | 84 | ;; (message "var1: %s var2: %s" var1 var2) |
85 | 85 | (let ((filename (if (string= "" filename) |
86 | | - (concat (file-name-base) ".wav") |
87 | | - filename))) |
| 86 | + (concat (file-name-base) ".wav") |
| 87 | + filename))) |
88 | 88 | (if csound-repl-start-server-p |
89 | 89 | (compile (format "csound %s -o %s --format=%s %s" |
90 | | - (buffer-file-name) |
91 | | - filename |
92 | | - (-> (split-string filename "\\.") |
93 | | - rest first) |
94 | | - (case bit |
95 | | - ("32" "-f") |
96 | | - ("24" "-3") |
97 | | - (t "-s")))) |
98 | | - (message "%s" "You did not start a csound server subprocess. |
99 | | - Configure rendering to a file in you CSD file's |
| 90 | + (buffer-file-name) |
| 91 | + filename |
| 92 | + (-> (split-string filename "\\.") |
| 93 | + rest first) |
| 94 | + (case bit |
| 95 | + ("32" "-f") |
| 96 | + ("24" "-3") |
| 97 | + (t "-s")))) |
| 98 | + (message "%s" "You did not start a csound server subprocess. |
| 99 | + Configure rendering to a file in you CSD file's |
100 | 100 | <CsOptions> section." )))) |
101 | 101 |
|
102 | 102 |
|
|
112 | 112 |
|
113 | 113 | (setq csound-mode-map |
114 | 114 | (let ((map (make-sparse-keymap))) |
115 | | - ;; Offline keybindings |
116 | | - (define-key map (kbd "C-c C-p") 'csound-play) |
117 | | - (define-key map (kbd "C-c C-r") 'csound-render) |
118 | | - ;; REPL Keybindings |
119 | | - (define-key map (kbd "C-c C-z") 'csound-repl-start) |
120 | | - (define-key map (kbd "C-M-x") 'csound-repl-evaluate-region) |
121 | | - (define-key map (kbd "C-c C-c") 'csound-repl-evaluate-region) |
122 | | - (define-key map (kbd "C-x C-e") 'csound-repl-evaluate-line) |
123 | | - (define-key map (kbd "C-c C-l") 'csound-repl-interaction-evaluate-last-expression) |
124 | | - ;; Utilities |
125 | | - (define-key map (kbd "C-c C-s") 'csound-score-align-block) |
126 | | - (define-key map (kbd "M-.") 'csound-score-find-instr-def) |
127 | | - ;; (define-key map (kbd "C-c C-f") 'csound-repl-plot-ftgen) |
128 | | - map)) |
| 115 | + ;; Offline keybindings |
| 116 | + (define-key map (kbd "C-c C-p") 'csound-play) |
| 117 | + (define-key map (kbd "C-c C-r") 'csound-render) |
| 118 | + ;; REPL Keybindings |
| 119 | + (define-key map (kbd "C-c C-z") 'csound-repl-start) |
| 120 | + (define-key map (kbd "C-M-x") 'csound-repl-evaluate-region) |
| 121 | + (define-key map (kbd "C-c C-c") 'csound-repl-evaluate-region) |
| 122 | + (define-key map (kbd "C-x C-e") 'csound-repl-evaluate-line) |
| 123 | + (define-key map (kbd "C-c C-l") 'csound-repl-interaction-evaluate-last-expression) |
| 124 | + ;; Utilities |
| 125 | + (define-key map (kbd "C-c C-s") 'csound-score-align-block) |
| 126 | + (define-key map (kbd "M-.") 'csound-score-find-instr-def) |
| 127 | + ;; (define-key map (kbd "C-c C-f") 'csound-repl-plot-ftgen) |
| 128 | + map)) |
129 | 129 |
|
130 | 130 | ;;;###autoload |
131 | 131 | (define-derived-mode csound-mode |
|
136 | 136 | (setq-local comment-start ";; ") |
137 | 137 | ;; (setq-local comment-end "") |
138 | 138 | (setq-local indent-line-function 'csound-indentation-line) |
139 | | - |
| 139 | + |
140 | 140 | (setq-local compilation-scroll-output t) |
141 | 141 | (setq-local ad-redefinition-action 'accept) |
142 | 142 | (setq-local font-lock-comment-end-skip "\n") |
143 | 143 | (add-hook 'completion-at-point-functions #'csound-util-opcode-completion-at-point nil t) |
144 | | - ;; (add-hook 'skeleton-end-hook #'csound-font-lock-flush-buffer nil t) |
| 144 | + ;; (add-hook 'skeleton-end-hook #'csound-font-lock-flush-buffer nil t) |
145 | 145 | (font-lock-add-keywords nil csound-font-lock-list t) |
146 | 146 | (setq-local font-lock-fontify-region-function 'csound-font-lock-fontify-region) |
147 | 147 | (setq-local font-lock-fontify-buffer-function 'csound-font-lock-flush-buffer) |
|
0 commit comments