Skip to content

Commit f4bc923

Browse files
committed
fix indentation, default ksmps and remove undefined hook
1 parent 4bbf2c3 commit f4bc923

File tree

2 files changed

+235
-235
lines changed

2 files changed

+235
-235
lines changed

csound-mode.el

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
;; (modify-syntax-entry ?- "w" st)
5353
(modify-syntax-entry ?. "w" st)
5454
(modify-syntax-entry ?! "w" st)
55-
(modify-syntax-entry ?% "-" st)
55+
(modify-syntax-entry ?% "-" st)
5656
(modify-syntax-entry ?\" "\"\"" st)
5757
;; Comment syntax
5858
(modify-syntax-entry ?\; "<" st)
@@ -83,20 +83,20 @@
8383
;;(compile (format "csound -o %s" (buffer-file-name)))
8484
;; (message "var1: %s var2: %s" var1 var2)
8585
(let ((filename (if (string= "" filename)
86-
(concat (file-name-base) ".wav")
87-
filename)))
86+
(concat (file-name-base) ".wav")
87+
filename)))
8888
(if csound-repl-start-server-p
8989
(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
100100
<CsOptions> section." ))))
101101

102102

@@ -112,20 +112,20 @@
112112

113113
(setq csound-mode-map
114114
(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))
129129

130130
;;;###autoload
131131
(define-derived-mode csound-mode
@@ -136,12 +136,12 @@
136136
(setq-local comment-start ";; ")
137137
;; (setq-local comment-end "")
138138
(setq-local indent-line-function 'csound-indentation-line)
139-
139+
140140
(setq-local compilation-scroll-output t)
141141
(setq-local ad-redefinition-action 'accept)
142142
(setq-local font-lock-comment-end-skip "\n")
143143
(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)
145145
(font-lock-add-keywords nil csound-font-lock-list t)
146146
(setq-local font-lock-fontify-region-function 'csound-font-lock-fontify-region)
147147
(setq-local font-lock-fontify-buffer-function 'csound-font-lock-flush-buffer)

0 commit comments

Comments
 (0)