r2434 - trunk/varnish-tools/emacs

ssm at projects.linpro.no ssm at projects.linpro.no
Wed Feb 6 08:26:28 CET 2008


Author: ssm
Date: 2008-02-06 08:26:28 +0100 (Wed, 06 Feb 2008)
New Revision: 2434

Modified:
   trunk/varnish-tools/emacs/vcl-mode.el
Log:
Add more settings to vcl-mode.el, and make them customizable


Modified: trunk/varnish-tools/emacs/vcl-mode.el
===================================================================
--- trunk/varnish-tools/emacs/vcl-mode.el	2008-02-06 06:36:58 UTC (rev 2433)
+++ trunk/varnish-tools/emacs/vcl-mode.el	2008-02-06 07:26:28 UTC (rev 2434)
@@ -31,9 +31,17 @@
 ;;; $Id$
 ;;;
 
-(defconst vcl-indent-level 8
-  "The level of indentation (number of space characters) in VCL-mode.")
+(defgroup vcl nil
+  "Customizations for vcl-mode")
 
+(defcustom vcl-indent-level 8
+  "*The level of indentation (number of space characters) in VCL-mode."
+  :type 'integer  :group 'vcl)
+
+(defcustom vcl-indent-tabs-mode nil
+  "*Allow tabs when indentation in vcl-mode if non-nil"
+  :type 'boolean :group 'vcl)
+
 ;; I just love standards, there are so many to choose from
 (if (string-match "XEmacs\\|Lucid" emacs-version)
     (require 'generic-mode)
@@ -158,6 +166,7 @@
   
   (run-hooks 'vcl-mode-hook)
   (set (make-local-variable 'indent-line-function) 'vcl-indent-line)  
+  (setq indent-tabs-mode vcl-indent-tabs-mode)
   )
 
 (defvar vcl-mode-hook nil)




More information about the varnish-commit mailing list