]> gitweb.factorcode.org Git - factor.git/commitdiff
Making indentation default 4 spaces, instead of 2
authorJames Cash <james.nvc@gmail.com>
Tue, 27 May 2008 01:22:39 +0000 (21:22 -0400)
committerJames Cash <james.nvc@gmail.com>
Tue, 27 May 2008 01:22:39 +0000 (21:22 -0400)
misc/factor.el

index 9d90fb68f92ec46f19f15541f5cdd66fed343261..300c95c430ae2cc289dbc718d0c33bfa0de9926d 100644 (file)
     "SYMBOLS:"
 ))
 
+(defun factor-indent-line ()
+  "Indent current line as Factor code"
+  (indent-line-to (+ (current-indentation) 4)))
+
 (defun factor-mode ()
   "A mode for editing programs written in the Factor programming language."
   (interactive)
   (setq font-lock-defaults
        '(factor-font-lock-keywords nil nil nil nil))
   (set-syntax-table factor-mode-syntax-table)
+  (make-local-variable 'indent-line-function)
+  (setq indent-line-function 'factor-indent-line)
   (run-hooks 'factor-mode-hook))
 
 (add-to-list 'auto-mode-alist '("\\.factor\\'" . factor-mode))