;;Version 1.3 - Feb. 19th, 2007 ;; ;; File _emacs - These commands are executed when GNU emacs starts up. ;; ;; Welcome to Chris Young's (www.chrisyoung.net) dotemacs file. All ;; code in this file is stolen from elsewhere. I don't know any lisp. ;; Use at your own risk. ;; ;; However, if you do decide - at your own risk! - to use this file, ;; here's how to use it: Just go through the file and take whatever ;; seems useful to you. Take special note of my set-up: If, for ;; example, you're running Emacs on a Linux box, you'll want to get ;; rid of all the Windows-specific stuff. If you don't use LaTeX, ;; don't bother with all that stuff. Etc., etc. Hope it's helpful. ;; For more information on anything in this file, remember that Google ;; is your friend. Google will also help you find any of the ;; extensions I use here. If you can't find one, just email me and ;; I'll send it to you. ;; FURTHER READING: ;; http://www.gnu.org/software/emacs/windows/ntemacs.html - Frequently ;; asked questions for Windows users of Emacs. ;; http://xahlee.org/emacs/emacs.html - A helpful set of tutorials. ;; http://www.cs.rutgers.edu/LCSR-Computing/some-docs/emacs-chart.html ;; - A nice cheatsheet of commands. ;; http://www.emacs.uniyar.ac.ru/doc/em24h/index.htm - Teach Yourself ;; Emacs in 24 Hours. ;; MAIN THINGS STILL TO DO: ;; ;; 1. Set up the dotemacs file so that it runs on both my linux box ;; and windows. ;; ;; 2. Fuller listing of useful key-commands. ;; ;; 3. More helpful documentation of everything in the file. ;; ;; MY SET-UP: ;; 1. I run emacs 21.3 on Windows XP. ;; 2. I use Cygwin, and so this file contains code that makes Bash ;; the default shell. ;; 3. I used a very handy version of Emacs that came precompiled with ;; Auctex. ;; 4. I use MikTex to meet all my LaTeX needs, and if you use ;; Windows, so should you. ;; ;;SUMMARY OF ALL KEY-COMMANDS SET BY THIS FILE ;; ;; C-a = Mark the whole buffer ;; C-b = Set a bookmark ;; C-f = Search buffer moving forward ;; C-n = Kill the next word ;; C-o = Move to the beginning of the line ;; C-p = Look at the bookmark menu list ;; C-s = Save the buffer ;; ;; C-c k = Browse the kill ring ;; C-x C-r = Open list of recent files ;; ;; C-[Page Up] = Scroll the other window up ;; C-[Page Down] = Scroll the other window down ;; ;; M-g = Go to the line ;; M-m = Set the mark ;; M-n (in isearch mode only) = isearch-repeat-forward ;; M-o = Back a sentence ;; M-p (in isearch mode only) = isearch-repeat-backward ;; M-x mb = Toggle the menu bar mode from visible to invisible ;; M-? = Help-command (replaces all C-h [key] commands) ;; M-? b = Describe all the key-bindings for this buffer ;; M-? m = Describe the mode ;; M-? i = Info ;; M-? k = Describe the key ;; [f2] = Comment the region ;; [f3] = Call up the Bash Shell ;; [f5] = RefTeX mode ;; [f6] = Run bibtex ;; [f9] = Split the window horizontally ;; [f10] = Split the window vertically ;; [f11] = Move to the other window ;; [f12] = Remove the current window from view ;; ;; Shift-[f1] = Call up my dotemacs file. ;; Shift-[f2] = Uncomment the region ;; Shift-[f5] = Insert a LaTeX letter template ;; Shift-[f6] = Insert a LaTeX lecture template ;; Shift-[f7] = Insert a LaTeX paper template ;; ;; [Home] = Switch to the previous buffer ;; [End] = Switch to tne next buffer ;; ;; Right-clicking in a Latex environment pulls down a nagivation menu. ;; ;; DEFAULT COMMANDS THAT I'VE FOUND ESPECIALLY USEFUL ;; ;; . . . General . . . ;; ;; C-e = Move to the end of the line ;; C-t = Transpose two letters ;; C-x z = Redo last change ;; C-x C-t = Transpose two lines ;; M-^ = Attach this line to previous ;; M-a = Move backwards one sentence ;; M-c = Capitalize word ;; M-e = Move forwards one sentence ;; M-h = Highlight paragraph ;; M-k = Kill sentence ;; M-t = Transpose two words ;; M-u = Uppercase word ;; M-x ispell-buffer = turns on spell checking for whole buffer ;; M-x ispell-region = spell-checks highlighted region ;; M-y = Yank pop (if you don't know how to use this, you must learn immediately) ;; M-$ = spell-check word ;; M-% = Query/replace (space accepts change; n goes on to next) ;; . . . Dired . . . ;; ;; M-x tumme = Create thumbnails of a directory ;; ;; . . . In the Auctex and RefTeX modes . . . ;; ;; C-c = Run LaTeX ;; C-c = = RefTeX table of contents ;; C-c ( = Insert RefTeX label ;; C-c [ = Insert RefTeX citation ;; C-c C-e = LaTeX-envirnment ;; C-c C-j = LaTeX-insert-item ;; C-c C-s = LaTeX section ;; C-c C-t C-p = Toggle pdf/dvi mode ;; C-c C-t C-s = Turn on source specials mode, so enable jumping straight to point in dvi viewer ;; C-c C-v = TeX-view ;; C-c C-p C-d = Preview ;; C-c C-p C-c C-d = Remove preview ;; C-v = invoke viewer ;; C-[backspace] = backward-kill-word ;; C-[down] = forward-paragraph ;; C-[up] = backward-paragraph ;; ;; . . . In HTML mode . . . ;; ;; C-c C-c h = inserts a link ;; C-c C-c i = html-image ;; PART I: BASIC CUSTOMIZATIONS TO EMACS ;; First, some basic stuff to get us started. (setq load-path (cons "~/emacs" load-path)) ;; Don't, for the love of Pete, make me type out "Yes" whenever I want ;; to quit emacs. "y" and "n" will do. (setq kill-emacs-query-functions (list (function (lambda () (ding) (y-or-n-p "Really quit? "))))) ;; Get rid of the tool bar, the scroll bar, and the menu bar. (tool-bar-mode -1) (scroll-bar-mode -1) (menu-bar-mode -1) ;; But wait! Since the menu bar is sometimes handy, make it easy to toggle. (defalias 'mb 'menu-bar-mode); which means that M-x mb will restore it. ;; Show more info in taskbar/icon than just "Emacs" ;;(setq-default frame-title-format (list "%10b %f")) (setq-default frame-title-format (list "%f")) (setq-default icon-title-format (list "%b")) ;; Gets rid of startup message (setq inhibit-startup-message t) ;; Cause the region to be highlighted and prevent region-based ;; commands from running when the mark isn't active. (pending-delete-mode t) (setq transient-mark-mode t) ;; Line number mode, duh. (line-number-mode t) ;; Visual bell instead of annoying beep (setq visible-bell t)t ;; Make searches case insensitive (setq case-fold-search t) ;; Set the basic font stuff (prefer-coding-system 'utf-8) ;; Fonts are automatically highlighted. For more information ;; type M-x describe-mode font-lock-mode (global-font-lock-mode t) ;; Unicode support: For an explanation of the following, see ;; http://xahlee.org/emacs/emacs_n_unicode.html ;; Show char name, used by C-u C-x = (let ((x "~/addons/UnicodeData.txt")) (when (file-exists-p x) (setq describe-char-unicodedata-file x))) ;; Turn on auto-fill (add-hook 'text-mode-hook 'turn-on-auto-fill) ;; Tell emacs where I store my extras. I like to put everything in ;; this directory, and then back up the whole thing by subversion. (setq load-path (cons "~/addons" load-path)) ;; Tell emacs to start off in the My documents directory when I ;; navigate around in dired. This is a really useful one for me. ;; The messages buffer is usually not necessary. (setq message-log-max nil) (kill-buffer "*Messages*") ;; Answer y or n instead of yes or no at minibar prompts. (defalias 'yes-or-no-p 'y-or-n-p) ;; SavePlace- this puts the cursor in the last place you edited ;; a particular file. This is very useful for large files. (require 'saveplace) (setq-default save-place t) ;; Changes default mode to Text (instead of Fundamental) (setq default-major-mode 'text-mode) ;; Save all backup files in a specific directory (defun make-backup-file-name (file) (concat "~/autosave/" (file-name-nondirectory file))) ;; Start off in my "My Documents" directory (cd "C:/Documents and Settings/Chris/My Documents/") (setq default-directory "C:/Documents and Settings/Chris/My Documents/") ;; My wife boots me off the computer sometimes when I've got a whole ;; bunch of things set up in emacs just the way I want them. How ;; wonderful, then, that emacs will always automatically save ;; everything just the way it is each time it closes. (desktop-save-mode) (setq history-length 250) (add-to-list 'desktop-globals-to-save 'file-name-history) (desktop-read) (setq desktop-save-mode t) ;; . . . or at least, most of the desktop. We don't need to load ;; everything up. (setq desktop-buffers-not-to-save (concat "\\(" "^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS" "\\|\\.emacs.*\\|\\.diary\\|\\.newsrc-dribble\\|\\.bbdb" "\\)$")) (add-to-list 'desktop-modes-not-to-save 'dired-mode) (add-to-list 'desktop-modes-not-to-save 'Info-mode) (add-to-list 'desktop-modes-not-to-save 'info-lookup-mode) (add-to-list 'desktop-modes-not-to-save 'fundamental-mode) ;;KEY-COMMANDS ;; I use CUA mode, which replaces some of the more obsolete key ;; commands in Emacs, bringing it into line with just about every other ;; program on earth. The default in Emacs, for example, is to bind C-v ;; to scroll down the page, instead of to paste text. And, gosh, it ;; just doesn't make sense to keep things that way. In spite of what ;; people say, you can't live forever in emacs; and when you leave it, ;; you'll end up making a lot of mistakes in other programs. Is this ;; what you really wanted, little man? Your Emacs made you feel ;; powerful, but as soon as you left it you looked like a lost child. ;; Anyway, if you're really used to the default key-bindings, fine. ;; But if you're just starting out, trying to learn all the foreign ;; key-bindings doesn't make you hard-core - it just makes you a ;; masochist. And remember that what makes emacs great is not its ;; default key-bindings, but the ability to customize them. So there. ;; To turn on CUA mode, simply select "Options" from the Menu Bar, ;; scroll down to "C-x/C-c/C-v Cut and Paste (CUA)," and then click ;; "Save Options" just a bit further down. ;; Can't live without C-a highlighting everything, just like every ;; other program on earth. (global-set-key "\C-a" 'mark-whole-buffer) ;; Sadly, now that we've used C-a we lack a command to move the ;; cursor to the beginning of the line, which really is handy to have. ;; Luckily, C-o isn't very useful to me, so we'll use that. (global-set-key "\C-o" 'beginning-of-line) ;; M-a is by default bound to backward-sentence. Let's change that to ;; M-o to avoid confusion. (global-set-key "\M-o" 'backward-sentence) ;; Let's make Emacs search like every other program on earth. The ;; first command sets the initial searches, but the second command is ;; necessary to handle repeated searches. I keep the default binding ;; of C-r for reverse searches. NOTE: If you do more fancy stuff with ;; isearch, you'll want to change the defaults here even further. (global-set-key "\C-f" 'isearch-forward) (define-key isearch-mode-map "\C-f" 'isearch-repeat-forward) ;; We're not quite done with searching stuff. I spend a lot of time ;; in Firefox. For reasons unclear to me, Firefox uses C-f to search ;; on the page, but M-n and M-p to move to the next or the previous ;; instances of the string searched for. Let's make sure that I can ;; *also* search this way, if I happen to feel like it, or if ;; switching back and forth between Firefox and Emacs induces ;; temporary senility. Notice that because we're using ;; isearch-mode-map instead of global-set-key, the key-bindings we ;; define here will only work while searching. (define-key isearch-mode-map "\M-n" 'isearch-repeat-forward) (define-key isearch-mode-map "\M-p" 'isearch-repeat-backward) ;; And now we have freed up C-s (which used to be used for searching) ;; so that it can be used for saving . . . just like every other ;; program on earth. (global-set-key "\C-s" 'save-some-buffers) ;; Against the advice of the pros, I use the arrow keys on my computer ;; for single space navigation. That frees up a few keys which we'll ;; use shortly. ;; It's useful to be able to easily kill words going forward. (global-set-key "\C-n" 'kill-word) ;; Bookmarks are very, very handy - (See here: ;; http://www.emacswiki.org/cgi-bin/wiki/BookMarks)- too handy for the ;; default keybindings. Again, C-b and C-p are freed up by my use of ;; the arrow keys. (global-set-key "\C-b" 'bookmark-set) (global-set-key "\C-p" 'bookmark-bmenu-list) ;; You know, I would be perfectly happy with C-Space to set the mark, ;; but I've used that for my hot-keys program for years now, and ;; there's really no going back. Therefore . . . (global-set-key "\M-m" 'set-mark-command) ;; Now, let's free up C-h for other things. We'll rebind all C-h + ;; [something else] key sequences to M-? + [something else], which is ;; easy to remember. (Of course, default C-h key sequences remain in ;; effect unless explicitly changed by this document. (global-set-key "\M-?" 'help-command) ;; Better scrolling (setq scroll-step 1) (setq scroll-conservatively 1) ;; Some more useful commands (global-set-key [f2] 'comment-region) (global-set-key [(shift f2)] 'universal-argument) ;uncomment is Shift-F2 F2 (global-set-key [f9] 'split-window-horizontally) (global-set-key [f10] 'split-window-vertically) (global-set-key [f11] 'other-window) (global-set-key [f12] 'delete-window) (global-set-key [(meta g)] 'goto-line) ;; Make control+pageup/down scroll the other buffer (global-set-key [(control next)] 'scroll-other-window) (global-set-key [(control prior)] 'scroll-other-window-down) ;; Swap Backspace and Delete keys, except for v19 running under X. ;;This works on both HPs and Suns. (or (and (eq window-system 'x) (string-match "\\`19\\." emacs-version)) (load "term/bobcat")) ;; Finally, let's make it easy to edit this dotemacs file. (defun open-dot-emacs () "opening-dot-emacs" (interactive) ; this makes the function a command too (find-file "C:Documents and Settings/Chris/My Documents/Emacs/_emacs") ) (global-set-key [(shift f1)] 'open-dot-emacs) ;;STUFF TO FIT EMACS NICELY INTO WINDOWS ;; Let's maximize the window as soon as it loads. The last line here ;; is crucial, since the order in which the command is executed makes ;; a difference to whether it will be properly executed. Note that ;; this code only works on Windows computers. (defun w32-maximize-frame () "Maximize the current frame" (interactive) (w32-send-sys-command 61488)) (add-hook 'window-setup-hook 'w32-maximize-frame t) ;; Gnuclient helps set the file associations for emacs. If you try to ;; do it the normal way, Windows goes and opens a new Emacs every time ;; you click on a file, instead of simply opening a buffer in an ;; existing instance of Emacs. So . . . . ;; start gnuserv on Windows (if (or (eq window-system 'w32) (eq window-system 'win32)) (progn (require 'gnuserv) (setq server-done-function 'bury-buffer gnuserv-frame (car (frame-list))) (gnuserv-start) ;; open buffer in existing frame instead of creating new one... (setq gnuserv-frame (selected-frame)) (message "gnuserv started."))) ;; Then set the file associations using this .bat file I found ;; somewhere or other. Just copy and paste the 7 lines below into a ;; file and name it "foo.bat" (without the quotation marks, of course). ;; Modify it to include whatever file associations you'd like, save it, ;; close it, and then click on it. ;; REM $Id: emacsassoc.bat,v 1.1 2003/01/10 08:21:27 reichr Exp $ ;; REM You should adjust the path to gnuclientw.exe ;; REM %%1 is needed for 4nt, %1 can be used for cmd.exe ;; ftype emacs-file=c:Program ;;Files\emacs\emacs-21.3\bin\gnuclientw.exe -q -F "%%1" ;; assoc .txt=emacs-file ;; assoc .el=emacs-file ;; assoc .tex=emacs-file ;; CYGWIN helps make life bearable for Windows users who secretly ;; fantasize about being *nix geeks. This is an extremely helpful ;; page for setting up CYGWIN with Emacs: ;; http://www.khngai.com/emacs/cygwin.php. Lifehacker also has an ;; introduction to Cygwin, the first installation of which is here: ;; http://lifehacker.com/software/cygwin/geek-to-live--introduction-to-cygwin-part-i-179514.php (setenv "PATH" (concat "c:/cygwin/bin;" (getenv "PATH"))) (setq exec-path (cons "c:/cygwin/bin/" exec-path)) (require 'cygwin-mount) (cygwin-mount-activate) (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt nil t) (setq explicit-shell-file-name "bash.exe") ;; For subprocesses invoked via the shell ;; (e.g., "shell -c command") (setq shell-file-name explicit-shell-file-name) ;; Now let's make it easy to get to the shell . . . (global-set-key [f3] 'shell) ;; This is how emacs tells the file type by the file suffix. (setq auto-mode-alist (cons '("README" . text-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.txt$" . text-mode) auto-mode-alist)) (autoload 'css-mode "css-mode") (setq auto-mode-alist (cons '("\\.css\\'" . css-mode) auto-mode-alist)) ;;LATEX EDITING ;; Recall that I use a version of emacs that came already bundled with ;; Auctex. Auctex is really the only way to go if you spend any amount ;; of time with LaTeX, but there's nothing here to help you set that ;; up. ;; Apparently Auctex expects a *nix enviornment. So let's make it ;; play friendly with MikTeX. Without this, there's no autoloading of ;; the Yap previewer, and that sucks. (require 'tex-mik) ;; Get rid of those bloody save queries in auctex every time I run ;; LaTeX on a file (setq TeX-save-query nil) ;; Then make sure that I can spell-check documents. (setq-default ispell-program-name "aspell") ; Note: I got this through Cygwin ;; Why in heaven's name is there no keybinding suggested in the latex ;; command menu to run bibtex? And why I have failed to locate the ;; default auctex key command to run bibtex? Because I'm a no-nothing ;; newbie, that's why. Oh well, when in doubt, define a macro. (global-set-key [f6] 'run-bibtex) (fset 'run-bibtex [(menu-bar) Command BibTeX]) ;; RefTeX is awesome. ;; To use RefTeX with AUCTeX (setq reftex-plug-into-AUCTeX t) (setq reftex-bibpath-environment-variables '("C://Documents and Settings/Chris/My Documents/Thesis/files.bib")) ;; Now, make it easy to jump to the right place in the dvi file (global-set-key [f7] 'tex-source-specials-mode) ;; Tell RefTeX that I prefer Natbib style (setq reftex-cite-format 'natbib) ;; Provide imenu support in RefTeX (add-hook 'reftex-load-hook 'imenu-add-menubar-index) (add-hook 'reftex-mode-hook 'imenu-add-menubar-index) (global-set-key [down-mouse-3] 'imenu) (global-set-key [f5] 'reftex-mode) ;;EXTENSIONS ;; Extension: Cgreek ;; ;; I have yet to actually get CGreek running. It'll happen some day. ;; (setq bdf-directory-list ;; '("c:/Program Files/emacs/emacs-21.3/site-lisp/cgreek21/bdf")) ;; (setq w32-bdf-filename-alist ;; (w32-find-bdf-fonts bdf-directory-list)) ;; (setq w32-use-w32-font-dialog nil) ;; (add-to-list 'load-path "c:/Program Files/emacs/emacs-21.3/site-lisp/cgreek21") ;; (load-library "dotemacs") ;; Extension: Swbuff ;; ;; swbuff is a really useful extension for switching buffers easily. ;; I've changed the swbuff file so that you switch buffers with C-TAB, ;; which is the way that a lot of other programs do it. Also useful ;; are the end and home keys. (require 'swbuff) (global-set-key [end] 'swbuff-switch-to-next-buffer) (global-set-key [home] 'swbuff-switch-to-previous-buffer) ;;Extension: Php mode (require 'php-mode) (add-hook 'php-mode-user-hook 'turn-on-font-lock) ;;Extension: Recentf ;; ;;This very useful extension allows me to look quickly at a list of ;;recently opened files and select one. (require 'recentf) (recentf-mode 1) (setq recentf-max-menu-items 25) (global-set-key "\C-x\ \C-r" 'recentf-open-files) ;;Extension: Grade ;; ;;An extension for keeping track of students' grades. (autoload 'grade "grade" "Emacs grading program" t) ;;Extension: Org Mode ;; ;;Most inconveniently, Org mode doesn't play nice with CUA ;;keybindings. On my list of things-to-do is fixing this. (setq load-path (cons "~/addons/org-4.63" load-path)) (require 'org-install) ;; The following lines are always needed to support Org-Mode (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) (add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only ;;Extension: Browse-kill-ring. ;; ;;Lets you see your kill-ring as a buffer. (autoload 'browse-kill-ring "~/addons/browse-kill-ring.el" "Enables opening up of kill-ring in a buffer" t) (global-set-key (kbd "C-c k") 'browse-kill-ring) ;;Extension: dired-single. ;; ;; Better navigation in dired. Stop the proliferation of unnecessary ;; directories! Stop it now! (require 'dired-single) ;; and then . . . (defun my-dired-init () "Bunch of stuff to run for dired, either immediately or when it's loaded." ;; (define-key dired-mode-map [return] 'joc-dired-single-buffer) (define-key dired-mode-map [mouse-1] 'joc-dired-single-buffer-mouse) (define-key dired-mode-map "^" (function (lambda nil (interactive) (joc-dired-single-buffer ".."))))) ;; if dired's already loaded, then the keymap will be bound (if (boundp 'dired-mode-map) ;; we're good to go; just add our bindings (my-dired-init) ;; it's not loaded yet, so add our bindings to the load-hook (add-hook 'dired-load-hook 'my-dired-init)) ;; PERSONAL STUFF ;; I keep personal information in a separate file. Let's tell Emacs ;; where to find the file. (load "~/personalinfo.el") ;; I use abbreviations once in a while. You certainly won't want ;; *these* abbreviations, but I list two here, so that you can ;; see how to set it up. The table below, for example, tells Emacs ;; that whenever I type "Ar" it should expand the text to "Aristotle". ;; Just keep adding entries in this way. ;; (define-abbrev-table 'global-abbrev-table '( ;; ("Ar " "Aristotle" nil 0) ;; ("pl " "pleasure" nil 0) ;; )) ;; Next, let's set up some handy templates for frequently used tasks. ;; Here's a template for writing letters in LaTeX, which I also keep ;; in personalinfo.el. I've given an example below so that you can ;; set up your own, either in your dotemacs file or in your equivalent ;; of a personalinfo.el file. Notice that the line "To: " is very ;; useful. It tells Emacs to prompt me in the mini-buffer for the ;; recipient of the letter and then inserts the name I give it into ;; the appropriate place below. The "_" symbol (without the quotes) ;; sets where the cursor begins after the template has been called up. ;; For more on this, just google "define-skeleton." ;; (define-skeleton letter-skeleton ;; "Inserts a Latex letter skeleton into current buffer. ;; This only makes sense for empty buffers." ;; "To: " ;; "\\documentclass[12pt]{letter}\n" ;; "\\usepackage[polutonikogreek,english]{babel}\n" ;; "\\pagestyle{plain}\n" ;; "\\sloppy\n" ;; "\\nonfrenchspacing\n" ;; "\\renewcommand{\\baselinestretch}{1.0}\n" ;; "\\name{Christopher M. Young}\n" ;; "\\signature{Christopher M. Young}\n" ;; "\\address{Christopher M. Young \\\\ 570 Westminster Rd., Apt. F20 \\\\ Brooklyn, NY 11230\\\\ \n home: (718) 871-4546\\\\ cell: (917) 613-9341\\\\email: [DELETED TO AVOID SPAM!]}\n" ;; "\n" ;; "\\begin{document}\n" ;; "\n" ;; "\\begin{letter}{" str | " *** To *** " "\n" ;; "\\\\ADDRESS 1" _ " } \n" ;; "\\\\ADDRESS 2} \n" ;; "\\opening{" "}\n\n" ;; "\\closing{Best,}\n" ;; "\\end{letter}\n" ;; "\\end{document}\n") ;; Now that you see how it's done, I'll set the keys to call up the ;; templates quickly. They're not listed here, recall, but rather in ;; my personalinfo.el file. (global-set-key [(shift f5)] 'letter-skeleton) (global-set-key [(shift f6)] 'lecture-skeleton) (global-set-key [(shift f7)] 'paper-skeleton) ;; BYTE COMPILE THAT SUCKER! ;; I have not found that my dotemacs file loads much faster when I ;; byte compile it. But if you want to have Emacs byte-compile this ;; file automatically, just uncomment the following code. Note: This ;; produces an .elc file in your Home directory, so expect that. Note that if your dotemacs ;; file is .emacs, you'll need to replace "_emacs" with ".emacs" in ;; the code below. ;; (defun autocompile nil ;; "compile itself if ~/_emacs" ;; (interactive) ;; (require 'bytecomp) ;; (if (string= (buffer-file-name) (expand-file-name (concat ;; default-directory "_emacs"))) ;; (byte-compile-file (buffer-file-name)))) ;; (add-hook 'after-save-hook 'autocompile) ;; ;; Finally look for .customs.emacs file and load it if found (if "~/.customs.emacs" (load "~/.customs.emacs" t t)) ;; End of file. (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(cua-mode t nil (cua-base)) '(preview-image-type (quote dvipng)) '(recentf-max-saved-items 15) '(scalable-fonts-allowed t) '(transient-mark-mode t)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. )