brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 110 forks source link

How to add Pyret language support to Emacs #1753

Closed garare992 closed 1 month ago

garare992 commented 1 month ago

Emacs novice here. How do I use the add Pyret support to Emacs?

I wish you guys would include some comments in the files to guide us through the process.

blerner commented 1 month ago

Hi! The Pyret emacs mode isn't really one of the intended ways to program in Pyret: the best way, by far, is to use code.pyret.org, and the majority of our development effort goes in to that. (There are bugs in the emacs mode that we have no active plans for fixing, and adding new features to the language does not imply we'll backport those features to the emacs mode, either...) Emacs is somewhat of a power-user tool, and the Pyret emacs mode is installed in it exactly the same as all other language modes:

  (add-to-list 'load-path (expand-file-name "the/path/to/wherever/you/saved/pyret.el"))
  (require 'pyret)
  (add-to-list 'auto-mode-alist '("\\.arr$" . pyret-mode))