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

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

Re: simple editor required


From: Stefan Monnier
Subject: Re: simple editor required
Date: 03 Jun 2003 10:26:28 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> (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


reply via email to

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