Files
.emacs.d/modules/languages/siren-coffee.el
Jim Myhrberg fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00

34 lines
792 B
EmacsLisp

;;; siren-coffee.el --- jimeh's Emacs Siren: coffee-mode configuration. -*- lexical-binding: nil; -*-
;;; Commentary:
;; Basic configuration for coffee-mode.
;;; Code:
(use-package coffee-mode
:mode "\\.coffee\\'"
:interpreter "coffee"
:hook
(coffee-mode . siren-coffee-mode-setup)
:custom
(coffee-tab-width 2)
:preface
(defun siren-coffee-mode-setup ()
;; remove the "Generated by CoffeeScript" header
(add-to-list 'coffee-args-compile "--no-header")
;; Update the already compiled js on save
(and (buffer-file-name)
(file-exists-p (buffer-file-name))
(file-exists-p (coffee-compiled-file-name (buffer-file-name)))
(coffee-cos-mode t))
(setq-local tab-width 2)))
(provide 'siren-coffee)
;;; siren-coffee.el ends here