;; Red Hat Linux default .emacs initialization file

;; Are we running XEmacs or Emacs?
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))

;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'backward-delete-char-untabify)
(global-set-key [kp-delete] 'delete-char)

;; Turn on font-lock mode for Emacs
(cond ((not running-xemacs)
       (global-font-lock-mode t)
))

;; Visual feedback on selections
(setq-default transient-mark-mode t)

;; Always end a file with a newline
(setq require-final-newline t)

;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)

;; Enable wheelmouse support by default
(cond (window-system
       (mwheel-install)
))
(global-set-key "\C-b" 'compile)
(global-set-key "\C-n" 'next-error)
(defun edt () (interactive) (edt-emulation-on))
(defun ked () "KED-Emulation einschalten" (interactive)
  (load-file "~/ked.emacs"))

;(edt-emulation-on)
;(standard-display-european 1)	;fr richtige Darstellung der Umlaute
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
;(set-keyboard-coding-system 'utf-8) ;macht Mist bei der Eingabe
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

(defun anfzeichen () "Korrektur fuer seltsame Tastatur" (interactive)
  (insert-char ?' 1))
(global-set-key "\C-^" 'anfzeichen)
(defun geschklamauf () "Korrektur fuer VAX-Tastatur" (interactive)
  (insert-char ?{ 1))
;(global-set-key "\C-A" 'geschklamauf)
(defun geschklamzu () "Korrektur fuer VAX-Tastatur" (interactive)
  (insert-char ?} 1))
(global-set-key "\C-D" 'geschklamzu)
