From 164eab55742c598299776e37148ffba0b61a4540 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Thu, 7 Aug 2014 08:00:22 -0700 Subject: [PATCH] feat(emacs/lean-settings.el): add customization-settings file --- src/emacs/lean-settings.el | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/emacs/lean-settings.el diff --git a/src/emacs/lean-settings.el b/src/emacs/lean-settings.el new file mode 100644 index 000000000..a51863d3e --- /dev/null +++ b/src/emacs/lean-settings.el @@ -0,0 +1,65 @@ +;; Copyright (c) 2014 Microsoft Corporation. All rights reserved. +;; Released under Apache 2.0 license as described in the file LICENSE. +;; +;; Author: Soonho Kong +;; + +(defgroup lean nil "Lean mode" :prefix 'lean :group 'languages) + +(defvar lean-default-executable-name + (case system-type + ('gnu "lean") + ('gnu/linux "lean") + ('gnu/kfreebsd "lean") + ('darwin "lean") + ('ms-dos "lean") + ('windows-nt "lean.exe") + ('cygwin "lean.exe") ;; TODO(soonhok): check this + ) + "Default executable name of Lean" + ) + +(defcustom lean-rootdir nil + "Full pathname of lean root directory. It should be defined by user." + :group 'lean + :type 'string + ) + +(defcustom lean-executable-name lean-default-executable-name + "Name of lean executable" + :group 'lean + :type 'string + ) + +(defcustom lean-delete-trailing-whitespace nil + "Set this variable to true to automatically delete trailing +whitespace when a buffer is loaded from a file or when it is +written." + :group 'lean + :type 'boolean) + +(and lean-delete-trailing-whitespace + (cond + ; If white-space-cleanup-mode exists, use it + (((fboundp whitespace-cleanup-mode) + (add-hook 'lean-mode-hook 'whitespace-cleanup-mode)) + ; Otherwise + (t (add-hook 'write-file-functions 'whitespace-cleanup))))) + +(defcustom lean-rule-column 100 + "Specify rule-column." + :group 'lean + :type '(choice (integer :tag "Columns") + (const :tag "Unlimited" nil)) + :type 'int) + +(defcustom lean-show-rule-column-method nil + "If enabled, it highlights column" + :group 'lean + :type '(choice (const :tag "Disabled" nil) + (const :tag "Vertical Line" vline) + ;;(const :tag "Whole Lines" lines) + ;;(const :tag "Only Beyond lean-rule-column" lines-tail) + )) + +(provide 'lean-settings)