Skip to content

Commit 5d16d2e

Browse files
committed
add completions and eldoc to repl buffer
1 parent 201258a commit 5d16d2e

File tree

6 files changed

+83
-66
lines changed

6 files changed

+83
-66
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,5 @@ If you're using `csound-mode` directly from the git repo, and you happen to use
6767
<kbd>M-.</kbd> `csound-score-find-instr-def` cursor needs to be within a score block
6868

6969

70-
## Known bugs
71-
* Only one REPL instance can run at each moment
72-
* Unexpected crashing of csound within the repl can sometimes lead to Emacs crashing, if Csound crashes (example when the audio server crashes), save your work and restart Emacs.
73-
74-
7570
[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg
7671
[COPYING]: http://www.gnu.org/copyleft/gpl.html

csound-font-lock.el

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@
330330
(or (save-excursion (beginning-of-buffer)
331331
(search-forward-regexp "<CsScore" end t 1))
332332
0)))
333-
(orchestra-boundry (if (string-match-p ".orc$" (buffer-name (current-buffer)))
333+
(orchestra-boundry (if (or (string-match-p ".orc$" (buffer-name (current-buffer)))
334+
(string-match-p ".udo$" (buffer-name (current-buffer))))
334335
(buffer-size)
335336
(or (save-excursion (beginning-of-buffer)
336337
(search-forward-regexp "</CsInstruments>" end t 1))
@@ -346,7 +347,7 @@
346347
(font-lock-default-fontify-region (line-beginning-position) (line-end-position) nil))
347348
(next-line))))))))
348349

349-
(defun csound-font-lock-param--flush-buffer ()
350+
(defun csound-font-lock--flush-buffer ()
350351
(save-excursion
351352
(end-of-buffer)
352353
(let ((line-count (line-number-at-pos)))
@@ -355,7 +356,7 @@
355356
(save-excursion (font-lock-default-fontify-region (line-beginning-position) (line-end-position) nil))
356357
(next-line)))))
357358

358-
(defun csound-font-lock-param--flush-score ()
359+
(defun csound-font-lock--flush-score ()
359360
(when csound-font-lock-rainbow-score-parameters-p
360361
(save-excursion
361362
(beginning-of-buffer)
@@ -366,18 +367,9 @@
366367
(when (and score-beg score-end)
367368
(csound-font-lock--fontify-score score-beg score-end))))))
368369

369-
(defun csound-font-lock-param--bugfix ()
370-
(save-excursion
371-
(when (search-forward-regexp "</CsoundSynthesizer>" nil t 1)
372-
(beginning-of-line)
373-
(font-lock-default-fontify-region (line-beginning-position) (line-end-position) nil))))
374-
375370
(defun csound-font-lock-flush-buffer ()
376-
(progn (csound-font-lock-param--flush-buffer)
377-
(csound-font-lock-param--flush-score)
378-
;; (csound-font-lock--flush-block-comments)
379-
;; (csound-font-lock-param--bugfix)
380-
))
371+
(progn (csound-font-lock--flush-buffer)
372+
(csound-font-lock--flush-score)))
381373

382374
(provide 'csound-font-lock)
383375

csound-mode.el

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
(require 'font-lock)
3131
(require 'cl)
32-
(require 'csound-opcodes)
3332
(require 'csound-eldoc)
3433
(require 'csound-font-lock)
3534
(require 'csound-repl)
@@ -93,22 +92,6 @@
9392
("24" "-3")
9493
(t "-s"))))))
9594

96-
(defun csound-opcode-completion-at-point ()
97-
(let ((bounds (bounds-of-thing-at-point 'word)))
98-
(when bounds
99-
(list (car bounds)
100-
(cdr bounds)
101-
csdoc-opcode-database
102-
:exclusive 'no
103-
:company-docsig (lambda (cand)
104-
(csound-util-chomp (replace-regexp-in-string
105-
"\n\\|\s+" "\s"
106-
(nth 3 (gethash cand csdoc-opcode-database)))))
107-
:company-doc-buffer (lambda (cand)
108-
(prin1-to-string (nth 11 (gethash cand csdoc-opcode-database))))
109-
;;:company-location (lambda (cand) (nth 11 (gethash cand csdoc-opcode-database)))
110-
))))
111-
11295

11396
(defun csound-repl-start ()
11497
"Start the csound-repl."
@@ -148,7 +131,7 @@
148131
(setq-local compilation-scroll-output t)
149132
(setq-local ad-redefinition-action 'accept)
150133
(setq-local font-lock-comment-end-skip "\n")
151-
(add-hook 'completion-at-point-functions #'csound-opcode-completion-at-point nil t)
134+
(add-hook 'completion-at-point-functions #'csound-util-opcode-completion-at-point nil t)
152135
;; (add-hook 'skeleton-end-hook #'csound-font-lock-flush-buffer nil t)
153136
(font-lock-add-keywords nil csound-font-lock-list)
154137
(setq-local font-lock-fontify-region-function 'csound-font-lock-fontify-region)
@@ -157,7 +140,7 @@
157140
;; (setq-local jit-lock-contextually t)
158141
(shut-up
159142
(with-silent-modifications
160-
(csound-font-lock-flush-buffer))))
143+
(csound-font-lock--flush-score))))
161144

162145

163146
(add-to-list 'auto-mode-alist `(,(concat "\\." (regexp-opt '("csd" "orc" "sco" "udo")) "\\'") . csound-mode))

csound-opcodes.el

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ karray[] vbapg kazim [,kelev] [, kspread] [, ilayout]" :doc "Calculates the gain
6969
(puthash "freeverb" '(:template "aoutL, aoutR freeverb ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]]" :doc "Opcode version of Jezar's Freeverb") csdoc-opcode-database)
7070
(puthash "repluck" '(:template "ares repluck iplk, kamp, icps, kpick, krefl, axcite" :doc "Physical model of the plucked string.") csdoc-opcode-database)
7171
(puthash "pvsout" '(:template "pvsout fsig, kchan" :doc "Write a fsig to the pvs output bus.") csdoc-opcode-database)
72-
(puthash "mp3scal" '(:template "asig, asig2, ktime mp3scal Sfile,ktimescal,kpitch, kamp [,iskip,ifftsize, idecim, ilock]" :doc "Phase-locked vocoder processing with onset detection/processing, 'tempo-scaling'.") csdoc-opcode-database)
72+
(puthash "mp3scal" '(:template "asig, asig2, ktime mp3scal Sfile, ktimescal, kpitch, kamp[, iskip, ifftsize, idecim, ilock]" :doc "Phase-locked vocoder processing with onset detection/processing, 'tempo-scaling'.") csdoc-opcode-database)
7373
(puthash "gogobel" '(:template "ares gogobel kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivfn" :doc "Audio output is a tone related to the striking of a cow bell or similar.") csdoc-opcode-database)
7474
(puthash "fink" '(:template "fink ifilename, iskipframes, iformat, kin1 [, kin2] [, kin3] [,...]" :doc "Read signals from a file at k-rate.") csdoc-opcode-database)
7575
(puthash "clear" '(:template "clear avar1 [, avar2] [, avar3] [...]" :doc "Zeroes a list of audio signals.") csdoc-opcode-database)
@@ -466,7 +466,7 @@ tableshufflei itablenum" :doc "shuffles the content of a function table so that
466466
(puthash "vbap4" '(:template "ar1, ar2, ar3, ar4 vbap4 asig, kazim [, kelev] [, kspread]" :doc "Distributes an audio signal among 4 channels.") csdoc-opcode-database)
467467
(puthash "pset" '(:template "pset icon1 [, icon2] [...]" :doc "Defines and initializes numeric arrays at orchestra load time.") csdoc-opcode-database)
468468
(puthash "vaddv_i" '(:template "vaddv_i ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]" :doc "Performs addition between two vectorial control signals at init time.") csdoc-opcode-database)
469-
(puthash "setscorepos" '(:template "setscorepos ipos" :doc "Sets the playback position of the current score performance to a given position.") csdoc-opcode-database)
469+
(puthash "setscorepos" '(:template "setscoreposipos" :doc "Sets the playback position of the current score performance to a given position.") csdoc-opcode-database)
470470
(puthash "ptable3" '(:template "ares ptable3 andx, ifn [, ixmode] [, ixoff] [, iwrap]
471471
ires ptable3 indx, ifn [, ixmode] [, ixoff] [, iwrap]
472472
kres ptable3 kndx, ifn [, ixmode] [, ixoff] [, iwrap]" :doc "Accesses table values by direct indexing with cubic interpolation.") csdoc-opcode-database)
@@ -972,6 +972,7 @@ kres cauchy kalpha" :doc "WTF: ") csdoc-opcode-database)
972972
(puthash "dripwater" '(:template "ares dripwater kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] [, ifreq1] [, ifreq2]" :doc "Semi-physical model of a water drop.") csdoc-opcode-database)
973973
(puthash "vtablewi" '(:template "vtablewi indx, ifn, ixmode, inarg1 [, inarg2, inarg3 , .... , inargN ]" :doc "Write vectors (to tables -or arrays of vectors).") csdoc-opcode-database)
974974
(puthash "zkr" '(:template "kres zkr kndx" :doc "Reads from a location in zk space at k-rate.") csdoc-opcode-database)
975+
(puthash "midiout_i" '(:template "midiout_i istatus, ichan, idata1, idata2" :doc "Sends a generic MIDI message to the MIDI OUT port.") csdoc-opcode-database)
975976
(puthash "pdhalfy" '(:template "aout pdhalfy ain, kShapeAmount [, ibipolar [, ifullscale]]" :doc "Distorts a phasor for reading two unequal portions of a table in equal periods.") csdoc-opcode-database)
976977
(puthash "vmult" '(:template "vmult ifn, kval, kelements [, kdstoffset] [, kverbose]" :doc "Multiplies a vector in a table by a scalar value.") csdoc-opcode-database)
977978
(puthash "outipc" '(:template "outipc ichn, iprog, imin, imax" :doc "Sends MIDI program change messages at i-rate") csdoc-opcode-database)
@@ -1065,6 +1066,7 @@ kans getseed" :doc "Reads the global seed value.") csdoc-opcode-database)
10651066
(puthash "zacl" '(:template "zacl kfirst, klast" :doc "Clears one or more variables in the za space.") csdoc-opcode-database)
10661067
(puthash "strcat" '(:template "Sdst strcat Ssrc1, Ssrc2" :doc "Concatenate strings") csdoc-opcode-database)
10671068
(puthash "tabplay" '(:template "tabplay ktrig, knumtics, kfn, kout1 [,kout2,..., koutN]" :doc "Playing-back control signals.") csdoc-opcode-database)
1069+
(puthash "squinewave" '(:template "aout [, asyncout] squinewave acps, aClip, aSkew [, asyncin] [, iMinSweep] [, iphase]" :doc "A mostly bandlimited shape-shifting square-pulse-saw-sinewave oscillator with hardsync.") csdoc-opcode-database)
10681070
(puthash "printk2" '(:template "printk2 kvar [, inumspaces]" :doc "Prints a new value every time a control variable changes.") csdoc-opcode-database)
10691071
(puthash "filter2" '(:template "ares filter2 asig, iM, iN, ib0, ib1, ..., ibM, ia1, ia2, ..., iaN
10701072
kres filter2 ksig, iM, iN, ib0, ib1, ..., ibM, ia1, ia2, ..., iaN" :doc "Performs filtering using a transposed form-II digital filter lattice with no time-varying control.") csdoc-opcode-database)
@@ -1081,7 +1083,7 @@ karray[] vbapgmove idur, ispread, ifldnum, ifld1 [, ifld2] [...]" :doc "Calculat
10811083
(puthash "passign" '(:template "ivar1, ... passign [istart]" :doc "Assigns a range of p-fields to ivariables.") csdoc-opcode-database)
10821084
(puthash "writescratch" '(:template "writescratchival[, index]" :doc "writes a value into the scratchpad of the instance of an instrument.") csdoc-opcode-database)
10831085
(puthash "readk" '(:template "kres readk ifilname, iformat, iprd" :doc "Periodically reads an orchestra control-signal value from an external file.") csdoc-opcode-database)
1084-
(puthash "OSCsend" '(:template "OSCsend kwhen, ihost, iport, idestination, itype [, xdata1, xdata2, ...]" :doc "Sends data to other processes using the OSC protocol") csdoc-opcode-database)
1086+
(puthash "OSCsend" '(:template "OSCsend kwhen, ihost, iport, idestination[, itype , xdata1, xdata2, ...]" :doc "Sends data to other processes using the OSC protocol") csdoc-opcode-database)
10851087
(puthash "pinkish" '(:template "ares pinkish xin [, imethod] [, inumbands] [, iseed] [, iskip]" :doc "Generates approximate pink noise.") csdoc-opcode-database)
10861088
(puthash "linenr" '(:template "ares linenr xamp, irise, idec, iatdec
10871089
kres linenr kamp, irise, idec, iatdec" :doc "The") csdoc-opcode-database)
@@ -1182,7 +1184,8 @@ kres tablekt kndx, kfn [, ixmode] [, ixoff] [, iwrap]" :doc "Provides k-rate con
11821184
(puthash "chnset" '(:template "chnset ival, Sname
11831185
chnset kval, Sname
11841186
chnset aval, Sname
1185-
chnset Sval, Sname" :doc "Writes data to the named software bus.") csdoc-opcode-database)
1187+
chnset Sval, Sname
1188+
chnsetks Sval, Sname" :doc "Writes data to the named software bus.") csdoc-opcode-database)
11861189
(puthash "midinoteoncps" '(:template "midinoteoncps xcps, xvelocity" :doc "Gets a MIDI note number as a cycles-per-second frequency.") csdoc-opcode-database)
11871190
(puthash "fmb3" '(:template "ares fmb3 kamp, kfreq, kc1, kc2, kvdepth, kvrate[, ifn1, ifn2, ifn3, ifn4, ivfn]" :doc "Uses FM synthesis to create a Hammond B3 organ sound.") csdoc-opcode-database)
11881191
(puthash "phaser2" '(:template "ares phaser2 asig, kfreq, kq, kord, kmode, ksep, kfeedback" :doc "Second-order allpass filters arranged in a series.") csdoc-opcode-database)
@@ -1418,7 +1421,8 @@ kres polyaft inote [, ilow] [, ihigh]" :doc "Returns the polyphonic after-touch
14181421
(puthash "chnget" '(:template "ival chnget Sname
14191422
kval chnget Sname
14201423
aval chnget Sname
1421-
Sval chnget Sname" :doc "Reads data from the software bus.") csdoc-opcode-database)
1424+
Sval chnget Sname
1425+
Sval chngetks Sname" :doc "Reads data from the software bus.") csdoc-opcode-database)
14221426
(puthash "partikkelsync" '(:template "async [,aphase] partikkelsync iopcode_id" :doc "Outputs") csdoc-opcode-database)
14231427
(puthash "mpulse" '(:template "ares mpulse kamp, kintvl [, ioffset]" :doc "Generates a set of impulses.") csdoc-opcode-database)
14241428
(puthash "envlpx" '(:template "ares envlpx xamp, irise, idur, idec, ifn, iatss, iatdec [, ixmod]
@@ -1566,7 +1570,7 @@ iout duserrnd itableNum
15661570
kout duserrnd ktableNum" :doc "Discrete USER-defined-distribution RaNDom generator.") csdoc-opcode-database)
15671571
(puthash "wgbow" '(:template "ares wgbow kamp, kfreq, kpres, krat, kvibf, kvamp [, ifn] [, iminfreq]" :doc "Creates a tone similar to a bowed string.") csdoc-opcode-database)
15681572
(puthash "vdelayxw" '(:template "aout vdelayxw ain, adl, imd, iws [, ist]" :doc "Variable delay opcodes with high quality interpolation.") csdoc-opcode-database)
1569-
(puthash "slicearray" '(:template "karray slicearray kinarray, istart, iend" :doc "Take a slice of a vector.") csdoc-opcode-database)
1573+
(puthash "slicearray" '(:template "karray slicearray kinarray, istart, iend [,istride]" :doc "Take a slice of a vector.") csdoc-opcode-database)
15701574
(puthash "ptrack" '(:template "kcps, kamp ptrack asig, ihopsize[,ipeaks]" :doc "Tracks the pitch of a signal.") csdoc-opcode-database)
15711575
(puthash "dssiactivate" '(:template "dssiactivate ihandle, ktoggle" :doc "Activates or deactivates a DSSI or LADSPA plugin.") csdoc-opcode-database)
15721576
(puthash "vdelayxq" '(:template "aout1, aout2, aout3, aout4 vdelayxq ain1, ain2, ain3, ain4, adl, imd, iws [, ist]" :doc "A 4-channel variable delay opcode with high quality interpolation.") csdoc-opcode-database)
@@ -1801,4 +1805,4 @@ kres xadsr iatt, idec, islev, irel [, idel]" :doc "Calculates the classical ADSR
18011805
(puthash "printks2" '(:template "printks2 "string", kval" :doc "Prints a new value every time a control variable changes using a printf() style syntax.") csdoc-opcode-database)
18021806

18031807
(provide 'csound-opcodes)
1804-
;;; csound-opcodes.el ends here
1808+
;;; csound-opcodes.el ends here

csound-repl.el

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
csound-repl-buffer-name)
150150
(split-window-sensibly)
151151
(switch-to-buffer-other-window csound-repl-buffer-name)
152-
(with-current-buffer (buffer-name) (funcall 'csound-interactive-mode))
152+
(with-current-buffer (buffer-name) (funcall 'csound-repl-mode))
153153
(switch-to-buffer-other-window prev-buffer)))))
154154

155155
(defun csound-repl-last-visited-csd ()
@@ -177,16 +177,17 @@
177177

178178

179179
(defconst csound-repl-prompt
180-
(let ((prompt "csnd> "))
181-
(put-text-property 0 (1- (length prompt)) 'read-only t prompt)
180+
(let ((prompt "csnd> "))
181+
(put-text-property 0 (length prompt) 'read-only t prompt)
182182
prompt))
183183

184+
184185
(defvar csound-repl--input nil)
185186

186187
(defvar csound-repl--input-history (make-hash-table :test 'equal))
187188

188189
(defun csound-repl--input-sender (proc input)
189-
(unless (eq 0 (length input))
190+
(unless (eq 0 (length (csound-util-chomp input)))
190191
(let ((id (csound-util--generate-random-uuid))
191192
(buffer-read-only nil)
192193
(lb (- (line-beginning-position) 5))
@@ -209,11 +210,11 @@
209210
"| ) )| )| )| | )| ) | )| )| )| \n"
210211
"|__/ __/ |__/ |__/ | |/ |__/ | / |__/ |__/ |__ \n"))
211212
(s (format (concat "\n"
212-
";; file: " cur-file "\n"
213-
";; sr: %s\n"
214-
";; ksmps: %s\n"
215-
";; nchnls: %s\n"
216-
";; 0dbfs: %s\n\n\n")
213+
"file: " cur-file "\n"
214+
"sr: %s\n"
215+
"ksmps: %s\n"
216+
"nchnls: %s\n"
217+
"0dbfs: %s\n\n\n")
217218
sr
218219
ksmps
219220
nchnls
@@ -261,13 +262,26 @@
261262

262263
(setq csound-repl--filter-multline-hackfix nil)
263264

265+
(setq csound-repl--filter-multline-hackfix-rtevent nil)
266+
264267
(defun csound-repl--filter (_ msg)
265268
(save-current-buffer
266269
(set-buffer csound-repl-buffer-name)
267270
(goto-char (buffer-size))
268271
(let ((msg (->> msg
269272
(replace-regexp-in-string "\0\\|\n" "")
270-
(replace-regexp-in-string ">>>" " >>> "))))
273+
(replace-regexp-in-string ">>>" " >>> ")
274+
(replace-regexp-in-string "\\s-+rtevent:\\s-+" "rtevent: ")))
275+
(hackfix-p csound-repl--filter-multline-hackfix))
276+
(when (string-match-p "rtevent:" msg)
277+
(setq csound-repl--filter-multline-hackfix-rtevent 0
278+
csound-repl--filter-multline-hackfix t))
279+
(when (numberp csound-repl--filter-multline-hackfix-rtevent)
280+
(if (eq 2 csound-repl--filter-multline-hackfix-rtevent)
281+
(setq csound-repl--filter-multline-hackfix-rtevent nil
282+
csound-repl--filter-multline-hackfix nil)
283+
(setq csound-repl--filter-multline-hackfix-rtevent
284+
(1+ csound-repl--filter-multline-hackfix-rtevent))))
271285
(when (string-match-p ">>>" msg)
272286
(setq csound-repl--filter-multline-hackfix t))
273287
(when (string-match-p "<<<" msg)
@@ -277,13 +291,13 @@
277291
(progn
278292
(beginning-of-line)
279293
(end-of-line 0)
280-
(if csound-repl--filter-multline-hackfix
294+
(if hackfix-p
281295
(insert msg)
282-
(insert (concat msg "\n"))))
296+
(insert (concat "\n" msg))))
283297
(progn
284298
(goto-char (buffer-size))
285299
(end-of-line 1)
286-
(if csound-repl--filter-multline-hackfix
300+
(if hackfix-p
287301
(insert msg)
288302
(insert (concat msg "\n")))))
289303
(when (or (string-match-p "rtjack\\: error" msg)
@@ -391,7 +405,7 @@
391405
"Evaluate csound expression on current line."
392406
(interactive)
393407
(if (not (csound-repl-buffer-running-p))
394-
(message "csound-repl instance was not found")
408+
(message "csound-repl is not started")
395409
(if (save-excursion
396410
(search-backward-regexp "<CsScore" nil t 1))
397411
(csound-repl-evaluate-score-region
@@ -436,11 +450,11 @@
436450
;; (csound-repl-interaction--plot (string-to-number table-num))))))
437451

438452
(defvar csound-repl--font-lock-list
439-
'((";+.*" . font-lock-comment-face)
453+
'((";.*" . font-lock-comment-face)
440454
("SECTION [0-9]+:" . font-lock-string-face)
441455
("new alloc.*" . font-lock-comment-face)
442-
("error:" . font-lock-warning-face)
443-
("\\<T[^_]\\|\\<TT\\|M:" . csound-font-lock-i-rate)
456+
("error:\\|instrerror:" . font-lock-warning-face)
457+
;; ("\\<T[^_]\\|\\<TT\\|M:" . csound-font-lock-i-rate)
444458
(">>>.*<<<" . csound-font-lock-s-variables)
445459
("\\<\\w*[^0-9]:\\B" . csound-font-lock-a-rate)))
446460

@@ -482,8 +496,16 @@
482496
(format "--nchnls=%s" nchnls)
483497
(format "--0dbfs=%s" zero-db-fs)))
484498

499+
(setq csound-repl-map
500+
(let ((map comint-mode-map))
501+
(define-key map (kbd "<S-return>")
502+
(lambda ()
503+
(interactive)
504+
(insert "\n ")))
505+
map))
506+
485507
(define-derived-mode
486-
csound-interactive-mode comint-mode "CsoundInteractive"
508+
csound-repl-mode comint-mode "CsoundRepl"
487509
"Csound Interactive Message Buffer and REPL."
488510
:syntax-table csound-mode-syntax-table
489511
(setq-local comint-input-sender 'csound-repl--input-sender)
@@ -508,14 +530,18 @@
508530
ksmps
509531
nchnls
510532
0dbfs))
511-
533+
(add-hook 'completion-at-point-functions #'csound-opcode-completion-at-point nil t)
512534
(set-process-filter csound-repl--csound-server (lambda (_ stdin) nil))
513535
(setq csound-repl--udp-client-proc (csound-repl--start-client port))
514536
(setq csound-repl--console-client-proc (csound-repl--console-client console-port))
515537
(set-process-query-on-exit-flag csound-repl--csound-server nil)
516538
(set-process-query-on-exit-flag csound-repl--udp-client-proc nil)
517539
(set-process-query-on-exit-flag csound-repl--console-client-proc nil)
518-
(setq-local font-lock-defaults '(csound-repl--font-lock-list))
540+
(setq-local font-lock-defaults '(csound-font-lock-list
541+
csound-repl--font-lock-list))
542+
(setq-local comment-start ";; ")
543+
(setq-local eldoc-documentation-function 'csound-eldoc-function)
544+
(add-hook 'completion-at-point-functions #'csound-util-opcode-completion-at-point nil t)
519545
;; (setq-local comint-prompt-read-only t)
520546
(setq-local comint-scroll-to-bottom-on-input t)
521547
(setq-local comint-scroll-to-bottom-on-output t)
@@ -525,5 +551,4 @@
525551

526552
(provide 'csound-repl)
527553

528-
529554
;;; csound-repl.el ends here

0 commit comments

Comments
 (0)