From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David E Newsgroups: gmane.emacs.help Subject: newbie question: How do I make emacs load my own mode? Date: Mon, 5 Nov 2007 00:47:41 -0800 (PST) Message-ID: <13583059.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194261453 310 80.91.229.12 (5 Nov 2007 11:17:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2007 11:17:33 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 12:17:37 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IozxO-0005cS-Gm for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Nov 2007 12:17:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IozxD-0003oj-IK for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Nov 2007 06:17:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IoxcW-0000m5-WC for help-gnu-emacs@gnu.org; Mon, 05 Nov 2007 03:47:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IoxcW-0000l7-1p for Help-gnu-emacs@gnu.org; Mon, 05 Nov 2007 03:47:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IoxcV-0000kx-Rv for Help-gnu-emacs@gnu.org; Mon, 05 Nov 2007 03:47:43 -0500 Original-Received: from kuber.nabble.com ([216.139.236.158]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IoxcV-0003Ny-DT for Help-gnu-emacs@gnu.org; Mon, 05 Nov 2007 03:47:43 -0500 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IoxcT-0004Lb-Ij for Help-gnu-emacs@gnu.org; Mon, 05 Nov 2007 00:47:41 -0800 X-Nabble-From: david.elixmann@gmx.net X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 05 Nov 2007 06:16:47 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49023 Archived-At: 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.