;; Time-stamp: ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; Start out with autoloads, then requires, then my libraries ;; If you are curious about any of these functions or variables ;; just hit C-h f to get help on the function ;; or C-h v on the variable ;; Allows one to resize the minibuffer so that long outputs do not ;; get lost forever (autoload 'resize-minibuffer-mode "rsz-minibuf" nil t) (resize-minibuffer-mode) ;; Allows one to not type full filenames (autoload 'comint-dynamic-complete-filename "comint" "Complete filenames." t) ;; Make a mouse wheel work (autoload 'mwheel-install "mwheel" "Enable mouse wheel support.") ;; Used by my edit-mutt.sh and is just a nifty way of having (require 'gnuserv) ;; Used to automagically save stuff (require 'auto-save) ;; Saveconf keeps track of the last state of xemacs when you quit ;; so that when you come back, buffers and point are restored. (require 'saveconf) (require 'imenu) ;; big-menubar gives a bunch of options in File (load "big-menubar") ;; or get rid of it entirely ;(set-specifier menubar-visible-p nil) ;; my-variables is a single function which contains ;; an alphabetized list of all the variables I screw with (load-library "my-variables") ;; the rest of these loads should be pretty self explanatory (load-library "my-functions") (load-library "my-keys") (load-library "my-sound") (load-library "my-ml") (load-library "my-c") (load-library "my-haskell") (load-library "my-perl") (load-library "my-html") (load-library "my-shell") (load-library "my-colors") (load-library "my-sql") (load-library "my-elisp") (load-library "my-hooks"); ;;(load-library "my-emacspeak") (load-library "completer") ;; Load post.el (which is quite nice) for mutt (load "post") (load "ruby-mode") (autoload 'cvs-update "pcl-cvs" nil t) ;;; All the following are things which should only happen if you are using windows (if window-system (progn ;;; First add some menu buttons (add-menu-button '("Play") ["Emacs" (find-file "~/elisp/") t] ) (add-menu-button '("Play") ["Tcshrc" (find-file "~/.tcshrc") t] ) (add-menu-button '("Play") ["Bashrc" (find-file "~/.bashrc") t] ) (add-menu-button '("Play") ["Emacs Comments" (find-file "~/.emacs_comments") t] ) (add-menu-button '("File") ["Edit Directory" dired t]) (add-menu-button nil ["Top" beginning-of-buffer t]) (add-menu-button nil ["<<<" scroll-down t]) (add-menu-button nil [" . " recenter t]) (add-menu-button nil [">>>" scroll-up t]) (add-menu-button nil ["Bot" end-of-buffer t]) ;; Change my default font to be a little bigger than the default (add-spec-list-to-specifier (face-property 'default 'font) '((global (nil . "-*-Helvetica-Medium-R-*-*-*-180-*-*-*-*-iso8859-*")))) ;; Set the width and height of my xemacs window (set-frame-width (selected-frame) 100) (set-frame-height (selected-frame) 32) ;; Start the mouse wheel support (mwheel-install) (iswitchb-default-keybindings) ;; Show the time in the modeline (display-time) ;; Make the mouse pointer run away from the cursor (mouse-avoidance-mode 'animate))) ;; narrow-to-region is a function to only let one edit what is visible (put 'narrow-to-region 'disabled nil) ;; Always attempt to show colors ('cause I like colors) (font-lock-mode) ;;; Three quick calls to make mutt work with xemacs the way I want it ;; GNU_SECURE is the name of a filename containing one host per line ;; which is allowed to connect to my running xemacs session (setenv "GNU_SECURE" "/home/trey/elisp/allowed_hosts") (setenv "GNU_PORT" "12345") ;; Start gnuserv with that in mind (gnuserv-start) ;; Some things for tramp -- tramp is a nifty method of moving files from one ;; machine to another through ssh/scp etc (add-to-list 'load-path "~/elisp/tramp/lisp/") (require 'tramp) (setq tramp-default-method "scp") ;; Tell xemacs to go into a particular mode for these ;; filetypes (set-default 'auto-mode-alist (append '(("\\.lisp$" . lisp-mode)) auto-mode-alist)) (set-default 'auto-mode-alist (append '(("\\.t$" . perl-mode)) auto-mode-alist)) (set-default 'auto-mode-alist (append '(("\\.rb" . ruby-mode)) auto-mode-alist)) ;; If xemacs is called without arguments, then open it ;; with the last known context (eg the points and buffers last open) (if (null (cdr command-line-args)) (progn (setq inihibit-startup-message (recover-context)) )) ;; recompile-tarball is a function I have to recompile my elisp directory if I change anything ;; It also makes a ~/elisp.tar.gz out of all the stuff therein ;;(recompile-tarball) (toggle-text-mode-auto-fill) ;;(readtome) ;; This is vulgar :) ;; Key bindings for assorted mode maps (define-key text-mode-map [tab] 'my-tab) (add-hook 'post-mode-hook 'my-post-mode-hook) (setq lisp-mode-hook '(lambda () (require 'ilisp))) ;(add-hook 'kill-buffer-hook 'mail-backup t t) (add-hook 'text-mode-hook 'flyspell-mode)