diff --git a/krl-mode.el b/krl-mode.el index 6d2b19c..7f3b344 100644 --- a/krl-mode.el +++ b/krl-mode.el @@ -4,6 +4,8 @@ (define-key map "\C-j" 'newline-and-indent) map) "Keymap for KRL major mode") +(defvar krl-indent-offset 2 + "Indentation step for nested KRL blocks.") (add-to-list 'auto-mode-alist '("\\.src\\'" . krl-mode)) (add-to-list 'auto-mode-alist '("\\.dat\\'" . krl-mode)) @@ -267,13 +269,13 @@ (setq ind 0)) ((looking-at krl-indent-regex-toplevel-block-open) ;(message "found tlb open") - (setq ind (+ 2 (current-indentation)))) + (setq ind (+ krl-indent-offset (current-indentation)))) ((looking-at krl-indent-regex-nested-block-close) ;(message "found nb close") (setq ind (current-indentation))) ((looking-at krl-indent-regex-nested-block-open) ;(message "found nb open") - (setq ind (+ 2 (current-indentation)))) + (setq ind (+ krl-indent-offset (current-indentation)))) (t ;(message "found other") )