ls-mode

Emacs mode for editing ParenScript code
git clone https://logand.com/git/ls-mode.git/
Log | Files | Refs

ls-mode.el (745B)


      1 ;;; ls-mode.el -- Emacs mode for editing ParenScript code.
      2 
      3 (defvar ls-mode-hook nil)
      4 
      5 (add-hook 'ls-mode-hook (lambda () (define-key ls-mode-map "\C-ck" 'ls-buffer)))
      6 
      7 (add-to-list 'auto-mode-alist '("\\.ls\\'" . ls-mode))
      8 
      9 (define-derived-mode ls-mode lisp-mode "LS"
     10                      "Major mode for editing LS (parenscript) files."
     11                      (run-hooks 'ls-mode-hook))
     12 
     13 (defun run-ls (ifile &optional ofile)
     14   (shell-command
     15    (format "%s/lisp/clisp/clisp -q -x '(load \"%s\") (js:compile-parenscript-file \"%s\")'"
     16            (expand-file-name "~/")
     17            (expand-file-name "~/emacs/ls-mode")
     18            (expand-file-name ifile))))
     19 
     20 (defun ls-buffer ()
     21   (interactive)
     22   (run-ls (buffer-file-name)))
     23 
     24 (provide 'ls-mode)