;-*- coding: utf-8 -*- ; Xah Lee's elisp file for loading misc packages. ; 2007-06 ; Xah Lee ; ∑ http://xahlee.org/ ;----------------------------------- ; setting paths, loading modules, setup hooks etc. ;; nxml mode (load "~/Documents/emacs/nxml-mode-20041004/rng-auto.el") (add-to-list 'auto-mode-alist '("\\.xml\\'" . nxml-mode)) (add-to-list 'auto-mode-alist '("\\.kml\\'" . nxml-mode)) ;; template system (add-to-list 'load-path "/Users/xah/Documents/emacs/yasnippet/yasnippet-0.5.6/") (require 'yasnippet) ;; not yasnippet-bundle (yas/initialize) (yas/load-directory "/Users/xah/Documents/emacs/yasnippet/yasnippet-0.5.6/snippets/") ;; pov mode (add-to-list 'load-path "/Users/xah/Documents/emacs/pov-mode-3.2") (autoload 'pov-mode "pov-mode" "PoVray scene file mode" t) (add-to-list 'auto-mode-alist '("\\.pov\\'" . pov-mode)) (add-to-list 'auto-mode-alist '("\\.inc\\'" . pov-mode)) ;; command frequency minor mode (require 'command-frequency) (command-frequency-table-load) (command-frequency-mode 1) (command-frequency-autosave-mode 1) ;; livejournal.com update (add-to-list 'load-path "/Users/xah/Documents/emacs/ljupdate") (require 'ljupdate) ; load unicode data; used by what-cursor-position for showing full unicode info (let ((x "~/Documents/emacs/UnicodeData.txt")) (when (file-exists-p x) (setq describe-char-unicodedata-file x))) ; load lsl mode (Linden Scripting Language) (add-to-list 'load-path "/Users/xah/web/sl/ls") (autoload 'xlsl-mode "lsl-mode_Xah_Lee" "Load a LSL mode." t) (add-to-list 'auto-mode-alist '("\\.lsl\\'" . xlsl-mode)) (autoload 'speck-mode "speck" "Load a spell checking mode." t) ; add command completion to M-! (require 'shell-command "shell-command" t) (shell-command-completion-mode) (autoload 'js2-mode "js2-20080424" "Steve Yegge's javascript mode" t) (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) (add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode)) ;;--------------------------------------------- ;; dictionary (add-to-list 'load-path "/Users/xah/Documents/emacs/dictionary-1.8.7") (autoload 'dictionary-search "dictionary" "Ask for a word and search it in all dictionaries" t) (autoload 'dictionary-match-words "dictionary" "Ask for a word and search all matching words in the dictionaries" t) (autoload 'dictionary-lookup-definition "dictionary" "Unconditionally lookup the word at point." t) (autoload 'dictionary "dictionary" "Create a new dictionary buffer" t) (autoload 'dictionary-mouse-popup-matching-words "dictionary" "Display entries matching the word at the cursor" t) (autoload 'dictionary-popup-matching-words "dictionary" "Display entries matching the word at the point" t) (autoload 'dictionary-tooltip-mode "dictionary" "Display tooltips for the current word" t) (autoload 'global-dictionary-tooltip-mode "dictionary" "Enable/disable dictionary-tooltip-mode for all buffers" t) ;;------------------------- ; load hexcolour minor mode ;(setq load-path (cons "/Users/xah/Documents/emacs" load-path)) ;(autoload 'hexcolour-mode "hexcolour" nil t nil) ; (add-hook 'html-mode 'css-mode (lambda () (hexcolour-mode 1))) ;(add-hook 'html-mode-hook 'php-mode) ;(remove-hook 'html-mode-hook 'php-mode) ;; the emacs interface to text-based web browser (add-to-list 'load-path "~/Documents/emacs/emacs-w3m-1.4.4") (require 'w3m-load) ;; Steve Yegge's javascript interpreter (add-to-list 'load-path "~/Documents/emacs/ejacs-11-27-08") (autoload 'js-console "js-console" nil t)