From 402a2f5ac1f2240b643ca12161bba955ab89ef64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Tue, 6 Aug 2013 13:43:39 +0200 Subject: [PATCH] FUEL: Customization variable that controls whether fuel-mode is loaded automatically. --- misc/fuel/factor-mode.el | 18 +++++++++++++++++- misc/fuel/fuel-mode.el | 1 - 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index 1ef2969268..fd1bb60edd 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -52,6 +52,20 @@ source/docs/tests file. When set to false, you'll be asked only once." :safe 'integerp :group 'factor) +(defcustom factor-mode-use-fuel t + "Whether to use the full FUEL facilities in factor mode. + +Set this variable to nil if you just want to use Emacs as the +external editor of your Factor environment, e.g., by putting +these lines in your .emacs: + + (add-to-list 'load-path \"/path/to/factor/misc/fuel\") + (setq factor-mode-use-fuel nil) + (require 'factor-mode) +" + :type 'boolean + :group 'factor) + ;;; Faces: @@ -939,7 +953,9 @@ With prefix, non-existing files will be created." (setq-local indent-tabs-mode nil) (setq-local beginning-of-defun-function 'factor-beginning-of-defun) - (setq-local end-of-defun-function 'factor-end-of-defun)) + (setq-local end-of-defun-function 'factor-end-of-defun) + ;; Load fuel-mode too if factor-mode-use-fuel is t. + (when factor-mode-use-fuel (require 'fuel-mode) (fuel-mode))) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.factor\\'" . factor-mode)) diff --git a/misc/fuel/fuel-mode.el b/misc/fuel/fuel-mode.el index dd65368908..ea6ff889a7 100644 --- a/misc/fuel/fuel-mode.el +++ b/misc/fuel/fuel-mode.el @@ -230,7 +230,6 @@ interacting with a factor listener is at your disposal. ("Other Factor buffer other frame" "\C-x5s" fuel-switch-to-buffer-other-frame))) -(add-hook 'factor-mode-hook (lambda () (fuel-mode 1))) (provide 'fuel-mode)