From: Don Armstrong Date: Fri, 17 Feb 2006 09:22:07 +0000 (+0000) Subject: * Completely move around the home directory system and begin X-Git-Url: https://git.donarmstrong.com/?p=emacs.git;a=commitdiff_plain;h=5c589e32bbc9b1c0d77dabf7dc195eda7cb7f1e1 * Completely move around the home directory system and begin transitioning to a module based system instead of the individual directories --- 5c589e32bbc9b1c0d77dabf7dc195eda7cb7f1e1 diff --git a/.emacs b/.emacs new file mode 100644 index 0000000..6c1fc0e --- /dev/null +++ b/.emacs @@ -0,0 +1,177 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! + ;; Your init file should contain only one such instance. + '(bibtex-user-optional-fields (quote (("annote" "Personal annotation (ignored)") ("abstract" "") ("pmid" "") ("doi" "")))) + '(calendar-latitude [33 57 north] t) + '(calendar-longitude [117 24 west] t) + '(case-fold-search t) + '(confirm-kill-emacs (quote y-or-n-p)) + '(cperl-lazy-help-time nil) + '(debian-changelog-mailing-address "don@debian.org") + '(display-time t) + '(display-time-24hr-format t) + '(display-time-day-and-date t) + '(display-time-mode t nil (time)) + '(global-auto-revert-mode t nil (autorevert)) + '(global-font-lock-mode t nil (font-lock)) + '(iswitchb-prompt-newbuffer nil) + '(mail-user-agent (quote sendmail-user-agent)) + '(mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases"))) + '(post-email-address "don@donarmstrong.com") + '(post-kill-quoted-sig nil) + '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*") + '(post-uses-fill-mode nil) + '(ps-footer-font-size (quote (8 . 10))) + '(ps-header-font-size (quote (8 . 10))) + '(ps-header-title-font-size (quote (10 . 10))) + '(ps-line-number-color "blue") + '(ps-print-footer t) + '(ps-print-footer-frame nil) + '(ps-print-only-one-header t) + '(sentence-end "[.?!][]\"')]*\\($\\| \\| \\)[ +]*") + '(sentence-end-double-space nil) + '(show-paren-mode t nil (paren)) + '(tool-bar-mode nil nil (tool-bar)) + '(user-mail-address "don@donarmstrong.com")) +(fset 'perl-mode 'cperl-mode) +;;(load-file "cperl-mode.el") +(add-to-list 'load-path '"~/lib/emacs_el/") + +(require 'tex-site) +(require 'psvn) +(require 'cperl-mode) +;;(require 'ecasound) +;;(require 'emacs-wiki) +(require 'bibtex) +(require 'post) + + +(global-set-key "\C-xp" 'gnuserv-edit) + +(setq auto-mode-alist (cons '("\.wml$" . + (lambda () (html-mode) (auto-fill-mode))) + auto-mode-alist)) + +;; Use c-mode for perl .xs files +(add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode)) +(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode)) +(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode)) +(add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode)) +(add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode)) + +(add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode)) +(add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode)) + + + +;;(autoload 'perl-mode "cperl-mode" +;; "alternate mode for editing Perl programs" t) + +;; self-insert-command hack. +;; Without this, "if" expands to +;; if ( -!-) { +;; } +;; which really should be, +;; if (-!-) { +;; } +(setq cperl-hairy t + cperl-indent-level 4 +;; cperl-auto-newline t +;; cperl-auto-newline-after-colon t + cperl-continued-statement-offset 4 + cperl-brace-offset -4 + cperl-label-offset -4 + cperl-highlight-variables-indiscriminately t + cperl-electric-lbrace-space nil + ) +(add-hook 'cperl-mode-hook (lambda () (cperl-set-style "K&R"))) + + + +(load-library "php-mode") + +(setq c-indent-level 8) +(setq c-brace-imaginary-offset 0) +(setq c-brace-offset -8) +(setq c-argdecl-indent 8) +(setq c-label-offset -8) +(setq c-continued-statement-offset 8) +(setq indent-tabs-mode nil) +(setq tab-width 8) + + +;; (autoload 'php-mode "php-mode" "PHP editing mode" t) +;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode)) +;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode)) +;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode)) +;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode)) + +(custom-set-faces + ;; custom-set-faces was added by Custom -- don't edit or cut/paste it! + ;; Your init file should contain only one such instance. + ) + + +;; REFTEX (much enhanced management of cross-ref, labels, etc) +;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/ +(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) +(autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) +(autoload 'reftex-citation "reftex-cite" "Make citation" nil) +(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) +(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode +(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode +(add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode +(add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode + + + + +(defun insert-date () + "Insert date at point." + (interactive) + (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z"))) +(global-set-key "\C-[d" 'insert-date) + +;(iswitchb-default-keybindings) + +(column-number-mode t) +(setq reftex-plug-into-AUCTeX t) + +(gnuserv-start) + +(require 'mode-compile) + +(defadvice server-process-filter (after post-mode-message first activate) + "If the buffer is in post mode, overwrite the server-edit + message with a post-save-current-buffer-and-exit message." + (if (eq major-mode 'post-mode) + (message + (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done.")))) + ; This is also needed to see the magic message. Set to a higher + ; number if you have a faster computer or read slower than me. +'(font-lock-verbose 1000) +;(setq server-temp-file-regexp "mutt\(-\|ng-\)") +(add-hook 'server-switch-hook + (function (lambda() + (cond ((string-match "Post" mode-name) + (post-goto-body))) + set-buffer-file-coding-system 'utf-8 + ))) + + +(add-hook 'post-mode-hook + (auto-fill-mode nil) + ) + +(fset 'insert-function-documentation + [?\C-x ?i home ?\C-k ?/ ?h ?o ?m ?e ?/ ?d ?o ?n ?/ ?l ?i ?b ?/ ?t ?e ?m ?p ?l ?a ?t ?e ?s ?/ ?p ?e ?r ?l ?_ ?f ?u ?n ?c ?t ?i ?o ?n ?_ ?d ?o ?c ?u ?m ?e ?n ?t ?a ?t ?i ?o ?n return]) +(global-set-key "\M-f" 'insert-function-documentation) + +(eval-after-load "lilypond-mode" + '(progn + (load-library "lyqi-mode") + (define-key LilyPond-mode-map "\C-cq" 'lyqi-mode))) + +(desktop-load-default) +(desktop-read)