rendered paste body; This file is needed to activate the dark function keys ie. arrow keys.
; for moreinfo. see "vt200.el".
; (load-file "/usr/share/emacs/21.4/lisp/term/vt200.el")
(setq x-display-color-p 1)
;Keep last 3 versions and first 2 versions
(setq version-control t)
(setq kept-new-versions 3)
(setq kept-old-versions 2)
(setq vc-handle-cvs nil)
;Language support
(setq auto-mode-alist
(append
'(("\\.ftn$" . fortran-mode)
("\\.for$" . fortran-mode)
("\\.F$" . fortran-mode)
("\\.inc$" . fortran-mode)
("\\.pfp$" . fortran-mode)
("\\.car$" . fortran-mode)
("\\.edt$" . fortran-mode)
("\\.temp$" . fortran-mode)
("\\.lex$" . c-mode)
("\\.C$" . c++-mode)
("\\.cc$" . c++-mode)
("\\.h$" . c++-mode)
("\\.cxx$" . c++-mode)
("\\.html$" . html-mode)
)
auto-mode-alist))
;Scroll off window gracefully
(setq scroll-step 5)
;
(global-set-key [c-h] 'help-for-help) ; help
(global-set-key [menu] 'execute-extended-command) ; do
(global-set-key [f1] 'delete-other-windows) ; F1
(global-set-key [f2] 'split-window-vertically) ; F2
(global-set-key [f3] 'other-window) ; F3
(global-set-key [f4] 'split-window-horizontally); F4
(global-set-key [f5] 'forward-word) ; F5
(global-set-key [f6] 'beginning-of-buffer) ; F6
(global-set-key [f7] 'end-of-buffer) ; F7
(global-set-key [f8] 'backward-kill-word) ; F8
(global-set-key [f9] 'fill-paragraph) ; F9
(global-set-key [f10] 'save-buffers-kill-emacs) ; F10
(global-set-key [f14] 'repeat-complex-command) ; F14
(global-set-key [f17] 'downcase-word) ; F17
(global-set-key [f18] 'upcase-word) ; F18
;
(global-set-key [find] 'search-forward) ; find
(global-set-key [insert] 'yank) ; insert
(global-set-key [insertchar] 'yank) ; insert
(global-set-key [remove] 'kill-region) ; remove
(global-set-key [deletechar] 'kill-region) ; remove
(global-set-key [select] 'set-mark-command) ; select
(global-set-key [prior] 'scroll-down) ; prev screen
(global-set-key [next] 'scroll-up) ; next screen
;
; duplicate some useful commands on the numeric keypad
;
(global-set-key [kp-f1] 'delete-other-windows) ; PF1
(global-set-key [kp-f2] 'split-window-vertically) ; PF2
(global-set-key [kp-f3] 'other-window) ; PF3
(global-set-key [kp-f4] 'split-window-horizontally) ; PF4
(global-set-key [kp-f5] 'forward-word) ; PF5
(global-set-key [kp-f7] 'find-file-other-window) ; KP7
(global-set-key [kp-1] 'query-replace) ; KP1
(global-set-key [kp-2] 'occur) ; KP2
(global-set-key [kp-3] 'what-line) ; KP3
(global-set-key [LFD] 'backward-kill-word) ; CTRL-J
(global-set-key [C-xj] 'fill-paragraph) ; ^X-j
; duplicate some useful commands on the numeric keypad
;
(global-set-key [kp-1] 'query-replace) ; KP1
(global-set-key [kp-2] 'what-line) ; KP2
(global-set-key [kp-3] 'what-cursor-position) ; KP3
(global-set-key [kp-4] 'goto-line) ; KP4
(global-set-key [kp-5] 'occur) ; KP5
(global-set-key [kp-6] 'exchange-point-and-mark) ; KP6
(global-set-key [kp-7] 'search-forward) ; KP7
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(if (eq window-system 'x)
(progn
(transient-mark-mode t)
(if (fboundp 'what\ line) (fmakunbound 'what\ line))
(if (fboundp 'set\ cursor\ free) (fmakunbound 'set\ cursor\ free))
(if (fboundp 'set\ cursor\ bound)
(fmakunbound 'set\ cursor\ bound))
(if (fboundp 'set\ scroll\ margins)
(fmakunbound 'set\ scroll\ margins))
(if (fboundp 'what\ line) (fmakunbound 'what\ line))
(if (x-display-color-p)
(progn
(global-font-lock-mode t)
(mapcar (function
(lambda (flist)
(copy-face (car (cdr flist)) (car flist))
(set-face-foreground (car flist) (car (cdr (cdr flist))))))
'((italic-blue italic "deepskyblue")
(italic-turquiose italic "turquoise")
(italic-orange italic "orange")
(bold-yellow bold "yellow")
(bold-green bold "green")
(default-red default "red")))
(setq font-lock-comment-face 'italic-blue
font-lock-doc-string-face 'italic-turquiose
font-lock-string-face 'italic-orange
font-lock-function-name-face 'bold-yellow
font-lock-keyword-face 'bold-green
font-lock-type-face 'default-red)
; (set-face-foreground 'font-lock-comment-face "saddle brown")
; (set-face-foreground 'font-lock-doc-string-face "chocolate")
; (set-face-foreground 'font-lock-string-face "firebrick")
; (set-face-foreground 'font-lock-function-name-face "blue")
; (set-face-foreground 'font-lock-keyword-face "slate blue")
; (set-face-foreground 'font-lock-type-face "steel blue")
(set-face-background 'region "yellow")
(set-face-foreground 'region "hot pink")
(setq w3-node-style 'font-lock-keyword-face)
(setq w3-address-style 'font-lock-comment-face)
(setq w3-bold-style 'font-lock-keyword-face)
(setq w3-italic-style 'font-lock-comment-face)
)
; else x-display-color-p
(if (eq 'gray-scale (x-display-visual-class))
(progn
(set-face-background 'region "DarkSlateGrey")
)
(progn
(set-face-background 'region "White")
(set-face-foreground 'region "Black")
(setq hilit-background-mode 'mono)
)
)
)
)
)
(setq fill-column 75)
(setq fortran-do-indent 2)
(setq fortran-if-indent 2)
(setq fortran-comment-indent-style nil)
(setq fortran-continuation-char 38)
(setq search-slow-speed 14400)
(set-input-mode nil t t)
; Set up various sundry variables
;
(setq-default search-slow-speed 2400)
(setq-default fill-column 72)
;
; Set up c-mode variables
;
;(add-hook 'c-mode-hook
; (function (lambda()
; (setq tab-width 4 ))))
;(setq c-auto-newline 1
; c-tab-always-indent -4
; c-indent-level -4
; c-continued-statement-offset -4
; c-brace-offset -4
; c-brace-imaginary-offset -4
; c-label-offset -4
; )
;
; Set up c++ variables
;
(setq c-recognize-knr-p nil)
(add-hook 'c++-mode-hook (function (lambda () (c-set-style "Ellemtel"))))
(add-hook 'c++-mode-hook 'font-lock-mode )
;
; set up fortran-mode variables
;
;(setq fortran-do-indent 2
; fortran-if-indent 2
; fortran-comment-indent-style nil
; fortran-continuation-char ?&
; fortran-line-number-indent 5)
;(setq inhibit-local-variables t)
;
(autoload 'html-mode "html-mode" "HTML major mode" t)
; Amend the auto-mode list.
; To override an entry on the auto-mode-alist, delete the old entry
; and append the new. rplacd doesn't work because of purecopy...
;
(setq auto-mode-alist
(append
(delq (assoc "\\.pl$" auto-mode-alist) auto-mode-alist)
(purecopy '(("\\.pl$" . perl-mode)))))
(setq auto-mode-alist
(append
(delq (assoc "\\.h\\'" auto-mode-alist) auto-mode-alist)
(purecopy '(("\\.h\\'" . c++-mode)))))
(setq auto-mode-alist
(append auto-mode-alist
(mapcar 'purecopy
'(("\\.car$" . fortran-mode)
("\\.F$" . fortran-mode)
("\\.edt$" . fortran-mode)
("\\.inc$" . fortran-mode)
("\\.icc$" . c++-mode)
("\\.html$" . html-mode)
))))
(set-default 'mode-line-format
'("" mode-line-modified (-3 . "%p") "--"
mode-line-buffer-identification
"--" global-mode-string "--%[(" mode-name
minor-mode-alist mode-line-process ")%]" "%n" "-%-"))
(set-default 'mode-line-modified '("--%1*%1*-"))
(set-default 'mode-line-buffer-identification '(-28 "[ %b %l ]%-"))
(display-time)
(put 'eval-expression 'disabled nil)
;(garbage-collect)
(custom-set-variables
'(load-home-init-file t t))
(custom-set-faces)
(autoload 'imaxima "imaxima" "Image support for Maxima." t)
(enable-flow-control)
(tool-bar-mode 0)
(menu-bar-mode nil)
(require 'rcirc)
(setq rcirc-default-nick "nanobanshee")
(setq rcirc-authinfo '(("oftc" nickserv "nanobanshee" "XXXXx")
("freenode" nickserv "nanobanshee" "XXXXX")
("localhost" bitlbee "paco" "XXXXXXX")))
(setq rcirc-startup-channels-alist '(("oftc" "#penguinslair")
("freenode" "#archlinux")
("localhost" "&bitlbee")))
(load-file "/home/paco/hacking/emacs/rcirc-reconnect.el")
(rcirc-track-minor-mode)
(defun irc ()
(interactive)
(rcirc-connect "irc.oftc.net" 6667 rcirc-default-nick rcirc-default-nick
rcirc-default-nick (assoc "oftc" rcirc-startup-channels-alist))
(rcirc-connect "irc.freenode.net" 6667 rcirc-default-nick rcirc-default-nick
rcirc-default-nick (assoc "freenode" rcirc-startup-channels-alist))
(rcirc-connect "localhost" 6667 "paco" "paco"
"paco" (assoc "bitlbee" rcirc-startup-channels-alist)))
(setq make-backup-files nil)
(global-set-key [(meta left)] 'previous-buffer)
(global-set-key [(meta right)] 'next-buffer)
(global-set-key [(meta down)] 'other-window)
(defun other-window-back ()
"cycle backwards through windows."
(interactive)
(other-window -1))
(global-set-key [(meta up)] 'other-window-back)
(setq inhibit-splash-screen t)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(setq viper-mode t)
(require 'viper)
(define-key viper-vi-basic-map "v" 'set-mark-command)
(defun jump-back ()
"jump back to the mark."
(interactive)
(set-mark-command -1))
(define-key viper-vi-basic-map "V" 'jump-back)