From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.help Subject: Re: simple editor required Date: 03 Jun 2003 10:26:28 -0400 Organization: Yale University Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5l4r37kzjf.fsf@rum.cs.yale.edu> References: <1K1Da.3886$7E.44637@news-server.bigpond.net.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1054652901 20665 80.91.224.249 (3 Jun 2003 15:08:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2003 15:08:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 03 17:08:17 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19NDNz-0005Jp-00 for ; Tue, 03 Jun 2003 17:07:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NDMK-0000Gp-Q1 for gnu-help-gnu-emacs@m.gmane.org; Tue, 03 Jun 2003 11:05:56 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!canoe.uoregon.edu!news.wss.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: rum.cs.yale.edu Original-X-Trace: news.wss.yale.edu 1054650391 17141 128.36.229.169 (3 Jun 2003 14:26:31 GMT) Original-X-Complaints-To: news@news.wss.yale.edu Original-NNTP-Posting-Date: Tue, 3 Jun 2003 14:26:31 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 3 Jun 2003 10:26:28 -0400, rum.cs.yale.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:114043 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10537 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10537 >> (global-set-key "\e[4~" 'delete-char) This might work sometimes but is not The Right Way. Of course in Emacs-21, all this is unnecessary since it works the way you want by default. I'd recommend something like (define-key function-key-map [delete] [?\C-d]) and probably also: (define-key function-key-map "\e[4~" [?\C-d]) (the first should work for X11 and W32, while the second is for use on a text-terminal or `xterm' kind of thing). >> use something like: >> (setq auto-mode-alist (cons '("\\.c$" . text-mode) auto-mode-alist)) Should be "\\.c\\'", although it only makes a difference if there's a newline in your file name. >> > (setq inhibit-default-init 't) This says not to load the local `default.el' initialization file that your sysadmin might have written. It doesn't change anything to Emacs's own defaults. >> > (setq-default default-major-mode 'text-mode) This just tells Emacs to use text-mode rather than fundamental-mode for files for which no other mode was found. I.e. it's rarely used. And BTW, if you want "a plain editor", you might prefer fundamental-mode rather than text-mode. As for your previous requests, try: (global-set-key [?\C-m] 'newline-and-indent) -- Stefan