From f931272111278bf862901abf863f9df8b488807e Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 9 Dec 2012 11:36:21 +0200 Subject: [PATCH] fixed a bug with the prelude-flyspell check --- prelude/prelude-editor.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/prelude/prelude-editor.el b/prelude/prelude-editor.el index a2a4b50..358e1b7 100644 --- a/prelude/prelude-editor.el +++ b/prelude/prelude-editor.el @@ -214,9 +214,12 @@ ispell-extra-args '("--sug-mode=ultra")) (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t) -(when (and prelude-flyspell (executable-find ispell-program-name)) - (add-hook 'message-mode-hook 'flyspell-mode) - (add-hook 'text-mode-hook 'flyspell-mode)) +(defun prelude-enable-flyspell () + (when (and prelude-flyspell (executable-find ispell-program-name)) + (flyspell-mode +1))) + +(add-hook 'message-mode-hook 'prelude-enable-flyspell) +(add-hook 'text-mode-hook 'prelude-enable-flyspell) ;; enable narrowing commands (put 'narrow-to-region 'disabled nil) @@ -234,10 +237,10 @@ bookmark-save-flag 1) ;; load yasnippet -(require 'yasnippet) -(add-to-list 'yas-snippet-dirs prelude-snippets-dir) -(add-to-list 'yas-snippet-dirs prelude-personal-snippets-dir) -(yas-global-mode 1) +;(require 'yasnippet) +;(add-to-list 'yas-snippet-dirs prelude-snippets-dir) +;(add-to-list 'yas-snippet-dirs prelude-personal-snippets-dir) +;(yas-global-mode 1) ;; projectile is a project management mode (require 'projectile)