;;; shen-mode.el --- A major mode for editing shen source code
-;; Copyright (C) 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2013 Free Software Foundation, Inc.
;; Author: Eric Schulte <schulte.eric@gmail.com>
;; Version: 0.1
;;; Commentary:
-;; A minor mode for editing shen source code.
+;; A minor mode for editing shen source code. Shen is a modern lisp
+;; dialect with support for functional and declarative programming,
+;; pattern matching and a very powerful type system. See the
+;; following for more information on Shen. http://www.shenlanguage.org
;;; Code:
(require 'lisp-mode)
-(require 'cc-mode)
(require 'imenu)
(defcustom shen-mode-hook '(turn-on-eldoc-mode)
(defvar shen-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map lisp-mode-shared-map)
- (substitute-key-definition 'indent-new-comment-line
- 'c-indent-new-comment-line
- map global-map)
- (substitute-key-definition 'fill-paragraph 'c-fill-paragraph
- map global-map)
map)
"Currently just inherits from `lisp-mode-shared-map'.")
+(eval-and-compile
(defconst shen-functions
'((* "number --> number --> number" "Number multiplication.")
(+ "number --> number --> number" "Number addition.")
(warn "string --> string" "Prints the string as a warning and returns \"done\". See strong-warning")
(write-to-file "string --> A --> string" "Writes the second input into a file named in the first input. If the file does not exist, it is created, else it is overwritten. If the second input is a string then it is written to the file without the enclosing quotes. The first input is returned.")
(y-or-n\? "string --> boolean" "Prints the string as a question and returns true for y and false for n."))
- "Shen functions taken largely from the Qi documentation by Dr. Mark Tarver.")
+ "Shen functions taken largely from the Qi documentation by Dr. Mark Tarver."))
\f
;;; Fontification
(comment-column . 32)
(parse-sexp-ignore-comments . t)
(comment-use-global-state . nil)
+ (comment-multi-line . t)
(eldoc-documentation-function . shen-mode-eldoc)
(imenu-case-fold-search . t)
(imenu-generic-expression . ,shen-imenu-generic-expression)