csound-mode icon indicating copy to clipboard operation
csound-mode copied to clipboard

Some requirements for Emacs26

Open sohet opened this issue 5 years ago • 3 comments

I need following init elisp before installing csound-mode (20191108.2359) from melpa to Emacs26 (GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2019-02-04, modified by Debian).

;; for lexical-let* in csound-score.el
(require 'cl)

;; for ->, ->> in csound-mode.el, csound-repl.el, csound-score.el, csound-util.el
(require 'subr-x)
(defalias '-> 'thread-first)
(defalias '->> 'thread-last)

Then repl and editing mode for orchestra and score work fine including eldoc, but font-lock does not seem to work there (no colored text). Enabled minor modes are,

Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption
Blink-Cursor Display-Time Eldoc Electric-Indent File-Name-Shadow
Font-Lock Global-Eldoc Global-Font-Lock Line-Number Mouse-Wheel
Shell-Dirtrack Tooltip Transient-Mark

sohet avatar Nov 11 '19 00:11 sohet

ah yeh. I'm getting these from dash.el. I'm going to add that. Since I'm a clojure developer, I find the thread first and thread second currently from dash. I'm also writing tests now, that should catch these regressions.

hlolli avatar Nov 12 '19 19:11 hlolli

Thank you very much for the fix. The status on my Emacs26 is,

  • need (require 'subr-x) for string-join
  • need (require 'cl) for audio output in repl
  • need something unknown for font-lock to work

sohet avatar Dec 02 '19 12:12 sohet

After an awaiting fix, the status is,

  • no need (require 'subr-x) on GNU Emacs 26.1 of 2019-09-23, modified by Debian (current Buster).
  • no need (require 'cl) anymore.
  • need (with-eval-after-load 'csound-font-lock (setq csound-font-lock-list csound-font-lock-keywords)) in init.el for font-lock to work. or replace each other csound-font-lock-list and csound-font-lock-keywords in csound-font-lock.el (and additional changes are required for emacs28 native compiler).

sohet avatar Mar 03 '20 06:03 sohet

Now latest version (csound-mode-20230825.946 in melpa) resolves all the issues above.

sohet avatar Aug 25 '23 10:08 sohet