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

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

Re: ruby-mode not started automatically


From: Sergei Gnezdov
Subject: Re: ruby-mode not started automatically
Date: Thu, 20 Jan 2005 03:41:00 +0000 (UTC)
User-agent: slrn/0.9.8.1 (FreeBSD)

On 2003-06-18, Lute Kamstra <Lute.Kamstra@cwi.nl> wrote:
> David Wende <dwende@lynxpn.com> writes:
>
>> Using emacs 21.2.1 under Win2K.
>>
>> Problem:
>> When I visit a ruby file (*.rb) the
>> ruby mode is NOT entered automatically.
[snip]
> Does this work?
>
> (add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode))
> (autoload 'ruby-mode "ruby-mode" "Ruby mode" t)

The two lines above work great.  What's the difference when compared
with the following solution:

;; make ruby-mode available to emacs
(require 'ruby-mode)
;; autodetect mode by extension
(setq auto-mode-alist
      (append
       '(
         ("\\.rb\\'" . ruby-mode)
         ;; append any other modes here
         )
       auto-mode-alist))

The auto-mode-alist configuration is significantly longer in this
case.




reply via email to

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