|
(setq load-path (cons "~/site-lisp" load-path))
(setq load-path (cons "~/site-lisp/GAMES" load-path))
(setq load-path (cons "~/site-lisp/TEST-STUFF/" load-path))
(setq enable-local-eval t)
(set-default-font
"-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1")
(setq scroll-preserve-screen-position t)
(setq-default indent-tabs-mode nil)
(setq abbreviated-home-dir
"/afs/wam.umd.edu/home/wam/j/o/joviedo/home\\(/\\|$\\)")
(setq frame-title-format '("<WAM> " (buffer-file-name " %f")))
(setq mouse-yank-at-point t)
(setq screen-dimensions-25x132 35)
(setq screen-dimensions-44x132 51)
(fset 'yes-or-no-p 'y-or-n-p)
(setq make-backup-files nil)
(condition-case err
(column-number-mode t)
(error
(message "Cannot display Column Number %s" (cdr err))))
(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message "john_doe")
(setq next-line-add-newlines nil)
(setq next-screen-context-lines 3)
(setq blink-matching-paren t)
(setq auto-fill-mode t)
(setq comment-multi-line t)
(setq fill-column 75)
(setq delete-old-versions t)
(setq query-replace-highlight t)
(setq search-highlight t)
(setq scroll-conservatively 5)
(setq scroll-step 1)
(setq-default transient-mark-mode nil)
(setq visible-bell t)
(setq line-number-mode t)
(setq case-fold-search t)
(setq default-mode-line-format
'("-"
mode-line-mule-info
mode-line-modified
mode-line-frame-identification
mode-line-buffer-identification
" "
global-mode-string
" %[(" mode-name mode-line-process minor-mode-alist "%n" ")%]--"
(line-number-mode "L%l--")
(column-number-mode "C%c--")
(-3 . "%p")
"-%-"))
(condition-case err
(show-paren-mode t)
(error
(message "Cannot show parens %s" (cdr err))))
(condition-case err
(display-time)
(error
(message "Cannot display time %s" (cdr err))))
(setq auto-save-timeout 1800)
(setq require-final-newline t)
(setq search-highlight t)
(setq compilation-window-height 12)
(setq compilation-ask-about-save nil)
apropossuper-apropos(setq apropos-do-all t)
(defun c-semi&comma-no-newlines-before-nonblanks ()
(save-excursion
(if (and (eq last-command-char ?\;)
(zerop (forward-line 1))
(not-modified (looking-at "^[ \t]*$")))
'stop
nil)))
(custom-set-variables
'(c-hanging-semi&comma-criteria (quote (c-semi&comma-no-newlines-before-nonblanks c-semi&comma-inside-parenlist))))
(custom-set-faces)
(defconst c-expand-list
'(
("ift" "if() \n{\n\n" (4 9))
("uns" "unsigned ")
("fo" "for(;;) \n{\n\n" (5 7 12))
("switch" "switch() \n{\n\n" (8 13))
("case" "case :\n\nbreak;\n" (6 8 16))
("whi" "while() \n{\n\n" (7 12))
("default" "default:\nbreak;" 10)
("main" "int main(int argc, char * argv[])\n{\n\n\n" 37))
"Expansions for C mode")
(setq auto-mode-alist
(append '(("\\.pl$" . perl-mode)
("\\.prolog$" . c++-mode)
("\\.make$" . makefile-mode)
("\\makefile$" . makefile-mode)
("\\CONFIG$" . makefile-mode)
("\\.m$" . matlab-mode)
("cshrc" . shell-script-mode)
("emacs" . emacs-lisp-mode)
("\\.csh$" . shell-script-mode)
("\\.tar$" . tar-mode)
("\\.java$" . c++-mode)
("\\.c$" . c-mode)
("\\.C$" . c-mode)
("\\.cc$" . c++-mode)
("\\.cpp$" . c++-mode)
("\\.cxx$" . c++-mode)
("\\.CC$" . c++-mode)
("\\.h$" . c-mode)
("\\.H$" . c-mode)
("\\.hpp$" . c++-mode)
("\\.hxx$" . c++-mode)
("\\.hh$" . c++-mode))
auto-mode-alist))
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(setq lazy-lock-defer-on-scrolling t)
(setq auto-mode-alist
(cons '("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode)
auto-mode-alist))
(condition-case err
(resize-minibuffer-mode 1)
(error
(message "Cannot resize minibuffer %s" (cdr err))))
(setq ps-header-lines 3)
(setq ps-paper-type 'ps-a4)
(setq circulate-include "")
(setq font-lock-support-mode '((t . lazy-lock-mode)))
(setq-default font-lock-maximum-size nil)
(setq lazy-lock-defer-on-scrolling t)
(set-face-foreground 'default "white")
(set-face-background 'default "black")
(set-foreground-color "slategray")
(set-background-color "black")
(set-face-foreground 'region "wheat")
(set-face-background 'region "darkslategray")
(set-face-italic-p 'region t)
(set-face-foreground 'highlight "red")
(set-face-background 'highlight "Blue4")
(set-face-foreground 'secondary-selection "yellow")
(set-face-background 'secondary-selection "MidnightBlue")
(set-cursor-color "red")
(set-face-foreground 'modeline "gold")
(set-face-background 'modeline "MidnightBlue")
(set-face-foreground 'show-paren-match-face "white")
(set-face-background 'show-paren-match-face "blueviolet")
(set-face-bold-p 'show-paren-match-face t)
(set-face-foreground 'show-paren-mismatch-face "black")
(set-face-background 'show-paren-mismatch-face "yellow")
(set-face-italic-p 'show-paren-mismatch-face t)
(setq font-lock-face-attributes
'((font-lock-comment-face "SteelBlue" nil nil 1 nil)
(font-lock-string-face "cyan" nil nil 1 nil)
(font-lock-keyword-face "darkorange" nil nil nil nil)
(font-lock-type-face "yellow" nil nil nil nil)
(font-lock-function-name-face "DeepSkyBlue" nil nil nil 1)
(font-lock-variable-name-face "magenta" nil nil nil nil)
(font-lock-reference-face "blue" nil nil nil nil)
(font-lock-builtin-face "lightblue" nil nil nil nil)
(font-lock-constant-face "cornflowerblue" nil nil nil nil)
(font-lock-warning-face "red" nil nil nil nil)))
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)
(autoload 'folding-mode "folding" "Folding mode" t)
(autoload 'turn-off-folding-mode "folding" "Folding mode" t)
(autoload 'turn-on-folding-mode "folding" "Folding mode" t)
(require 'ishl)
(ishl-mode t)
(require 'my-line-number)
(defun my-c-load-stuff ()
(require 'misc-c-functions)
(require 'cc-mode-block-comment)
(require 'get-includes)
(require 'align)
(require 'my-ifdef)
(require 'glasses)
(require 'ctypes)
(setq ctypes-write-types-at-exit t)
(ctypes-read-file "~/site-lisp/_ctypes")
(ctypes-auto-parse-mode 1)
(require 'cwarn)
(global-cwarn-mode 1))
(require 'matlab)
(require 'comment)
(require 'misc)
(defun my-dired-load-stuff ()
(require 'my-dired)
(autoload 'tar-mode "tar-mode")
(require 'dired-tar))
(require 'linemenu)
(defadvice list-buffers (after highlight-line activate)
(save-excursion
(set-buffer "*Buffer List*")
(linemenu-initialize)))
(defadvice electric-buffer-menu-looper (after highlight-line activate)
(linemenu-highlight-current-line))
(add-hook 'dired-after-readin-hook 'linemenu-initialize)
(add-hook 'electric-buffer-menu-hook 'linemenu-initialize)
(require 'mic-paren)
(paren-activate)
(add-hook 'c-mode-common-hook
(function (lambda ()
(paren-toggle-open-paren-context 1))))
(require 'scroll-in-place)
(condition-case err
(require 'auto-show)
(error
(message "Cannot auto-scroll long lines %s" (cdr err))))
(require 'misc-lisp-functions)
(defun my-c-stuff ()
"My own C stuff. Swaps RET and LFD (^J) and customizes
indentation style and dynamic abbrevs."
(modify-syntax-entry ?_ "w")
(c-set-offset 'defun-open 0 nil)
(c-set-offset 'defun-block-intro 3 nil)
(c-set-offset 'statement 0 nil)
(c-set-offset 'statement-block-intro 3 nil)
(c-set-offset 'substatement 3 nil)
(c-set-offset 'statement-case-intro 3 nil)
(c-set-offset 'statement-case-open 3 nil)
(c-set-offset 'inclass 5 nil)
(c-set-offset 'case-label 3 nil)
(c-set-offset 'inline-open 0 nil)
(c-set-offset 'access-label -2 nil)
(c-set-offset 'label 10 nil)
(local-set-key (kbd "TAB") 'indent-or-expand)
(set (make-local-variable 'c-indent-level) 0)
(setq c-electric-pound-behavior '(alignleft))
(setq c-progress-interval 8) (setq c-macro-shrink-window-flag t)
(setq c-macro-prompt-flag t)
(setq c-toggle-auto-state t)
(set (make-local-variable 'dabbrev-case-fold-search) nil)
(set (make-local-variable 'dabbrev-case-replace) nil)
(define-key c-mode-map "\C-c %" 'match-paren)
(define-key c-mode-map "\C-j" 'newline)
(define-key c-mode-map "\C-m" 'newline-and-indent)
(setq c-tab-always-indent t)
(setq c-basic-offset 0)
(setq c-auto-newline t)
(setq c-hanging-braces-alist
'((substatement-open . (before after))
(brace-list-open)
(brace-list-close)
(brace-list-intro)
(brace-entry-open)
(block-close . my-c-snug-do-while))))
(add-hook 'c-mode-common-hook 'my-c-load-stuff)
(add-hook 'c-mode-common-hook 'my-c-stuff)
(add-hook 'c-mode-common-hook 'turn-on-font-lock)
(add-hook 'c-special-indent-hook 'comment-block-close)
(add-hook 'c-mode-hook
(function
(lambda ()
(expand-add-abbrevs c-mode-abbrev-table c-expand-list)
(abbrev-mode 1))))
(add-hook 'c-mode-common-hook
'(lambda ()
(local-set-key "\C-m" 'newline-and-indent)))
(font-lock-add-keywords 'c-mode '(("^#[ ]*define[ ]+\\(\\sw+\\)\\s-*$" 1 font-lock-constant-face)))
(defun my-makefile-stuff ()
"My own makefile-mode"
(setq makefile-tab-after-target-colon t))
(add-hook 'makefile-mode-hook 'my-makefile-stuff)
(add-hook 'makefile-mode-hook 'turn-on-font-lock)
(defun my-perl-stuff ()
"My own Perl-mode."
(setq perl-indent-level 3)
(setq perl-continued-statement-offset 3)
(setq perl-continued-brace-offset -3)
(setq perl-brace-offset 0)
(setq perl-brace-imaginary-offset 0)
(setq perl-label-offset 0)
(setq perl-tab-to-comment t)
(setq perl-tab-always-indent t))
(add-hook 'perl-mode-hook 'my-perl-stuff)
(add-hook 'perl-mode-hook 'turn-on-font-lock)
(defun my-textmode-stuff ()
"My own Text-Mode routine. Customizes dynamic abbrevs."
(set (make-local-variable 'dabbrev-case-fold-search) nil)
(set (make-local-variable 'dabbrev-case-replace) t)
(set (make-local-variable 'dabbrev-upcase-means-case-search) t)
(local-set-key (kbd "TAB") 'indent-or-expand)
(setq fill-column 75))
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'text-mode-hook 'my-textmode-stuff)
(defun my-fundamental-mode ()
"My own fundamental mode stuff."
(set (make-local-variable 'dabbrev-case-fold-search) nil)
(set (make-local-variable 'dabbrev-case-replace) t)
(set (make-local-variable 'dabbrev-upcase-means-case-search) t)
(local-set-key (kbd "TAB") 'indent-or-expand))
(add-hook 'fundamental-mode-hook 'turn-on-auto-fill)
(add-hook 'fundamental-mode-hook 'my-fundamental-mode)
(defun my-elisp-stuff ()
"My own Emacs Lisp stuff. Currently remaps ^J and ^M and customizes
dynamic abbrevs."
(set (make-local-variable 'dabbrev-case-fold-search) nil)
(set (make-local-variable 'dabbrev-case-replace) nil)
(define-key emacs-lisp-mode-map "\C-j" 'newline)
(define-key emacs-lisp-mode-map "\C-m" 'newline-and-indent)
(local-set-key (kbd "TAB") 'indent-or-expand))
(add-hook 'emacs-lisp-mode-hook 'my-elisp-stuff)
(add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
(defun my-matlab-mode ()
"My own matlab-mode stuff"
(local-set-key (kbd "TAB") 'indent-or-expand)
(setq matlab-indent-function t)
(setq matlab-verify-on-save-flag nil)
(setq fill-column 70)
(local-set-key "\C-cc" 'matlab-comment-region)
(local-set-key "\C-cq" 'matlab-uncomment-region))
(add-hook 'matlab-mode-hook 'my-matlab-mode)
(defun my-info-stuff ()
"My own Info stuff. Currently sets faces and some variables."
(set-face-foreground 'info-xref "yellow")
(set-face-background 'info-xref "gray")
(set-face-foreground 'info-node "red")
(set-face-background 'info-node "gray")
(setq automatic-footnotes "On"))
(add-hook 'Info-mode-hook 'my-info-stuff)
(setq auto-mode-alist
(append '(("\\.txh$" . texinfo-mode))
auto-mode-alist))
(defun my-texinfo-stuff ()
"My own Texinfo mode customizations."
(set (make-local-variable 'dabbrev-case-fold-search) nil)
(set (make-local-variable 'dabbrev-case-replace) nil)
(define-key emacs-lisp-mode-map "\C-j" 'newline)
(define-key emacs-lisp-mode-map "\C-m" 'newline-and-indent))
(add-hook 'texinfo-mode-hook 'my-texinfo-stuff)
(add-hook 'texinfo-mode-hook 'turn-on-font-lock)
(add-hook 'change-log-mode-hook 'turn-on-font-lock)
(defun my-ebuf-stuff ()
"My own Electric Buffer Menu stuff. Currently binds some
convenience keys."
(define-key electric-buffer-menu-mode-map [up] 'previous-line)
(define-key electric-buffer-menu-mode-map [down] 'next-line)
(define-key electric-buffer-menu-mode-map [next] 'scroll-up)
(define-key electric-buffer-menu-mode-map [previous] 'scroll-down)
(define-key electric-buffer-menu-mode-map [left] 'scroll-right)
(define-key electric-buffer-menu-mode-map [right] 'scroll-left))
(add-hook 'electric-buffer-menu-mode-hook 'my-ebuf-stuff)
(defun my-compilation-finish-function (buf msg)
"This is called after the compilation exits. Currently just
highlights the compilation messages."
(save-excursion
(set-buffer buf)
(font-lock-fontify-buffer)))
(defun my-compilation-mode-stuff ()
"My own compilation set up"
(setq compilation-finish-function 'my-compilation-finish-function)
(setq compilation-window-height 20)
(setq compilation-ask-about-save t)
(setq compilation-read-command t)
(setq compile-auto-highlight t)
(eetq compile-command "make"))
(add-hook 'compilation-mode-hook 'my-compilation-mode-stuff)
(add-hook 'compilation-mode-hook 'fm-start)
(add-hook 'dired-load-hook 'my-dired-load-stuff)
dired-x.eldiredfind-filedired-x-find-file(add-hook 'dired-load-hook
(function (lambda ()
(setq dired-x-hands-off-my-keys nil)
(load "dired-x")
(setq dired-no-confirm
'(byte-compile chmod compress copy load move
print shell symlink uncompress)))))
(global-set-key "\M-z" (function (lambda () (interactive) (scroll-down 1))))
(global-set-key "\C-z" (function (lambda () (interactive) (scroll-up 1))))
(global-set-key "\C-l" (function (lambda () (interactive) (recenter 5))))
(global-set-key [f1] 'delete-other-windows)
(global-set-key [f2] 'delete-window)
(global-set-key [f3] 'indent-region)
(global-set-key [f4] 'align)
(global-set-key [f5] 'select-all)
(global-set-key [f7] 'my-site-lisp-load)
(global-set-key [f8] 'my-load-DOTemacs)
(global-set-key [home] 'beginning-of-buffer)
(global-set-key [end] 'end-of-buffer)
(global-set-key [DEL] 'delete-char)
(global-set-key [delete] 'delete-char)
(global-unset-key [S-insert])
(global-set-key [S-insert] 'yank-and-indent)
(global-set-key [C-home] 'joc-top-of-page)
(global-set-key [C-end] 'joc-bottom-of-page)
(global-set-key [C-next] 'shrink-window)
(global-set-key [C-backspace] 'backward-kill-word)
(global-set-key [C-delete] 'kill-word)
(global-set-key [C-SPC] 'set-mark-command)
(global-set-key [C-minus] 'undo)
(global-set-key [M-home] 'previous-window)
(global-set-key [M-end] 'other-window)
(global-set-key [M-backspace] 'my-hungry-delete)
(global-set-key [M-kp-divide] 'dabbrev-expand)
(global-unset-key "\C-y")
(global-set-key "\C-y" 'yank-and-indent)
(global-set-key "\C-x\C-s" 'save-buffer)
(global-set-key "\C-x]" 'my-expand-jump-to-next-slot)
(global-set-key "\C-x[" 'my-expand-jump-to-previous-slot)
(global-set-key "\C-t" 'my-toggle-source-header)
(global-set-key "\C-n" 'next-buffer)
(global-set-key "\C-cd" 'dup-line)
(global-set-key "\C-ci" 'ifdef:ifdef-region)
(global-set-key "\C-cn" 'ifdef:ifndef-region)
(global-set-key "\C-ce" 'ifdef:ifdef-else-region)
(global-set-key "\C-cs" 'my-split-different-windows)
(global-set-key "|" 'match-paren)
(global-set-key "\C-cq" 'my-uncomment-and-align)
(global-set-key "\C-cc" 'comment-out-region)
(global-set-key "\C-x\C-k" 'kill-this-buffer)
(global-set-key "\M-l" 'load-library)
(global-set-key "\C-x\C-l" 'goto-line)
(global-set-key "\C-o" 'other-window)
(global-set-key "\M-sr" 'query-replace-regexp)
(global-set-key "\C-b" 'electric-buffer-list)
(global-set-key "\C-xu" 'undo)
(global-set-key "\C-xg" 'goto-line)
(fset 'kill-whole-line [home ?\C-k ?\C-k])
(global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag)
dired-jumpdired-jump-other-windowdired(define-key global-map "\C-x\C-j" 'dired-jump)
(define-key minibuffer-local-isearch-map [up] 'isearch-ring-retreat-edit)
(define-key minibuffer-local-isearch-map [down] 'isearch-ring-advance-edit)
(define-key isearch-mode-map [up] 'isearch-ring-retreat)
(define-key isearch-mode-map [down] 'isearch-ring-advance)
(define-key isearch-mode-map (quote [mouse-2]) 'isearch-yank-kill)
(define-key isearch-mode-map (quote [down-mouse-2]) nil)
saveplace
|
|
|
All content copyright by the contributors. |
Website maintained with
Emacs ,
wsmake and
html-helper-mode |
Emacs community logo by Daniel Lundin |
Last updated on Sat Jan 22 14:49:24 2005
by Ingo Koch |
|
|
|
|