Skip to content

Commit

Permalink
Make buffer read-only when visiting a compiled coffee file.
Browse files Browse the repository at this point in the history
  • Loading branch information
oggy committed Oct 13, 2013
1 parent 75088ef commit f8dd525
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions init/g-major-modes.el
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ the form accepted by `kbd'. DEF is of the form accepted by
(call-process "coffee" nil nil nil "-c" (buffer-file-name))
(setq js-path (replace-match ".js" t t coffee-path))
(switch-to-buffer (find-file-noselect js-path t))
(setq buffer-read-only t)
(find-file js-path))
(error "Cannot deduce javascript name because this file does not end in '.coffee'"))))

Expand Down

0 comments on commit f8dd525

Please sign in to comment.