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: Mon, 30 Jun 2003 09:58:28 GMT

"Paul Edwards" <address@hidden> wrote in message news:address@hidden
> I guess while I'm on a roll I should see if I can get xemacs to
> behave like emacs, so that next time I'm on a site with xemacs
> only, I can get it to behave as logically as emacs (now) does!  :-)

I've now got both emacs and xemacs behaving properly.

Thanks everyone for your help.  The final solution is below,
for anyone who wants a simple editor...

BFN.  Paul.


; 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
(defun newline-and-maybe-indent ()
  (interactive)
  (if (bolp) (newline) (newline-and-indent)))
(global-set-key [?\C-m] 'newline-and-maybe-indent)
(setq indent-line-function 'indent-relative-maybe)

; Don't add newlines when cursoring down
(setq-default next-line-add-newlines nil)

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

; For xemacs at least, don't destroy marker on goto
(setq-default zmacs-regions nil)

; Make delete delete
(define-key key-translation-map "\C-?" "\C-d")

; potential alternatives to make delete delete
;(define-key text-mode-map (kbd "DEL") 'delete-char)
;(global-unset-key [delete])
;(global-set-key (kbd "<delete>") #'delete-char)
;(define-key emacs-lisp-mode-map (kbd "DEL") 'delete-char)
;(normal-erase-is-backspace-mode 0)
;(define-key function-key-map "\C-?" "\C-d")
;(global-set-key [delete] 'delete-char)
;(define-key function-key-map [delete] "\C-d")
;(global-unset-key [deletechar])
;(global-set-key [deletechar] 'delete-char)
;(global-unset-key (kbd "<delete>"))
;(global-set-key (kbd "<delete>") 'delete-char)

; If some things are meant to be emacs/xemacs-specific, put them here
(if (featurep 'xemacs)
    (progn
      ;; do Xemacs stuff
      )
  ;; do Emacs stuff
  )




reply via email to

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