(setq auto-mode-alist nil) (setq initial-major-mode 'fundamental-mode) (setq truncate-partial-width-windows nil) (setq visible-bell t) (setq transient-mark-mode t) ; In some versions of emacs, show the ^M that may be at the end of a line: (setq inhibit-eol-conversion t) (display-time) ; Enable the lisp evaluator in the mini-buffer. (put 'eval-expression 'disabled nil) ; Command history size: (setq comint-input-ring-size 1000) (setq-default tab-width 8) ; If the following line is uncommented, a tab writes spaces. ;(setq-default indent-tabs-mode nil) ; Turn off cursor blinking. (blink-cursor-mode 0) ; Define a command that places the buffer list in the current window. ; (bug: On 1st invocation, the buffer list shows up in the next window.) (defun switch-to-buffer-list () "Switch to *Buffer List*." (interactive) (cond ((get-buffer "*Buffer List*") (switch-to-buffer "*Buffer List*" 'norecord) (list-buffers)) ((one-window-p) (list-buffers) (switch-to-buffer "*Buffer List*" 'norecord) (delete-other-windows)) (t (other-window -1) (list-buffers) (select-window (get-buffer-window (get-buffer "*Buffer List*"))))) (goto-line 3)) (global-set-key "\C-x\C-b" 'switch-to-buffer-list) ; Turn on token completion, where completes the current token. (dynamic-completion-mode) ; This is the old way of turning on token completion: ; (load "completion") ; (initialize-completions) (if window-system (progn ; (set-foreground-color "green") ; (set-background-color "black") ; (set-cursor-color "green") ; (set-default-font "5x8") (set-default-font "6x13") ; (set-default-font "7x13") ; (set-default-font (if (< (x-display-pixel-width) 1152) "6x13" "7x13")) ; Some X servers mishandle coordinates (0 0). Set the position to (32 32). (set-frame-position (selected-frame) 32 32) ; (set-frame-height (selected-frame) 50) (set-frame-height (selected-frame) 60) ; (set-frame-height (selected-frame) ; (if (< (x-display-pixel-height) 900) 52 64) ; (if (< (x-display-pixel-height) 900) 57 72) ; ) (defun set-single-width () "Set width for one 80-column window." (interactive) (set-frame-width (selected-frame) 80)) (global-set-key [C-M-mouse-1] 'set-single-width) (defun set-double-width () "Set width for two 80-column windows." (interactive) (set-frame-width (selected-frame) 166)) (global-set-key [C-M-mouse-3] 'set-double-width) (set-double-width) (split-window-horizontally) ) )