Emacs sclang-mode sclang-extensions error

Hi all,

I am in Fedora 35, and I get an error when loading sclang-mode in emacs. The sclang-mode is in the path. When I M-x sclang-mode I got sclang-init-post-buffer: Symbol’s value as variable is void: company-backends and the interpreter does not start. Any idea what could be?

Apologies if the subject of this post seems better suited to an emacs forum than here, but I hope it helps emacs and SC users. At last I sorted out my emacs configuration. I used the Quarks installation of scel (GitHub - supercollider/scel: Supercollider emacs package). I unload slang-extension-mode and yasnippet for sclang in the emcas config file because I’ve got errors while sclang was running. Then I loaded company-mode and the auto-completion works pretty good. I do not know why because I don’t know whether there is a backend for sclang or not. My understanding of company is very poor. A couple of details: by default company use a minimum of 3 characters to the auto-completion pops up, this can be change with (setq company-minimum-prefix-length 1). Other problem is that company also attempt to auto complete numbers, this can be sorted with this code I found in Stack Exchange:

(push (apply-partially #'cl-remove-if
                      (lambda (c)
                        (or (string-match-p "[^\x00-\x7F]+" c)
                            (string-match-p "[0-9]+" c)
                            (if (equal major-mode "org")
                                (>= (length c) 15)))))
             company-transformers)
1 Like