help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flyspell loading first time buries buffer and inhibits mode hooks (Win3


From: petermonsson
Subject: Flyspell loading first time buries buffer and inhibits mode hooks (Win32)
Date: Mon, 19 May 2008 12:25:53 -0700 (PDT)
User-agent: G2/1.0

Hi All,

I'm having a problem with flyspell on my Emacs 22.1.1 on Win32. When I
find the first file flyspell will load and bury the file I'm opening
in the buffer list. modes will not start such as ruby-mode or cc-mode.
This only happens on the first file when flyspell thinks it should
load which is also when I start Emacs with a file to open from
Explorer.

It literally pisses me off to the point where I'm thinking of ditching
flyspell. Do you know any solution to my problem?

I have extracted the relevant parts of my .emacs file (and removed the
ranting)

;; Spelling
(setq ispell-program-name "aspell")

(add-hook 'text-mode-hook (lambda () (flyspell-mode 1)))
(global-set-key "\C-csd" (lambda() (interactive) (ispell-change-
dictionary "dansk" nil)))
(global-set-key "\C-cse" (lambda() (interactive) (ispell-change-
dictionary "english" nil)))

(if (fboundp 'longlines-mode)
    (add-hook 'text-mode-hook '(lambda () (longlines-mode))) ;;better
than auto-fill
  (add-hook 'text-mode-hook
            '(lambda nil
               (setq fill-column 79)
               (auto-fill-mode 1))))

;; Ruby
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby
scripts." t)
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) ;; For irb
;; irb in Emacs
(autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
(autoload 'inf-ruby-keys "inf-ruby"
  "Set local key defs for inf-ruby in ruby-mode")

(add-hook 'ruby-mode-hook
          '(lambda ()
             (font-lock-mode t)
             (inf-ruby-keys)))

Thank you for your help in advance.
Peter Monsson


reply via email to

[Prev in Thread] Current Thread [Next in Thread]