all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* newbie question: How do I make emacs load my own mode?
@ 2007-11-05  8:47 David E
  2007-11-05 11:39 ` Sebastian Tennant
  2007-11-05 11:49 ` Peter Dyballa
  0 siblings, 2 replies; 3+ messages in thread
From: David E @ 2007-11-05  8:47 UTC (permalink / raw)
  To: Help-gnu-emacs


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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: newbie question: How do I make emacs load my own mode?
  2007-11-05  8:47 newbie question: How do I make emacs load my own mode? David E
@ 2007-11-05 11:39 ` Sebastian Tennant
  2007-11-05 11:49 ` Peter Dyballa
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Tennant @ 2007-11-05 11:39 UTC (permalink / raw)
  To: help-gnu-emacs

Quoth David E <david.elixmann@gmx.net>:
> The file optisim.el is still in the /emacs/lisp directory, but when I enter
> "M-x optisim-mode", emacs says "[No Match]". 

Ensure #/emacs/lisp is still in your load path:

  M-x describe-variable load-path RET

and if not, add it in your ~/.emacs:

  (add-to-list 'load-path "~/emacs/lisp")

Then add an autoload call in your ~/.emacs:

  (autoload 'optisim-mode "optismim.el" "My optisim mode" t)

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: newbie question: How do I make emacs load my own mode?
  2007-11-05  8:47 newbie question: How do I make emacs load my own mode? David E
  2007-11-05 11:39 ` Sebastian Tennant
@ 2007-11-05 11:49 ` Peter Dyballa
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2007-11-05 11:49 UTC (permalink / raw)
  To: David E; +Cc: Help-gnu-emacs


Am 05.11.2007 um 09:47 schrieb David E:

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

It has beed switched off! Commented.

When your ELisp is in load-path, you can also try to use provide and  
require.

--
Greetings

   Pete

The box said "Use Windows 95 or better," so I got a Macintosh.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-05 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05  8:47 newbie question: How do I make emacs load my own mode? David E
2007-11-05 11:39 ` Sebastian Tennant
2007-11-05 11:49 ` Peter Dyballa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.