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

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

Re: simple editor required


From: Paul Edwards
Subject: Re: simple editor required
Date: Tue, 10 Jun 2003 13:40:53 GMT

"lawrence mitchell" <wence@gmx.li> wrote in message 
news:?fnord?87k7by3zjj.fsf@ID-97657.usr.dfncis.de...
> If I understand your needs correctly, this .emacs is probably
> close to what you want:
>
> ;; turn off all major-mode associations
> (setq auto-mode-alist nil)
> (setq interpreter-mode-alist nil)

This worked great, I now get text mode for everything, which is
close to what I want.  Thanks!

> ;; Make the DEL key work the same as C-d (and not like backspace)
> (global-set-key (kbd "<delete>") #'delete-char)

Unfortunately this command doesn't work.  I get the same old
same old...

DEL runs the command backward-delete-char-untabify

But in xemacs it works.

I'll settle for something like this, except how do I put DEL?

(global-set-key "\e[4~" 'delete-char)

>>>to get the delete key to work as you'd like. (\e[4~ would need to be
>>>subsituted by the escape sequence of your delete key).  To find your
>>>delete keys escape sequence, go into the *scratch* buffer, hit C-q, then
>>>press your delete key.

DEL.

>>>   (define-key function-key-map [delete] [?\C-d])

This didn't do anything either.

Any more suggestions?  I compared xemacs and emacs again,
and emacs has less things causing me trouble, but xemacs has
the DEL key working, and that is an important keystroke, the
other stuff isn't, hence the reason I originally switched to xemacs
when I found it installed.

Thanks.  Paul.

P.S. I tried starting emacs with:
emacs --no-windows --no-site-file .emacs
but that didn't change anything.

P.P.S. Here is my latest .emacs.

; Switch off any crap the installation has
(setq inhibit-default-init 't)

; Don't let emacs guess what file types I am editting
(setq auto-mode-alist '() interpreter-mode-alist '())

; Always assume text mode
(setq-default default-major-mode 'text-mode)

; Make backspace backspace
(global-set-key [?\C-h] 'delete-backward-char)

; Set default tab width
(setq-default tab-width 4)

; Don't create junk backup files
(setq make-backup-files nil)
(setq auto-save-default nil)

; make insert toggle overwrite mode
(global-set-key [insertchar] 'overwritemode)

; Don't use tabs to indent
(setq-default indent-tabs-mode nil)

; Indent whenever you hit enter
(global-set-key [?\C-m] 'newline-and-indent)

; micro-emacs lookalikes
(global-set-key "\M-g" 'goto-line)
(global-set-key "\M-r" 'replace-string)

(global-unset-key [delete])
(global-set-key (kbd "<delete>") #'delete-char)
;(global-set-key [delete] 'delete-char)

; potential alternatives
;(global-unset-key [deletechar])
;(global-set-key [deletechar] 'delete-char)
;(global-unset-key (kbd "<delete>"))
;(global-set-key (kbd "<delete>") 'delete-char)





reply via email to

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