;;; -*- mode: lisp-interaction; syntax: elisp -*- ;; keyset (global-set-key "\C-h" 'backward-delete-char) ;C-h as BackSpace (global-set-key "\M-?" 'help-for-help) ;M-? as help (global-set-key "\C-x\C-b" 'buffer-menu) (global-set-key "\C-q" 'dabbrev-expand) ;(global-set-key "\C-q" 'quoted-insert) ;C-q original ;; window-line ; move cursor just 1 line above/below (global-set-key "\C-p" 'previous-window-line) (global-set-key "\C-n" 'next-window-line) (global-set-key [up] 'previous-window-line) (global-set-key [down] 'next-window-line) (defun next-window-line (n) (interactive "p") (let ((cur-col (- (current-column) (save-excursion (vertical-motion 0) (current-column))))) (vertical-motion n) (move-to-column (+ (current-column) cur-col)))) (defun previous-window-line (n) (interactive "p") (next-window-line (- n))) ;; insert-current-time-string (define-key ctl-x-map "T" 'insert-current-time-string) (defun insert-current-time-string () "Inserts current time string at point." (interactive) (insert (current-time-string))) (cd "~") ;start on home directory (line-number-mode t) (setq next-line-add-newlines nil) ;no next line in C-n (setq-default indent-tabs-mode nil) ;When pushing [TAB], spaces are input. ;; distinguishing Emacsen (defconst running-Windows (equal system-type 'windows-nt)) ; Windows (defconst running-Emacs21 (= emacs-major-version 21)) ; Emacs v.21.xx (defconst running-Emacs20 (= emacs-major-version 20)) ; Emacs v.20.xx (defconst running-Emacs19 (= emacs-major-version 19)) ; Emacs v.19.xx (defconst running-XEmacs (featurep 'xemacs)) ; XEmacs (defconst running-Meadow (featurep 'meadow)) ; Meadow (defconst running-MuleWin32 (and running-Windows running-Emacs19)) ; Mule for Win32 (cond (running-MuleWin32 ; Mule for Win32 (load "~/.mulewin")) (running-Meadow ; Meadow 1.xx (load "~/.meadow")) (running-XEmacs ; XEmacs (load "~/.xemacs")) (running-Emacs19 (load "~/.emacs19")) (running-Emacs20 (load "~/.emacs20")) (running-Emacs21 (load "~/.emacs21")) (t ; Mule2.3 (load "~/.emacs19"))) ; end of file