Skip to content

Instantly share code, notes, and snippets.

@cryptorick
Created June 1, 2013 23:46
Show Gist options
  • Save cryptorick/5692090 to your computer and use it in GitHub Desktop.
Save cryptorick/5692090 to your computer and use it in GitHub Desktop.
Activate newlisp-mode for Emacs.
;;; Two steps to activate newlisp-mode in Emacs (24).
;;;
;;; 1. First, you should have already obtained and placed newlisp.el
;;; (and other files (aka newlisp-mode files)) into a proper
;;; directory. I'm going to recommend they get placed in the directory
;;; ~/.emacs.d/newlisp-mode. Here's one way to do it.
;;;
;;; $ cd ~/.emacs.d
;;; $ git clone git://github.com/kosh04/newlisp-files.git newlisp-mode
;;;
;;; You should now have the newlisp-mode files in ~/.emacs.d/newlisp-mode.
;;;
;;; 2. Now, add the following lines to your ~/.emacs.d/init.el file.
;; Setup this handy variable to reference ~/.emacs.d.
(setq dotemacsdotd-dir (file-name-as-directory (expand-file-name "~/.emacs.d")))
;; Turn on column number indicator in the mode-line. (Not related at
;; all to newlisp-mode BTW; just nice to have.)
(column-number-mode t)
;; If you hit the TAB key to indent source, you want blanks, not
;; tabs. This is not newlisp-mode specific, but you'll want this
;; because tab insertion, when you hit the TAB key, is the default. :(
(setq-default indent-tabs-mode nil)
;; This turns on syntax coloring (highlighting) for all "buffers whose
;; major mode supports it." (quote from the font-lock-mode func doc.)
(global-font-lock-mode t)
;; newlisp-mode config -- these steps are taken from the header
;; comment in kosh04's newlisp.el.
(add-to-list 'load-path
(file-name-as-directory
(concat dotemacsdotd-dir "newlisp-mode")))
(require 'newlisp)
(add-to-list 'auto-mode-alist '("\\.lsp$" . newlisp-mode))
(add-to-list 'interpreter-mode-alist '("newlisp" . newlisp-mode))
@cryptorick
Copy link
Author

Used this to help a new Emacs user to configure newlisp-mode. See http://newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=4336#p21470.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment