Created
June 16, 2011 15:43
-
-
Save johnfredcee/1029534 to your computer and use it in GitHub Desktop.
Dell Box Dot Emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'color-theme) | |
(require 'mirror-mode) | |
(require 'python) | |
(require 'dired-aux) | |
(require 'yasnippet) | |
(require 'dedicated) | |
(require 'winner) | |
(require 'thingatpt) | |
(require 'doxygen) | |
(require 'etags-select) | |
(require 'clojure-mode) | |
(require 'ibuffer) | |
(require 'doc-mode) | |
(require 'tramp) | |
(require 'mudel) | |
(require 'ack-emacs) | |
(require 'unrealscript-mode) | |
(require 'browse-kill-ring) | |
(setenv "PATH" (concat (getenv "PATH") path-separator "C:\\Python26\\")) | |
;; yasnippet | |
(yas/initialize) | |
(yas/load-directory "C:\\Program Files\\Emacs\\site-lisp\\yasnippet-0.5.10\\snippets\\") | |
;; autocomplete | |
(add-to-list 'load-path "C:/Program Files/Emacs/site-lisp/auto-complete-1.2/") | |
(require 'auto-complete-config) | |
(add-to-list 'ac-dictionary-directories "C:/Program Files/Emacs/site-lisp/auto-complete-1.2/ac-dict") | |
(ac-config-default) | |
(load-file "c:\\Program Files\\Emacs\\site-lisp\\sourcepair.el") | |
(tool-bar-mode 0) | |
(setq frame-title-format "Emacs: %b (%m)") | |
(setq visible-bell 't) | |
(color-theme-initialize) | |
(color-theme-comidia) | |
(setq search-highlight t ;; highlight when searching... | |
query-replace-highlight t) ;; ...and replacing | |
(global-hl-line-mode) | |
(global-auto-revert-mode) | |
(transient-mark-mode) | |
(put 'upcase-region 'disabled nil) | |
(winner-mode 1) | |
(add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) | |
(add-to-list 'auto-mode-alist '("\\.inl$" . c++-mode)) | |
(add-to-list 'auto-mode-alist '("\\.xrc$" . xml-mode)) | |
(add-to-list 'auto-mode-alist '("SConscript" . python-mode)) | |
(add-to-list 'auto-mode-alist '("SConstruct" . python-mode)) | |
(add-to-list 'auto-mode-alist '("\\.d\\'" . c-mode)) | |
(add-to-list 'auto-mode-alist '("\\.asd\\'" . lisp-mode)) | |
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode)) | |
(autoload 'lua-mode "lua-mode" "Lua editing mode." t) | |
(add-to-list 'auto-mode-alist '("\\.uc$" . unrealscript-mode)) | |
(add-hook 'term-setup-hook 'ido-mode) | |
;; ===================================================================== | |
;; Redefine the window key on w32 | |
(setq w32-lwindow-modifier 'super) | |
(setq w32-pass-lwindow-to-system nil) | |
(setq w32-rwindow-modifier 'super) | |
(setq w32-pass-rwindow-to-system nil) | |
(setq w32-pass-alt-to-system nil) | |
(setq w32-alt-is-meta 'meta) | |
(windmove-default-keybindings 'super) | |
;; this pisses me off to no end, unbind it | |
(global-unset-key "\C-\\") | |
(global-set-key [f7] 'recompile) | |
(global-set-key [(meta f7)] 'compile) | |
;; overload search on k3 (shift=backward, meta=regexp) | |
(global-set-key [(f3)] 'search-forward) | |
(global-set-key [(shift f3)] 'search-backward) | |
(global-set-key [(meta f3)] 'search-forward-regexp) | |
(global-set-key [(shift meta f3)] 'search-backward-regexp) | |
(defun symbol-forward () (interactive) (forward-symbol 1)) | |
(defun symbol-backward () (interactive) (forward-symbol -1)) | |
;; overload replacement on k4 (meta == regexp, control = query) | |
(global-set-key [(f4)] 'replace-string) | |
(global-set-key [(control f4)] 'query-replace) | |
(global-set-key [(meta f4)] 'replace-regexp) | |
(global-set-key [(control meta f4)] 'query-replace-regexp) | |
;; window manipulation shouldn't need the mouse | |
(global-set-key [(meta kp-add)] 'enlarge-window) | |
(global-set-key [(meta kp-subtract)] 'shrink-window) | |
(global-set-key [(control meta kp-subtract)] 'copy-to-register) | |
(global-set-key [(control meta kp-add)] 'insert-register) | |
;; useful shortcut for mass commenting | |
(global-set-key [(meta ?\#)] 'comment-region) | |
(global-set-key [(control meta ?\#)] 'uncomment-region) | |
(global-set-key [(meta return)] 'yas/expand) | |
(global-set-key [(shift f11)] 'doxygen-insert-comment) | |
(global-set-key [(f11)] 'doxygen-insert-function-comment) | |
(global-set-key [(meta f11)] 'doxygen-insert-file-comment) | |
(global-set-key [f12] 'ibuffer) | |
(global-set-key [(meta f12)] 'list-bookmarks) | |
(global-set-key [(control meta e)] 'compilation-minor-mode) | |
;; recursive search and replace | |
(autoload 'findr "findr" "Find file name." t) | |
(global-set-key [(meta control S)] 'findr) | |
(autoload 'findr-search "findr" "Find text in files." t) | |
(global-set-key [(meta control s)] 'findr-search) | |
(autoload 'findr-query-replace "findr" "Replace text in files." t) | |
(global-set-key [(meta control r)] 'findr-query-replace) | |
(global-set-key [(meta control l)] 'tags-loop-continue) | |
;; lets have a peepshow | |
(set-frame-parameter (selected-frame) 'alpha 92) | |
(setenv "PATH" (concat "C:\\Program Files\\Emacs\\EmacsW32\\gnuwin32\\bin" path-separator (getenv "PATH"))) | |
(defun astyle-buffer () | |
(interactive) | |
(save-excursion | |
(shell-command-on-region (point-min) (point-max) | |
"astyle --unpad-paren --brackets=linux --keep-one-line-blocks --delete-empty-lines --indent=force-tab=4 --indent-switches --indent-cases --indent-namespaces" ;; add options here... | |
(current-buffer) t | |
(get-buffer-create "*Astyle Errors*") t))) | |
(defun tag-c++ () | |
(interactive) | |
(shell-command | |
(concat | |
"dir /b /s *.cpp *.h *.cxx *.hpp | ectags --verbose -e -o TAGS --language-force=c++ --c++-kinds=cfnstunedm --extra=+q --options=\"" (expand-file-name "~/ectags.cnf") "\" -L -")) | |
(visit-tags-table "TAGS")) | |
(defun tag-c () | |
(interactive) | |
(shell-command | |
(concat | |
"dir /b /s *.c *.h | ectags --verbose -e -o TAGS --language-force=c --c-kinds=cfnstunedm --options=\"" (expand-file-name "~/ectags.cnf") "\" -L -")) | |
(visit-tags-table "TAGS")) | |
(defun tag-headers () | |
(interactive) | |
(shell-command | |
(concat | |
"dir /b /s *.h *.hxx *.hpp | ectags --verbose -e -o TAGS --c-kinds=+pxd --c++-kinds=+pxd --extra=+q --options=\"" (expand-file-name "~/ectags.cnf") "\" -L -")) | |
(visit-tags-table "TAGS")) | |
(defun tag-python () | |
(interactive) | |
(shell-command | |
(concat | |
"dir /b /s *.py | ectags --verbose -e -o TAGS --language-force=python --options=\"" (expand-file-name "~/ectags.cnf") "\" -L -")) | |
(visit-tags-table "TAGS")) | |
(defun emergency-exit () | |
"Emergency exit when semantic goes pop!" | |
(interactive) | |
(semantic-mode 0) | |
(remove-hook 'kill-emacs-hook 'semantic-db-kill-emacs-hook t) | |
(save-buffers-kill-terminal)) | |
;; should be able to dedicate compile | |
(defun toggle-current-window-dedication () | |
(interactive) | |
(let* ((window (selected-window)) | |
(dedicated (window-dedicated-p window))) | |
(set-window-dedicated-p window (not dedicated)) | |
(message "Window %sdedicated to %s" | |
(if dedicated "no longer " "") | |
(buffer-name)))) | |
(global-set-key [pause] 'toggle-current-window-dedication) | |
;; zap shouldn't be greedy ------------------------------------- | |
(defun zap-upto-char (arg char) | |
"Kill up to but not including ARG'th occurrence of CHAR. | |
Case is ignored if `case-fold-search' is non-nil in the current buffer. | |
Goes backward if ARG is negative; error if CHAR not found." | |
(interactive "p\ncZap upto char: ") | |
(if (char-table-p translation-table-for-input) | |
(setq char (or (aref translation-table-for-input char) char))) | |
(kill-region (point) | |
(progn | |
(search-forward (char-to-string char) nil nil arg) | |
(if (minusp arg) | |
(forward-char 1) | |
(backward-char 1)) | |
; (goto-char (if (> arg 0) (1- (point)) (1+ (point)))) | |
(point)))) | |
(global-set-key [(meta z)] 'zap-upto-char) | |
;; syntax deletion based on thingatpt | |
(defun syntax-forward-syntax (&optional arg) | |
"Move ARG times to start of a set of the same syntax characters." | |
(setq arg (or arg 1)) | |
(while (and (> arg 0) | |
(not (eobp)) | |
(skip-syntax-forward (string (char-syntax (char-after))))) | |
(setq arg (1- arg))) | |
(while (and (< arg 0) | |
(not (bobp)) | |
(skip-syntax-backward (string (char-syntax (char-before))))) | |
(setq arg (1+ arg)))) | |
(put 'syntax 'forward-op 'syntax-forward-syntax) | |
(defun syntax-backward-syntax (&optional arg) | |
"Move ARG times to end of a set of the same syntax characters." | |
(syntax-forward-syntax (- (or arg 1)))) | |
(defun syntax-syntax-at-point () | |
(thing-at-point 'syntax)) | |
(defun syntax-beginning-of-syntax () | |
(beginning-of-thing 'syntax)) | |
(defun syntax-end-of-syntax () | |
(end-of-thing 'syntax)) | |
(defun syntax-bounds-of-syntax-at-point () | |
(bounds-of-thing-at-point 'syntax)) | |
(defun kill-syntax (&optional arg) | |
"Kill ARG sets of syntax characters after point." | |
(interactive "p") | |
(let ((opoint (point))) | |
(syntax-forward-syntax arg) | |
(kill-region opoint (point)))) | |
(defun kill-syntax-backward (&optional arg) | |
"Kill ARG sets of syntax characters preceding point." | |
(interactive "p") | |
(kill-syntax (- (or arg 1)))) | |
(defun forward-syntax () | |
(interactive) | |
(syntax-forward-syntax 1)) | |
(defun backward-syntax () | |
(interactive) | |
(syntax-backward-syntax 1)) | |
(global-set-key [(control delete)] 'kill-syntax) | |
(global-set-key [(meta control delete)] 'kill-syntax-backward) | |
(global-set-key [(control right)] 'forward-syntax) | |
(global-set-key [(control left)] 'backward-syntax) | |
;; -- formatting a buffer should be quickn easy ------------------------------------- | |
(defun indent-buffer() | |
"Indent the whole buffer from point-min to point-max using | |
the command indent-region" | |
(interactive) | |
(indent-region 0 (point-max) nil) | |
(whitespace-cleanup-region 0 (point-max))) | |
(global-set-key [f8] 'indent-buffer) | |
(global-set-key [(meta f8)] 'astyle-buffer) | |
;; -- TAG POINT STACK ------------------------------------------------------------ | |
(defun bury-buffer-and-tag () | |
"Push current location and buffer info onto tag ring, bury buffer, close its window." | |
(interactive) | |
(message "Location marked.") | |
(ring-insert find-tag-marker-ring (point-marker)) | |
(bury-buffer)) | |
(defun bury-window-and-buffer-and-tag () | |
"Push current location and buffer info onto tag ring, bury buffer, close its window." | |
(interactive) | |
(message "Location marked.") | |
(ring-insert find-tag-marker-ring (point-marker)) | |
(bury-buffer) | |
(delete-window)) | |
(global-set-key [(super 0)] 'bury-buffer-and-tag) | |
(global-set-key [(meta .)] 'etags-select-find-tag) | |
(global-set-key [(meta ,)] 'pop-tag-mark) | |
(global-set-key [(meta \?)] 'tags-search) | |
(global-set-key [(shift meta \?)] 'tags-loop-continue) | |
;; C++ ------------------------------------- | |
;; cc-mode | |
(require 'cc-mode) | |
(defconst c++-keywords | |
(sort | |
(list "and" "bool" "compl" "do" "export" "goto" "namespace" "or_eq" "return" | |
"struct" "try" "using" "xor" "and_eq" "break" "const" "double" "extern" | |
"if" "new" "private" "short" "switch" "typedef" "virtual" "xor_eq" "asm" | |
"case" "const_cast" "dynamic_cast" "false" "inline" "not" "protected" | |
"signed" "template" "typeid" "void" "auto" "catch" "continue" "else" | |
"float" "int" "not_eq" "public" "sizeof" "this" "typename" "volatile" | |
"bitand" "char" "default" "enum" "for" "long" "operator" "register" | |
"static" "throw" "union" "wchar_t" "bitor" "class" "delete" "explicit" | |
"friend" "mutable" "or" "reinterpret_cast" "static_cast" "true" | |
"unsigned" "while" ) #'(lambda (a b) (> (length a) (length b))))) | |
(defvar ac-source-c++-keywords | |
'((candidates | |
. (lambda () | |
(all-completions ac-target c++-keywords)))) | |
"Source for c++ keywords.") | |
(autoload 'expand-member-functions "member-functions" "Expand C++ member function declarations" t) | |
(defconst playbox-c-style | |
;; Always indent c/c++ sources, never insert tabs | |
'((c-tab-always-indent . t) | |
;; Offset for line only comments | |
(c-basic-offset . 4) | |
(c-comment-only-line-offset . 0) | |
;; Controls the insertion of newlines before and after braces. | |
(c-hanging-braces-alist . ((substatement-open after) | |
(brace-list-open) | |
(defun-open))) | |
;; Controls the insertion of newlines before and after certain colons. | |
(c-hanging-colons-alist . ((member-init-intro before) | |
(inher-intro) | |
(case-label after) | |
(label after) | |
(access-label after))) | |
;; List of various C/C++/ObjC constructs to "clean up". | |
(c-cleanup-list . (scope-operator | |
empty-defun-braces | |
defun-close-semi)) | |
;; Association list of syntactic element symbols and indentation offsets. | |
(c-offsets-alist . ((arglist-close . c-lineup-arglist) | |
(substatement-open . 0) | |
(namespace-open . 0) | |
(case-label . +) | |
(block-open . 0) | |
(inline-open . 0) | |
(access-label . -) | |
(label . 0) | |
(knr-argdecl-intro . -))) | |
(c-echo-syntactic-information-p . t)) | |
"Playbox C/C++ Programming Style") | |
(c-add-style "playbox" playbox-c-style) | |
;; assume filename is same as classname | |
(defun get-class-name () | |
(file-name-nondirectory (file-name-sans-extension buffer-file-name))) | |
;; insert it interactively | |
(defun insert-class-name () | |
(interactive) | |
(insert (get-class-name))) | |
(defun c-file-enter () | |
"Expands all member functions in the corresponding .h file" | |
(interactive) | |
(let ((c-file (buffer-name)) | |
(h-file (concat (substring (buffer-name (current-buffer)) 0 -3 ) "h"))) | |
(if (equal (substring (buffer-name (current-buffer)) -4 ) ".cpp") | |
(if (file-exists-p h-file) | |
(expand-member-functions h-file c-file))))) | |
(defun h-file-create () | |
"Create a new h file. Insert a infdef/define/endif block" | |
(interactive) | |
(if (or (equal (substring (buffer-name (current-buffer)) -2 ) ".h") | |
(equal (substring (buffer-name (current-buffer)) -4 ) ".hpp")) | |
(if (equal "" (buffer-string)) | |
(insert "#ifndef "(upcase (substring (buffer-name (current-buffer)) 0 -2)) "_H\n#define " | |
(upcase (substring (buffer-name (current-buffer)) 0 -2)) "_H\n\n#endif")))) | |
(defun forward-c-token () | |
(c-forward-token-2 1)) | |
(defun backward-c-token () | |
(c-forward-token-2 1)) | |
(add-hook 'c-mode-common-hook | |
(lambda () | |
(auto-revert-mode 1) | |
(semantic-mode 1) | |
(setq case-fold-search nil) | |
(mirror-mode 1) | |
(local-set-key [(meta right)] 'forward-c-token) | |
(local-set-key [(meta left)] 'backward-c-token) | |
;; this pisses me off to no end, unbind it | |
(global-unset-key "\C-\\") | |
(c-set-style "playbox") | |
;; Do not check for old-style (K&R) function declarations; | |
;; this speeds up indenting a lot. | |
(setq c-recognize-knr-p nil) | |
(setq c-basic-offset 4) | |
(doc-mode 1) | |
(setq dabbrev-case-fold-search nil) | |
(setq dabbrev-case-replace nil) | |
(setq dabbrev-case-distinction nil) | |
(local-set-key [(meta f11)] 'doc-mode-fix-tag-doc) | |
(local-set-key [(control c) t] 'sourcepair-load) | |
(h-file-create))) | |
(defun c-wx-lineup-topmost-intro-cont (langelem) | |
(save-excursion | |
(beginning-of-line) | |
(if (re-search-forward "EVT_" (line-end-position) t) | |
'c-basic-offset | |
(c-lineup-topmost-intro-cont langelem)))) | |
(add-to-list 'c++-font-lock-extra-types | |
"\bwx[A-Z][a-z][a-zA-Z]*?\b" "\bSo[A-Z][a-z][a-zA-Z]*?\b") | |
(add-hook 'c++-mode-hook | |
(lambda () | |
(semantic-mode 1) | |
(auto-revert-mode 1) | |
(c-set-style "playbox") | |
(mirror-mode 1) | |
(setq case-fold-search t) | |
;; this pisses me off to no end, unbind it | |
(global-unset-key "\C-\\") | |
(setq dabbrev-case-fold-search nil) | |
(setq dabbrev-case-replace nil) | |
(setq dabbrev-case-distinction nil) | |
(local-set-key [(meta right)] 'forward-c-token) | |
(local-set-key [(meta left)] 'backward-c-token) | |
;; automatic indent on return in cc-mode | |
(local-set-key "\r" 'newline-and-indent) | |
(local-set-key [(meta ?#)] 'insert-class-name) | |
;; Do not check for old-style (K&R) function declarations; | |
;; this speeds up indenting a lot. | |
(setq c-recognize-knr-p nil) | |
(setq c-basic-offset 4) | |
(doc-mode 1) | |
(local-set-key [(control c) t] 'sourcepair-load) | |
(local-set-key [(meta f11)] 'doc-mode-fix-tag-doc) | |
(h-file-create) | |
(c-set-offset 'topmost-intro-cont 'c-wx-lineup-topmost-intro-cont))) | |
;; PYTHON ------------------------------------- | |
(defconst python-keywords | |
(sort | |
(list | |
"and" "del" "for" "is" "raise" | |
"assert" "elif" "from" "lambda" "return" | |
"break" "else" "global" "not" "try" | |
"class" "except" "if" "or" "while" | |
"continue" "exec" "import" "pass" "yield" | |
"def" "finally" "in" "print" ) #'(lambda (a b) (> (length a) (length b))))) | |
(defvar ac-source-python-keywords | |
'((candidates | |
. (lambda () | |
(all-completions ac-target python-keywords)))) | |
"Source for python keywords.") | |
(add-hook 'python-mode-hook | |
'(lambda () | |
(auto-revert-mode 1) | |
(mirror-mode 1) | |
(setq tab-width 4) | |
(setq python-indent 4) | |
(whitespace-mode) | |
(local-set-key "\C-m" 'newline-and-indent) | |
(setq-default ac-sources | |
'(ac-source-python-keywords ac-source-words-in-all-buffer)))) | |
;; UDK --------------------------------------------------------- | |
(defcustom udk-location "C:\\\\UDK\\\\UDK-2010-11\\\\" | |
"Directory where udk executables are found" | |
:type 'directory | |
:group 'udk) | |
(defcustom udk-map "JungleJaunt" | |
"Name of the map to launch the Unreal game with" | |
:type 'string | |
:group 'udk) | |
(defcustom udk-game "DogTags.DogTagsGame" | |
"Name of the Game Info Class in Unrealscript that runs the game" | |
:type 'string | |
:group 'udk) | |
(defun walk-path (dir action) | |
"walk DIR executing ACTION with (dir file)" | |
(cond ((file-directory-p dir) | |
(or (char-equal ?/ (aref dir(1- (length dir)))) | |
(setq dir (file-name-as-directory dir))) | |
(let ((lst (directory-files dir nil nil t)) | |
fullname file) | |
(while lst | |
(setq file (car lst)) | |
(setq lst (cdr lst)) | |
(cond ((member file '("." ".."))) | |
(t | |
(and (funcall action dir file) | |
(setq fullname (concat dir file)) | |
(file-directory-p fullname) | |
(walk-path fullname action))))))) | |
(t | |
(funcall action | |
(file-name-directory dir) | |
(file-name-nondirectory dir))))) | |
;; (defun walk-path-visitor (dir file) | |
;; "Called by walk-path for each file found" | |
;; (message (concat dir file))) | |
;; (walk-path "~/" 'walk-path-visitor) | |
(defvar udk-executable | |
(concat udk-location "Binaries\\UDK.exe")) | |
;; (defvar visit-unrealscript-file (dir file) | |
;; (let ((extension (substring file (length (file-name-sans-extension file))))) | |
;; (when (string= ".uc" extension) | |
;; (find-file-noselect (concat dir file))))) | |
(defun udk-build () | |
(interactive) | |
(shell-command (concat udk-executable " make -debug"))) | |
(defun udk-rebuild () | |
(interactive) | |
(shell-command (concat udk-executable " make -debug -full"))) | |
(defun udk-release () | |
(interactive) | |
(shell-command (concat udk-executable " make -full"))) | |
(defun udk-debug () | |
(interactive) | |
(shell-command (concat udk-executable (format " %s?%s -vadebug -nomoviestartup -ConsolePosX=0 -ConsolePosY=0" udk-map udk-game)))) | |
(defun udk-edit () | |
(interactive) | |
(shell-command (concat udk-executable " editor " (format "%s.upk" udk-map)))) | |
(defun load-udk-tags () | |
(interactive) | |
(visit-tags-table (concat udk-location "Development\\Src\\TAGS"))) | |
(defconst unrealscript-keywords | |
(sort | |
(list | |
"abstract" "always" "array" "arraycount" "assert" | |
"auto" "automated" "bool" "break" "button" | |
"byte" "case" "class" "coerce" "collapsecategories" | |
"config" "const" "continue" "default" "defaultproperties" | |
"delegate" "dependson" "deprecated" "do" "dontcollapsecategories" | |
"edfindable" "editconst" "editconstarray" "editinline" "editinlinenew" | |
"editinlinenotify" "editinlineuse" "else" "enum" "enumcount" | |
"event" "exec" "expands" "export" "exportstructs" | |
"extends" "false" "final" "float" "for" | |
"foreach" "function" "global" "globalconfig" "goto" | |
"guid" "hidecategories" "if" "ignores" "import" | |
"init" "input" "insert" "instanced" "int" | |
"intrinsic" "invariant" "iterator" "latent" "length" | |
"local" "localized" "name" "native" "nativereplication" | |
"new" "noexport" "none" "noteditinlinenew" "notplaceable" | |
"nousercreate" "operator" "optional" "out" "perobjectconfig" | |
"placeable" "pointer" "postoperator" "preoperator" "private" | |
"protected" "reliable" "remove" "replication" "return" | |
"rng" "rot" "safereplace" "self" "showcategories" | |
"simulated" "singular" "skip" "state" "static" | |
"stop" "string" "struct" "super" "switch" | |
"transient" "travel" "true" "unreliable" "until" | |
"var" "vect" "while" "within") #'(lambda (a b) (> (length a) (length b)))) | |
"Source for unrealscript keywords.") | |
(defvar ac-source-unrealscript-keywords | |
'((candidates | |
. (lambda () | |
(all-completions ac-target unrealscript-keywords)))) | |
(add-hook 'unrealascript-mode-hook | |
(lambda () | |
(mirror-mode 1) | |
(setq ac-sources '(ac-source-unrealscript-keywords ac-source-words-in-same-mode-buffers ac-source-etags)) | |
(auto-complete-mode 1) | |
;; (yas/minor-mode-on) when we try adding snippets | |
(c-set-style "unrealscript")))) | |
(defvar ack-search-history nil) | |
(defun ack-udk (pattern) | |
(interactive "MSearch for: ") | |
(ack udk-location pattern "--nogroup --nocolor -i --unrealscript")) | |
(defun tag-unrealscript () | |
(interactive) | |
(shell-command | |
(concat | |
"dir /b /s *.uc | ectags --verbose -e -o TAGS --options=\"" (expand-file-name "~/ectags.cnf") "\" --language-force=unrealscript -L -")) | |
(visit-tags-table "TAGS")) | |
;; -- BACKUPS -------------------------------------------------------- | |
;; Put autosave files (ie #foo#) in one place, *not* | |
;; scattered all over the file system! | |
(defvar autosave-dir (expand-file-name "~/emacs.auto/")) | |
(make-directory autosave-dir t) | |
(defun auto-save-file-name-p (filename) | |
(string-match "^#.*#$" (file-name-nondirectory filename))) | |
(defun make-auto-save-file-name () | |
(concat autosave-dir | |
(if buffer-file-name | |
(concat "#" (file-name-nondirectory buffer-file-name) "#") | |
(expand-file-name | |
(concat "#%" (buffer-name) "#"))))) | |
;; Put backup files (ie foo~) in one place too. (The backup-directory-alist | |
;; list contains regexp=>directory mappings; filenames matching a regexp are | |
;; backed up in the corresponding directory. Emacs will mkdir it if necessary.) | |
(defvar backup-dir (expand-file-name "~/emacs.bak/")) | |
(setq backup-directory-alist (list (cons "." backup-dir))) | |
;; -- BLUE --------------------------------------------------------- | |
(defvar *blue-source-dir* "\\Users\\john.connors\\Documents\\Visual Studio 2008\\Projects\\blue_source") | |
(defvar *cyan-source-dir* "\\Users\\john.connors\\Documents\\Visual Studio 2008\\Projects\\cyan_source") | |
(defvar *blue-tags-loaded* nil) | |
(defvar *cyan-tags-loaded* nil) | |
(defvar *fbx-tags-loaded* nil) | |
(defun load-blue-tags () | |
(interactive) | |
(unless *blue-tags-loaded* | |
(progn | |
(visit-tags-table "c:/Users/john.connors/Documents/Visual Studio 2008/Projects/blue_source/TAGS") | |
(tags-completion-table) | |
(setq *blue-tags-loaded* t)))) | |
(defun load-cyan-tags () | |
(interactive) | |
(unless *cyan-tags-loaded* | |
(progn | |
(visit-tags-table "c:/Users/john.connors/Documents/Visual Studio 2008/Projects/cyan_source/TAGS") | |
(tags-completion-table) | |
(setq *cyan-tags-loaded* t)))) | |
(defun load-tool-tags () | |
(interactive) | |
(unless *fbx-tags-loaded* | |
(progn | |
(visit-tags-table "c:/Users/john.connors/Documents/Visual Studio 2008/Projects/libraries/FBX/FbxSdk/TAGS") | |
(visit-tags-table "c:/Users/john.connors/Documents/Visual Studio 2008/Projects/libraries/wxMSW-2.9.0/TAGS") | |
(tags-completion-table) | |
(setq *fbx-tags-loaded* t)))) | |
;; SLIME | |
(add-to-list 'load-path "C:/Program Files/Emacs/site-lisp/slime/") ; your SLIME directory | |
;(setq inferior-lisp-program "C:/sbcl/sbcl.exe --core C:/sbcl/sbcl.core --sysinit C:/sbcl/sbclrc" | |
(setq inferior-lisp-program "C:/lisp/ccl/wx86cl.exe -l C:/lisp/ccl/cclrc.lisp") | |
(defun use-okra () | |
(interactive) | |
(setq inferior-lisp-program "C:/wsr/local/projects/okra-20090910/okra-ccl.exe")) | |
;(setq inferior-lisp-program "clisp -i C:/clisp/.clisprc") | |
(require 'slime) | |
(slime-setup '(slime-fancy slime-asdf slime-banner)) | |
;; -- ACTIONSCRIPT -------------------------------------------------------- | |
(require 'actionscript-mode) | |
;; -- CUSTOM -------------------------------------------------------- | |
(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. | |
'(ac-auto-start 4) | |
'(ac-dwim t) | |
'(auto-save-default nil) | |
'(auto-save-interval 0) | |
'(auto-save-timeout 0) | |
'(clojure-src-root "c:/lisp") | |
'(column-number-mode t) | |
'(compilation-window-height 16) | |
'(confirm-kill-emacs (quote y-or-n-p)) | |
'(cua-mode t nil (cua-base)) | |
'(delete-auto-save-files t) | |
'(display-time-mode nil) | |
'(etags-select-use-short-name-completion t) | |
'(global-auto-complete-mode nil) | |
'(ibuffer-saved-filter-groups (quote (("C/C++" (or (mode . c++-mode) (mode . c-mode)))))) | |
'(inhibit-startup-screen t) | |
'(python-python-command "\\\\Python26\\\\python.exe") | |
'(rcirc-default-full-name "John Connors") | |
'(rcirc-default-nick "ZabaQ") | |
'(rcirc-default-user-name "johnc") | |
'(scroll-conservatively 1) | |
'(scroll-preserve-screen-position 1) | |
'(semantic-default-submodes (quote (global-semanticdb-minor-mode))) | |
'(semanticdb-persistent-path (quote (never))) | |
'(semanticdb-project-roots (quote ("W:\\\\"))) | |
'(show-paren-mode t) | |
'(size-indication-mode t) | |
'(sourcepair-header-path (quote ("." ".." "../include" "./include"))) | |
'(sourcepair-source-path (quote ("." ".." "./src" "../src"))) | |
'(special-display-regexps (quote ("\"[ ]?[*][^*]+[*]\""))) | |
'(split-height-threshold 8) | |
'(split-width-threshold 320) | |
'(split-window-preferred-function nil) | |
'(tab-width 4) | |
'(tags-add-tables t) | |
'(uniquify-buffer-name-style (quote forward) nil (uniquify)) | |
'(use-file-dialog nil) | |
'(user-full-name "John Connors") | |
'(user-mail-address "[email protected]") | |
'(vc-handled-backends nil)) | |
(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. | |
'(default ((t (:inherit nil :stipple nil :background "black" :foreground "peachpuff" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 82 :width normal :foundry "outline" :family "Consolas"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment