[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ruby-mode not started automatically
From: |
Peter Dyballa |
Subject: |
Re: ruby-mode not started automatically |
Date: |
Thu, 20 Jan 2005 11:23:33 +0100 |
Am 20.01.2005 um 04:41 schrieb Sergei Gnezdov:
;; make ruby-mode available to emacs
(require 'ruby-mode)
require loads Emacs Lisp code when this statement is executed, at
startup for example. The autoload example loads the same when it's
needed (for ruby-mode). Using autoload keeps startup time short and
memory usage small.
;; autodetect mode by extension
(setq auto-mode-alist
(append
'(
("\\.rb\\'" . ruby-mode)
;; append any other modes here
)
auto-mode-alist))
Using the following construct allows you to edit auto-mode-alist in one
place instead of having a dozen snippets scattered around:
(setq auto-mode-alist
(append
'(("\\.xsl$" . sgml-mode)
("\\.plist$" . sgml-mode)
("\\.idd$" . sgml-mode)
("\\.ide$" . sgml-mode)
("\\.rb$" . ruby-mode)
("\\.xml$" . xml-mode)
("\\.xsl$" . xml-mode)
("\\.fo$" . xml-mode)
("\\.f90$" . f90-mode)
("\\.tgz$" . tar-mode)
("\\.tar\\.bz2$" . tar-mode)
("\\.tar\\.gz$" . tar-mode))
auto-mode-alist))
--
Greetings
Pete
Remember: use logout to logout.