(add-to-list 'load-path (expand-file-name "~/elisp")) ;(add-to-list 'load-path "/usr/local/lib/xemacs/site-lisp/emacspeak/lisp") ;(add-to-list 'load-path "/usr/local/share/emacs/site-lisp") ;; Time-stamp: ;; This is my global (X|Gnu)Emacs configuration. ;; A copy of my current elisp hackery may be found at ;; http://abelew.web.wesleyan.edu/elisp.tar.gz load-path ;;;; Autoloads! for both gnu and xemacs (setq auto-mode-alist (append auto-mode-alist '(("\\.[hg]s$" . haskell-mode) ("\\.hi$" . haskell-mode) ("\\.l[hg]s$" . literate-haskell-mode)))) (autoload 'haskell-mode "haskell-mode" "Major mode for editing Haskell scripts." t) (autoload 'literate-haskell-mode "haskell-mode" "Major mode for editing literate Haskell scripts." t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Now add in a couple of things which should work anywhere. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun my-insert (num arg) ("A cheesy insertion function which can br called interactively") (interactive "nNumber:\nsString:") ((lambda (num arg count) ;; this block is an anonymous function with the arguments (while (< count num) ;; to feed it at the end (num arg 0) (insert arg) ;; cute, huh? (setq count (1+ count)))) num arg 0)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; A note ;; It is just as easy to hit Ctrl-# ([0-9]*) something to get a lot of a single character. (defun lotta-dashes () "64 dashes. Useful for commenting code." (interactive) (my-insert 64 "-") ) (defun lotta-hashes () "64 hashes. Useful for commenting perl, shell, and python, amongst other stuff." (interactive) (my-insert 64 "#") ) (defun lotta-semis () "64 semicolons. Cool for commenting lisp code." (interactive) (my-insert 64 ";") ) (defun dos2unix (buf) "replace the stupid crapola from DOS with real newlines." (interactive "b") (replace-string "^M" "\n") ) (define-key emacs-lisp-mode-map [(control c) (control e)] 'eval-buffer) ;; Now load either Gnu or X Emacs settings -- 99% of what I have is for Xemacs (if (string-match "XEmacs\\|Lucid" (emacs-version)) (load-library "xemacs.settings") (load-library "gnuemacs.settings"))