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

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

newbie question: How do I make emacs load my own mode?


From: David E
Subject: newbie question: How do I make emacs load my own mode?
Date: Mon, 5 Nov 2007 00:47:41 -0800 (PST)

Hello,

I have a major mode file (optisim.el) with syntax highlighting, extra menu
options and all that, and would like to use it in emacs. 

Last week I just put the .el file into my /emacs/lisp folder, and could then
enter "M-x optisim-mode" to enable this mode. 

However, today I played around with my .emacs configuration file, and for
some reason the above command does not work any more. :confused:

The file optisim.el is still in the /emacs/lisp directory, but when I enter
"M-x optisim-mode", emacs says "[No Match]". 

This is my .emacs file:

=====================

; tabulator
(setq default-tab-width 3)

; match parenthesis
(show-paren-mode t)

;; scrolling

; scroll 1 line
(setq scroll-step 1)
; scroll when 2 lines from top/bottom
(setq scroll-margin 2)

;; Optisim mode

;(setq auto-mode-alist (cons '("\\.optisim$" . optisim-mode)
auto-mode-alist))
;(autoload 'optisim-mode "optisim-mode" "Optisim editing mode." t)



(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(mouse-wheel-scroll-amount (quote (2 ((shift) . 1) ((control)))))
 '(pc-selection-mode t nil (pc-select))
 '(transient-mark-mode nil))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

=====================

I'm really confused, I have no idea why the original command to load my
optisim mode does not work any more. None of the stuff I put into my .emacs
file should affect the loading of mode file, should it? The emacs help was
of no use to me. 

Do I have to add a command to explicitly load my optisim.el mode file? 

I'd be very grateful if some of the more experienced users could help me
here... many thanks in advance!

-David
-- 
View this message in context: 
http://www.nabble.com/newbie-question%3A-How-do-I-make-emacs-load-my-own-mode--tf4750251.html#a13583059
Sent from the Emacs - Help mailing list archive at Nabble.com.





reply via email to

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