;; ;; .emacs ;; ;; Modified and Composed from several sources ;; by Chema Celorio ;; March 2000 ;; ;; Sources by : ;; ;; Miguel de Icaza ;; Mattias Nyrell 199911 ;; Ripat ;; Steve Dodd, March 1998 ;; William M. Perry ;; sdodd@udnergrad.math.uwaterloo.c ( .com ?? ) ;; < maw@nitro.fsck.org > ;; Marius Sundbakken ;; ;; Jan Borsodi ;; ;; Jason Leach April, 2000 ;; 1998 Michael Zucchi ;; This .emacs file provides : ;; ;; Change all the yes/no prompts to y/n ;; Do not ask for save confirmation before compiling ;; The compliation windows is 8 rows height ;; scroll while compiling ;; Added gtk+ and gnome syntax highligthning with some libraries names gnome-print specially ;; Added wheel mouse support ;; Special colors ;; Auto revert is turned on ;; Basic offset and tab size = 8 ( GNOME ) ;; Shift+move type highlightning ;; Page up and page down movement ;; Home and End goes to beggining and end of line ;; =========== Set the short-cut keys ========================== ;;( define-key global-map [f1] ') ( define-key global-map [C-f1] 'eshell) ( define-key global-map [f2] 'ido-kill-buffer) ;; F2 - OPEN ( define-key global-map [f3] 'ido-find-file) ;; F3 - CLOSE ( define-key global-map [f4] 'goto-line) ;; F4 - GOTO LINE ( define-key global-map [f5] 'joc-dired-magic-buffer) ( define-key global-map [f7] 'ispell) ;; F7 - ISPELL ( define-key global-map [f8] 'devhelp-word-at-point) ( define-key global-map [f9] 'compile) ;; F9 - COMPILE ( define-key global-map [f10] 'next-error) ;; F10 - NEXT ERROR ( define-key global-map [f11] 'my-insert-changelog-header) ( define-key global-map [f12] 'add-change-log-entry-other-window) ;; F12 - CHANGE LOG ;; ( define-key global-map [f9] 'undo) ;; F9 - UNDO ;; ( define-key global-map [f10] 'compile) ;; F10 - COMPILE ;; ( define-key global-map [f11] 'next-error) ;; F11 - NEXT ERROR ( global-set-key "\M-n" 'next-error) ;; Set Meta + P to next error ( global-set-key [C-tab] 'other-window) ( global-set-key "\C-cp" 'ps-print-buffer) ;; Set C-c p to print buffer ( global-set-key "\C-cP" 'ps-spool-buffer) ;; Set C-c p to spool buffer ( global-set-key "\C-cr" 'ps-print-region) ;; Set C-c r to print region ( global-set-key "\C-cR" 'ps-spool-region) ;; Set C-c r to spool region ( global-set-key "\M-g" 'goto-line) ;; Set M-g to Goto Line ( global-set-key [end] 'end-of-line) ;; Make control+pageup/down scroll the other buffer (global-set-key [C-next] 'scroll-other-window) (global-set-key [C-prior] 'scroll-other-window-down) ;; toolbar (tool-bar-mode 0) ;; show the GNU splash screen (setq inhibit-startup-message nil) ;; dont's show the message buffer TURN OFF WHEN DEBUGGING. (setq message-log-max nil) (if (get-buffer "*Messages*") (kill-buffer "*Messages*")) ;; Set title bar (setq frame-title-format "%b") (setq icon-title-format "%f") ;; CTags stuff (setq tags-table-list '("~/cvs")) ;; NO sound (setq visible-bell t) ;; Load path (setq load-path (nconc '("~/bin/elisp") load-path)) ;; (setq load-path (nconc '("~/.emacs-lisp/jde") load-path)) ;; Make all "yes or no" prompts show "y or n" instead (fset 'yes-or-no-p 'y-or-n-p) ;; I have no idea what this does, but "if aint broken, dont fix it" ;; =========================== START: no idea ======================= ;; Byt plats på RET och LF. Detta gör att RET kommer att indentera ;; automagiskt (setq foo (global-key-binding "\C-m")) (global-set-key "\C-m" (global-key-binding "\C-j")) (global-set-key "\C-j" foo) ;; Bestämmer hut mycket emacs scrollar när man går utanför fönstret. ;; (setq scroll-step 1) ;; ;; Stuff from Neil van Dyke ;; (setq scroll-conservatively 10 ;; scroll-margin 5 ;; scroll-preserve-screen-position t ;; scroll-step 1) ;; Emacs server ;;(autoload 'gnuserv-start "gnuserv-compat" "Allow this Emacs process to be a server for client process." t) ;;(gnuserv-start) ;; När man programmerar kan det ibland vara väldigt trevligt om Emacs ;; blinkar matchande parenteser även om de står långt ifrån varandra. ;; Det kan göra Emacs lite långsammare någon gång ibland, men det är ;; det värt. (setq blink-matching-paren-distance nil) ;; ========================== END : no idea ======================= ;; auto-fill (add-hook 'text-mode-hook 'turn-on-auto-fill) (setq fill-column 80) ;; XResourceGenericMode (autoload 'x-resource-generic-mode "generic-x" nil t) ;; Dired (setq dired-listing-switches "-alho") (require 'dired-single) (require 'dired-tar) ;; xcscope (require 'xcscope) (define-key global-map [(control f3)] 'cscope-set-initial-directory) (define-key global-map [(control f4)] 'cscope-unset-initial-directory) (define-key global-map [(control f5)] 'cscope-find-this-symbol) (define-key global-map [(control f6)] 'cscope-find-global-definition) (define-key global-map [(control f7)] 'cscope-find-global-definition-no-prompting) (define-key global-map [(control f8)] 'cscope-pop-mark) (define-key global-map [(control f9)] 'cscope-next-symbol) (define-key global-map [(control f10)] 'cscope-next-file) (define-key global-map [(control f11)] 'cscope-prev-symbol) (define-key global-map [(control f12)] 'cscope-prev-file) (define-key global-map [(meta f11)] 'cscope-display-buffer) (define-key global-map [(meta f12)] 'cscope-display-buffer-toggle) ;; Quack (add-hook 'scheme-mode-hook (require 'quack)) ;; dired-dd (add-hook 'dired-load-hook (function (lambda () (load "dired-x") ;; Set dired-x variables here. ;; To and flo... (if window-system (progn (require 'dired-dd) (require 'dired-dd-b3-menu) (require 'dired-do-emacs-command)) )))) ;; dired-explore (add-hook 'dired-load-hook (lambda () (require 'dired-explore) (define-key dired-mode-map [return] 'dired-explore-file) (define-key dired-mode-map [mouse-2] 'dired-mouse-explore-file))) ;; dired-sort-menu (add-hook 'dired-load-hook (lambda () (require 'dired-sort-menu))) ;; shell (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt) ;; eshell stuff (load "em-joc") ;; (add-hook 'eshell-mode-hook ;; (lambda () (define-key eshell-mode-map (kbd "C-a") 'eshell-bol))) ; Change the default eshell prompt ;; (defcustom eshell-prompt-function ;; (function ;; (lambda () ;; (concat "<" (getenv "USER") "@" (getenv "HOSTNAME") " " ;; (eshell/pwd) "/ > " ))) ;; "*A modified function that returns the Eshell prompt string." ;; :type 'function ;; :group 'eshell-prompt) ;; Open unidentified files in text mode (setq default-major-mode 'text-mode) ;; Windows-like selection (not for XEmacs) (pc-selection-mode) ;; Display clock (display-time) (defun devhelp-word-at-point () "runs devhelp" (interactive) (setq w (current-word)) (start-process-shell-command "devhelp" nil "devhelp" "-s" w) ) ;; Line feed conversion (defun unix-file () "Change the current buffer to Latin 1 with Unix line-ends." (interactive) (set-buffer-file-coding-system 'iso-latin-1-unix t)) (defun dos-file () "Change the current buffer to Latin 1 with DOS line-ends." (interactive) (set-buffer-file-coding-system 'iso-latin-1-dos t)) (defun mac-file () "Change the current buffer to Latin 1 with Mac line-ends." (interactive) (set-buffer-file-coding-system 'iso-latin-1-mac t)) ;; Command for inserting current date (defun my-insert-date () (interactive nil) (insert (format-time-string "%e %B %Y"))) ;; Command for inserting Changelog entry header (defun my-insert-changelog-header () (interactive nil) (insert (concat (format-time-string "%Y-%m-%d") " " user-full-name " <" user-mail-address">"))) (define-key global-map "\C-c\C-id" 'my-insert-date) (define-key global-map "\C-c\C-in" '(lambda () (interactive nil) (insert (concat user-full-name " (" user-mail-address")")))) (define-key global-map "\C-c\C-il" 'my-insert-changelog-header) ;; Use ido.el (require 'ido) (ido-mode t) (setq ido-decorations '(" " "" " " " ..." " [" "]" " (No Match)" " (Matched)")) (setq ido-save-directory-list-file nil) (setq ido-max-window-height 1) ;; bs.el (require 'bs) (global-set-key "\C-x\C-b" 'bs-show) ;; recentf.el (require 'recentf) (recentf-mode 1) ;; use cua.el (require 'cua) (CUA-mode 'emacs) ;; ibuffer.el (require 'ibuffer) ;; browse-kill-ring (require 'browse-kill-ring) (global-set-key (kbd "C-c k") 'browse-kill-ring) ;; blink cursor (blink-cursor-mode 0) (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t) ;; Pager (load "pager") (global-set-key [prior] 'pager-page-up) (global-set-key [next] 'pager-page-down) (global-set-key [M-up] 'pager-row-up) (global-set-key [M-down] 'pager-row-down) ;; PCL-CVS (global-set-key "\C-xe" 'cvs-examine) (global-set-key (kbd "C-x v v") 'vc-next-action) ;; man (global-set-key "\C-cm" 'man) ;; completing-help (autoload 'completing-help-mode "completing-help" "Toggle a facility to display information on completions." t nil) (autoload 'turn-on-completing-help-mode "completing-help" "Turn on a facility to display information on completions." t nil) (autoload 'turn-off-completing-help-mode "completing-help" "Turn off a facility to display information of completions." t nil) (turn-on-completing-help-mode) ;; battery (display-battery) ;; focus-follows-mouse (load "follows-mouse") (turn-on-follow-mouse) (setq follow-mouse-deselect-active-minibuffer nil) (setq follow-mouse-auto-raise-frame nil) ;; Undo (require 'redo) (global-set-key "\C-z" 'undo) (global-set-key "\M-z" 'redo) ;; ;; Cool home key ;; (defun my-home-key () ;; (interactive) ;; (let ((f (current-column))) ;; (beginning-of-line) ;; (skip-chars-forward " \t") ;; (if (= (current-column) f) ;; (beginning-of-line)))) ;; (global-set-key [home] 'my-home-key) ;; (global-set-key "\C-a" 'my-home-key) ;; (global-set-key [?\S-\C-a] 'beginning-of-line-mark) ;; (global-set-key [?\S-\C-e] 'end-of-line-mark) ;; Alt-backspace (global-set-key [M-backspace] 'backward-kill-word) ;; Hippie expand (global-set-key "\215" 'hippie-expand) ;; Version Control (setq vc-make-backup-files t) (setq vc-follow-symlinks t) ;; over the filesystem. (defun make-backup-file-name (file-name) "Create the non-numeric backup file name for `file-name'." (require 'dired) (if (file-exists-p "~/.backups") (concat (expand-file-name "~/.backups/") (dired-replace-in-string "/" "|" file-name)) (concat file-name "~"))) ;; ==================== MOUSE SIMPLE(?) SET UP ================================== ;; Paste at point NOT at cursor (setq mouse-yank-at-point 't) ;; Scroll Bar gets dragged by mouse butn 1 (global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; INTELLIMOUSE SETUP ;; . Wheel forward/backwards scrolls by 10 lines ;; . Shift + wheel forward/backwards scrolls by 1 line ;; (change mwheel-scroll-amount to change these defaults). ;; . Bind control + wheel scroll to undo ;; . Set wheel action focus to follow mouse pointer NOT cursor. (Change ;; mwheel-follow-mouse to "nil" to get wheel to only act on the window ;; containing the text cursor. ;; ;; * Please see the copyright notice below for original copyright stuff. ;; I have made a few small changes to the code, such as the undo binding to ;; the wheel, contact me at sdodd@udnergrad.math.uwaterloo.ca for the ;; original code, or the maintainer below. ;; EVEN FURTHER CHANGES BY chema@celorio.com ;; ;; changed : Scroll 3 lines and with shit + scroll scroll 10 lines ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mwheel.el --- Mouse support for MS intelli-mouse type mice ;; Copyright (C) 1998, Free Software Foundation, Inc. ;; Maintainer: William M. Perry ;; Keywords: mouse ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; XEmacs is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;; Synched up with: Not synched. ;; Commentary: ;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'custom) (require 'cl) (defconst mwheel-running-xemacs (string-match "XEmacs" (emacs-version))) (defcustom mwheel-scroll-amount '(15 . 10) "Amount to scroll windows by when spinning the mouse wheel. This is actually a cons cell, where the first item is the amount to scroll on a normal wheel event, and the second is the amount to scroll when the wheel is moved with the shift key depressed. This should be the number of lines to scroll, or `nil' for near full screen. A near full screen is `next-screen-context-lines' less than a full screen." :group 'mouse :type '(cons (choice :tag "Normal" (const :tag "Full screen" :value nil) (integer :tag "Specific # of lines")) (choice :tag "Shifted" (const :tag "Full screen" :value nil) (integer :tag "Specific # of lines")))) ;; Change to nil to only scroll the window the cursor is in (not the pointer) (defcustom mwheel-follow-mouse 1 "Whether the mouse wheel should scroll the window that the mouse is over. This can be slightly disconcerting, but some people may prefer it." :group 'mouse :type 'boolean) (if (not (fboundp 'event-button)) (defun mwheel-event-button (event) (let ((x (symbol-name (event-basic-type event)))) (if (not (string-match "^mouse-\\([0-9]+\\)" x)) (error "Not a button event: %S" event)) (string-to-int (substring x (match-beginning 1) (match-end 1))))) (fset 'mwheel-event-button 'event-button)) (if (not (fboundp 'event-window)) (defun mwheel-event-window (event) (posn-window (event-start event))) (fset 'mwheel-event-window 'event-window)) (defun mwheel-scroll (event) (interactive "e") (let ((curwin (if mwheel-follow-mouse (prog1 (selected-window) (select-window (mwheel-event-window event))))) (amt (if (memq 'shift (event-modifiers event)) (cdr mwheel-scroll-amount) (car mwheel-scroll-amount)))) (case (mwheel-event-button event) (4 (scroll-down amt)) (5 (scroll-up amt)) (otherwise (error "Bad binding in mwheel-scroll"))) (if curwin (select-window curwin)))) (defun mwheel-undo (event) (interactive "e") (let ((curwin (if mwheel-follow-mouse (prog1 (selected-window) (select-window (mwheel-event-window event))))) ) (case (mwheel-event-button event) (4 (undo)) (5 (undo)) (otherwise (error "Bad binding in mwheel-scroll"))) (if curwin (select-window curwin)))) (define-key global-map (if mwheel-running-xemacs 'button4 [mouse-4]) 'mwheel-scroll) (define-key global-map (if mwheel-running-xemacs 'button5 [mouse-5]) 'mwheel-scroll) (define-key global-map (if mwheel-running-xemacs [(shift button4)] [S-mouse-4]) 'mwheel-scroll) (define-key global-map (if mwheel-running-xemacs [(shift button5)] [S-mouse-5]) 'mwheel-scroll) (define-key global-map (if mwheel-running-xemacs [(control button4)] [C-mouse-4]) 'mwheel-undo) (define-key global-map (if mwheel-running-xemacs [(control button5)] [C-mouse-5]) 'mwheel-undo) (provide 'mwheel) ;; ======================= END MOUSE SETUP !!!!!! ================== ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Nice colors and some other stuff! ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; All these settings was set using ;; "customize" on the help menu in ;; emacs (add-to-list 'auto-mode-alist '("\\.pxr$" . sgml-mode)) (add-to-list 'auto-mode-alist '("\\.printer$" . sgml-mode)) (add-to-list 'auto-mode-alist '("\\.model$" . sgml-mode)) ;; PSGML mode from nmv (autoload 'sgml-mode "psgml" nil t) (autoload 'xml-mode "psgml" nil t) (setq sgml-catalog-files '("catalog" "/etc/sgml/catalog" "/usr/lib/sgml/catalog")) (setq sgml-auto-activate-dtd t) (when window-system (setq sgml-set-face t) (defface nwv-sgml-tag-face '((t :foreground "gray50")) "") (setq sgml-markup-faces '((comment . font-lock-comment-face) (doctype . nwv-sgml-tag-face) (end-tag . nwv-sgml-tag-face) (entity . bold) (pi . bold) (sgml . bold) (shortref . bold) (start-tag . nwv-sgml-tag-face)))) (defface nwv-sgml-end-face '((t :foreground "gray65")) "") (defface nwv-sgml-misc-face '((t :foreground "gray40")) "") (defface nwv-sgml-start-face '((t :foreground "gray40")) "") (setq sgml-markup-faces '((comment . font-lock-comment-face) (doctype . nwv-sgml-misc-face) (end-tag . nwv-sgml-end-face) (entity . bold) (pi . nwv-sgml-misc-face) (sgml . bold) (shortref . bold) (start-tag . nwv-sgml-start-face))) ;; camelCase (autoload 'camelCase-mode "camelCase-mode") ;; unidiff (autoload 'unidiff-mode "unidiff.el" nil t) ;; XSL mode (autoload 'xsl-mode "xslide" "Major mode for XSL stylesheets." t) ;; Turn on font lock when in XSL mode (add-hook 'xsl-mode-hook 'turn-on-font-lock) (setq auto-mode-alist (append (list '("\\.xml" . xsl-mode) '("\\.html" . xsl-mode) '("\\.fo" . xsl-mode) '("\\.xsl" . xsl-mode)) auto-mode-alist)) ;; Uncomment if using abbreviations (abbrev-mode t) ;; folding mode (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) (setq folding-default-keys-function 'folding-bind-backward-compatible-keys) (require 'cc-mode) (require 'font-lock) (defconst mono-csharp-attrib-key (concat "\[" c-symbol-key "\\(([^)]*)\\)?\]")) (defconst mono-csharp-class-protection-key "\\(new\\|public\\|protected\\|internal\\|private\\|abstract\\|sealed\\)") (defconst mono-csharp-class-parent-key (concat "\\(\\s +:\\s *" c-symbol-key "\\(\\s *,\\s *" c-symbol-key "\\)*" "\\)*")) (defconst mono-csharp-class-key (concat "\\(" mono-csharp-attrib-key "\\)?" "\\(" mono-csharp-class-protection-key "\\s +\\)*" "\\(struct\\|class\\)\\s +" c-symbol-key "\\(" mono-csharp-class-parent-key "\\)?")) (defun basic-c-mode-hook () (define-key java-mode-map "\C-m" 'newline-and-indent) (define-key csharp-mode-map "\C-m" 'newline-and-indent) (setq dabbrev-case-fold-search nil) (camelCase-mode 1) (custom-set-variables '(c-basic-offset 8)) (cond (window-system (turn-on-font-lock)))) (defun mono-csharp-hook () (turn-on-font-lock) (c-set-style "mono") (setq c-class-key mono-csharp-class-key)) (add-hook 'c-mode-hook 'basic-c-mode-hook) (add-hook 'java-mode-hook 'basic-c-mode-hook) (add-hook 'csharp-mode-hook 'basic-c-mode-hook) (add-hook 'csharp-mode-hook 'mono-csharp-hook) (c-add-style "mono" '("k&r" (c-basic-offset . 8) (c-comment-only-line-offset . 0) (c-hanging-braces-alist . ((brace-list-open) (brace-entry-open) (substatement-open after) (block-close . c-snug-do-while))) (c-cleanup-list . ((brace-else-brace) (brace-catch-brace) (space-before-funcall))) (c-offsets-alist . ((statement-block-intro . 0) (knr-argdecl-intro . 0) (substatement-open . 0) (label . 0) (namespace-open . 0) (namespace-close . 0) (innamespace . +) (inclass . +) (access-label . 0) (inline-open . 0) (inline-close . 0) (defun-open . 0) (statement-cont . 0) (statement-block-intro . +) (arglist-cont-nonempty . ++) (topmost-intro-cont . ++) (defun-block-intro . +) (objc-method-intro . +) )))) (setq auto-mode-alist (append '( ;; ("\\.s?html?\\'" . html-mode) ;; ("\\.asp$" . html-mode) ;; ("\\.aspx$" . html-mode) ;; ("\\.html$" . html-mode) ;; ("\\.htm$" . html-mode) ("\\.md$" . emacs-lisp-mode) ("\\.txt$" . text-mode) ("\\.cs$" . csharp-mode) ("\\.custom$" . csharp-mode) ("\\.diff$" . unidiff-mode) ("\\.patch$" . unidiff-mode) ("\\.java$" . java-mode)) auto-mode-alist )) (defun diff-buffer-with-associated-file () "View the differences between BUFFER and its associated file. This requires the external program \"diff\" to be in your `exec-path'." (interactive) (let ((buf-filename buffer-file-name) (buffer (current-buffer))) (unless buf-filename (error "Buffer %s has no associated file" buffer)) (let ((diff-buf (get-buffer-create (concat "*Assoc file diff: " (buffer-name) "*")))) (with-current-buffer diff-buf (setq buffer-read-only nil) (erase-buffer)) (let ((tempfile (make-temp-file "buffer-to-file-diff-"))) (unwind-protect (progn (with-current-buffer buffer (write-region (point-min) (point-max) tempfile nil 'nomessage)) (if (zerop (apply #'call-process "diff" nil diff-buf nil (append (when (and (boundp 'ediff-custom-diff-options) (stringp ediff-custom-diff-options)) (list ediff-custom-diff-options)) (list buf-filename tempfile)))) (message "No differences found") (progn (with-current-buffer diff-buf (goto-char (point-min)) (if (fboundp 'diff-mode) (diff-mode) (fundamental-mode))) (display-buffer diff-buf)))) (when (file-exists-p tempfile) (delete-file tempfile))))) nil)) ;; tidy up diffs when closing the file (defun kill-associated-diff-buf () (let ((buf (get-buffer (concat "*Assoc file diff: " (buffer-name) "*")))) (when (bufferp buf) (kill-buffer buf)))) (add-hook 'kill-buffer-hook 'kill-associated-diff-buf) (global-set-key (kbd "C-c d") 'diff-buffer-with-associated-file) (defun de-context-kill (arg) "Kill buffer, taking gnuclient into account." (interactive "p") (when (and (buffer-modified-p) (not (string-match "\\*.*\\*" (buffer-name))) (= 1 arg)) (diff-buffer-with-associated-file) (error "Buffer has unsaved changes")) (if (and (boundp 'gnuserv-minor-mode) gnuserv-minor-mode) (gnuserv-edit) (set-buffer-modified-p nil) (kill-buffer (current-buffer)))) ;; (global-set-key (kbd "C-x k") 'de-context-kill) (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. '(auto-compression-mode t nil (jka-compr)) '(auto-revert-interval 2) '(auto-revert-stop-on-user-input nil) '(battery-mode-line-format " [%b%p%%]") '(battery-update-interval 30) '(c-basic-offset 8) '(c-cleanup-list (quote (brace-else-brace brace-elseif-brace brace-catch-brace space-before-funcall))) '(c-default-style "mono") '(c-font-lock-extra-types (quote ("GnomePrintOrient" "FILE" "\\sw+_t" "gint" "gfloat" "gchar" "gint8" "gint16" "gint32" "guint" "guint8" "guint16" "guint32" "guchar" "glong" "gboolean" "gshort" "gushort" "gulong" "gdouble" "gldouble" "gpointer" "Gtk\\w+" "Gdk\\w+" "GList" "GSList" "Document" "View" "GnomePrintDialog" "GnomeDialog" "GnomePrintRGBPClass" "GnomePrintContextClass" "GnomePaper" "GnomePrintPCLR" "GnomePrintESCR" "GladeXML" "GString" "GnomeFont" "GnomePrintMaster" "GnomePrintContext" "GnomePrinter" "PrintJobInfo" "GnomePrintMasterPreview" "GeditUndoInfo" "GnomeMDIChildClass" "GnomeMDI" "GnomeMDIMode" "poptContext" "GnomeApp" "GnomeMDIChild" "GnomeUIInfo" "GnomeDockItem" "GnomeUIPixmapType" "gconstpointer" "GnomeUIInfoType" "GeditToolbar" "SPDocument" "ArtPixBuf" "art_u8" "ArtDRect" "SPItem" "SPObject" "SPSelection" "GnomeAppBar" "SPDesktop" "SPMDIChild" "SPEventContext" "GnomeCanvas" "GnomeCanvasItem" "GnomeCanvasGroup" "GnomePrintFRGBA" "PluginData" "GModule" "SPDTStateType" "SPGuideLine" "GnomeSpellInfo" "GnomeSpell" "GnomeDockItemBehavior" "GnomeHelpMenuEntry" "GIOChannel" "GnomeMessageBox" "GnomeCrashFunction" "GnomePrintRGBP" "GnomePrintPCLRPrivate" "GnomePrintPCLVPrivate" "GnomePrintRGBP" "GnomePrintPCLV" "GnomePrintPCLVClass" "GnomeDock" "GnomeDockLayout" "GnomeDockPlacement" "GnomeClient" "GnomeClientFlags" "GnumericDashedCanvasLine" "GnumericDashedCanvasLineClass" "StyleBorderType" "GnomeCanvasLine" "GnomeCanvasLineClass" "WorkBook" "CellPos" "ColRowCollection" "SheetStyleData" "SheetModeType" "SheetModeType" "PrintInformation" "SheetPrivate" "DependencyData" "SolverParameters" "WorkbookCallback" "Sheet" "Range" "MStyle" "Workbook" "GHashTable" "xmlDocPtr" "xmlDoc" "xmlNsPtr" "XmlSheetObjectReadFn" "XmlSheetObjectWriteFn" "XmlParseContext" "xmlNodePtr" "CommandContext" "ColRowInfo" "PrintUnit" "StyleRegion" "SheetSelection" "NamedExpression" "Value" "Cell" "ExprArray" "StyleFormat" "RenderedValue" "CellComment" "CellFlags" "SolverConstraint" "String" "GeditPrintOrientation" "PrintScaling" "PrintMargins" "CellList" "SolverProblemType" "SolverOptions" "CellRef" "ValueRange" "PrintRange" "HFRenderInfo" "HFRenderType" "HFside" "PrintRepeatRange" "PrintCountInfo" "SPPath" "SPShape" "SPPathComp" "ArtBpath" "PageCountInfo" "GnomeTextFontHandle" "GnomePrintPsClass" "GnomePrintPdfClass" "GnomePrintPdf" "GnomePrintPs" "va_list" "GnomePrintPdfPage" "GnomePrintPdfPageContents" "GnomePrintPdfContents" "GnomePrintPdfPageContents" "GnomePrintPdfObject" "GPPath" "ArtVpath" "ArtSVP" "GPGC" "ArtVpathDash" "ArtPathStrokeJoinType" "ArtPathStrokeCapType" "GPCtx" "GnomePrintPreview" "GnomePrintPdfGraphicState" "GnomePrintDash" "ArtPathcode" "ArtPoint" "Gt1LoadedFont" "GraphicContext" "GnomePrintPreviewPrivate" "GnomePrintPdfFont" "GnomePrintPdfGsave" "GnomePrintPdfImage" "GnomePrintPs2Page" "GnomePrintPs2Font" "GnomePrintPs2Gsave" "GnomePrintPs2GraphicState" "GnomePrintPs2" "GnomePrintPs2Class" "GnomePrintCoies" "GnomePritnCopies" "GnomePrinterWidget" "GnomePrintDialogClass" "GnomePrintMeta" "ArtWindRule" "GnomeDialogClass" "GnomePrinterProfile" "GnomeDisplayFont" "GnomeFontWeight" "GnomeDisplayFont" "GnomeFontFace" "GnomeFontPrivate" "GnomeFontClass" "GnomeFontClassPrivate" "GnomeFontSelection" "GnomeFontSelectionClass" "GnomeFontSelectionDialog" "GnomeFontSelectionDialogClass" "GnomeFontType1EncTab" "Font_Info" "GnomeFontMap" "GnomeFontLigList" "GnomeFontKernPair" "GnomeFontWeightTab" "GnomeFontUnsized" "GnomeTextGlyphAttrEl" "GnomeTextLine" "GnomeTextAttrEl" "GnomeTextLayout" "GnomeGlyphList" "GnomeCanvasItemClass" "GnomePrintPreviewClass" "GnomeCanvasBuf" "ArtUta" "ArtIRect" "GnomePaperSelectior" "GnomeUnit" "Gt1GlyphOutline" "GnomeFontFacePrivate" "ps_internal_font" "GnomeFileEntry" "GnomeIconEntry" "ppd_struct" "GladeWidgetInfo" "GpaModel" "GpaModelInfo" "GpaClass" "GpaPrinter" "GpaPrinterClass" "GnomePrinterStatus" "GpaPaperInfo" "GpaPaperSize" "GpaPaperMedia" "GpaPaperSource" "GpaQuality" "GpaQualityInfo" "GpaResolution" "GpaResolutionSubtype" "GpaOptionsUnknown" "GpaOption" "GpaOptions" "GpaPaperMediaType" "GpaPaperMediaTypes" "GpaOptionTypes" "GpaOptionsGroup" "GnomePrintResolutionParameters" "GHashFunc" "GCompareFunc" "GHashNode" "GMemChunk" "GpaProfileList" "DIR" "GpaVendor" "GpaOptionsType" "GpaConstraint" "GpaConstraintType" "GpaContent" "GpaRequiredOptionValues" "GpaEncoding" "GpaKnownOptionType" "GpaCodeFragment" "GpaKnownPrinterValues" "GpaBackend" "GpaSettings" "T1Glyph" "GnomePrintPdfSubFont" "GnomeSegvInfo" "PpdVendorDictionary" "PpdSearchTag" "GpaPpdInfo" "GpaPpdPaper" "GpaKnownNodes" "GpaKnownPpdOptions" "GpaPpdDiv" "GpaPpdDivItem" "GpaPpdSimpleDiv" "GpaPpdSimpleDivItem" "GpaVendorDictType" "MailDialogSourcePage" "MailDialogServicePage" "MailService" "MailDialogServicePageItem" "MailDialogNewsPage" "Evolution_Shell" "GnomeDruidPageStart" "GnomeDruidPageFinish" "GnomeDruidPageStandard" "MailDruidDialog" "MailDialogTransportPage" "MailDialogIdentityPage" "MailDialogIdentity" "MailConfigService" "ServicePageCallback" "CamelProviderType" "CamelProvider" "CamelService" "CamelFolder" "CamelFolderInfo" "CamelException" "CamelStore" "CamelMboxStoreClass" "CamelStoreClass" "CamelServiceClass" "CamelURL" "CamelMboxStore" "CambelMboxSummary" "CamelFolderSearch" "CamelFolderClass" "CamelMboxFolder" "CamelSession" "EStorage" "EFolderTree" "Folder" "CamelMessageInfo" "GPtrArray" "CamelObject" "CamelMimeMessage" "CamelMboxFolderClass" "CamelMimeMessage" "CamelStream" "CamlMimeParser" "CamelMboxMessageInfo" "CamelTransport" "CamelMimeParser" "CamelFolderSummary" "CamelMboxSummary" "CamelException" "CamelFolder" "CamelFolderSummary" "CammelInternetAddress" "CamelMedium" "CamelMimeFilter" "CamelMimeFilterBasic" "CamelMimeFilterCharset" "CamelStreammem" "CamelStreamFs" "CamelStreamBuffer" "CamelObjectClass" "CamelDataWrapper" "CamelDataWrapperClass" "CamelMimePart" "IdentityPageCallback" "MailConfigIdentity" "CamelAddress" "CamelInternetAddress" "CameMimeFilterSave" "CamelMimeFilterLinewrap" "CamelMimeFilterCRLF" "CamelMultipart" "CamelNewsAddress" "CamelSeekableSubstream" "CamelSeekableStream" "CamelSimpleDataWrapper" "CamelStreamDataWrapper" "CamelStreamFilter" "CamelStreamMem" "GnomeDruidPage" "GnomeDruid" "GeditReplaceDialog" "GeditUndoActions" "GeditUndoState" "GeditUndoAction" "GeditView" "GeditDocument" "GeditViewClass" "GeditSearchStates" "UT_Bool" "UT_RGBColor" "UI_uint32" "Gr_Image" "Gr_Font" "XAP_App" "XAP_UnixFontManagement" "UT_sin32" "UT_UCSChar" "SampleDocument" "NameGuruState" "WorkbookControlGUI" "ParsePos" "ExprTree" "NameGuruScope" "GpaWindowInfo" "GnomePrinterDialog" "GpaConfigDialogInfo" "GpaAddDialogInfo" "PdfCompressionType" "GpaSliderInfo" "MtmTheme" "MtmExt" "MtmEnv" "MtmExtHandler" "MtmHandler" "HandlerManager" "MtmPlugin" "PluginManager" "MtmStateful" "MtmStatefullClass" "MtmPluginPrivate" "MtmUrlHandlerClass" "MtmUrlHandlerPrivate" "MtmResult" "CappletWidget" "MtmController" "MtmSelector" "MtmControlList" "MtmViewPreview" "MtmViewExtensions" "MtmInfoUpdateHtml" "MtmExtSelector" "GladeWidget" "GladeProperty" "GladePropertyType" "GladeParameter" "GladeChoice" "GladePalette" "GladeProjectWindow" "GladeWidgetClass" "GladeProject" "GladePaletteClass" "GladeProjectView" "GladeProjectViewClass" "GladeEditor" "GladeSetting" "GladeCatalog" "GladeCursor" "GladeCursorType" "GladePropertyView" "GladePropertyClass" "Archive" "Location" "LocationList" "SheetObject" "SheetObjectPrintInfo" "SheetControlGUI" "GnumericSheet" "SheetObjectCreationData" "SheetObjectAnchor" "ExprRelocateInfo" "GnomeCanvasPoints" "SheetObjectDirection" "SheetObjectGraphic" "SheetControlGUISlideHandler" "SheetObjectClass" "SheetObjectFilled" "CheckboxConfigState" "SheetWidgetCheckbox" "EvalPos" "SheetObjectWidgetClass" "Dependent" "SheetObjectWidget" "GnomeCanvasWidget" "WorkbookControl" "GnumericCommand" "GnumericCommandClass" "CmdSetText" "xmlNode" "XstTool" "XstTimeTool" "XstDialog" "XstSpinButton" "XstSpinButtonClass" "GladeEditorTable" "GladeEditorProperty" "GladeProjectViewList" "GladePropertyQuery" "GladePropertyQueryResult" "GladePlaceholder" "GladeProjectViewTree" "GParamSpec" "GType" "GEnumValue" "GladeFindInContainerData" "GladeParamSpec" "GladeSignalEditor" "GladeWidgetSignal" "GValue" "GladeWidgetFunction" "GladeXmlNode" "GladeXmlContext" "GladeSignal" "GObject" ""))) '(c-progress-interval 8) '(c-tab-always-indent (quote other)) '(case-fold-search t) '(column-number-mode t) '(compilation-ask-about-save nil) '(compilation-scroll-output t) '(compilation-window-height 6) '(confirm-kill-emacs (quote y-or-n-p)) '(current-language-environment "Latin-1") '(cvs-invert-ignore-marks (quote ("tag"))) '(default-input-method "latin-1-prefix") '(delete-old-versions t) '(eshell-banner-message (quote (quote nil))) '(eshell-modules-list (quote (eshell-alias eshell-banner eshell-basic eshell-cmpl eshell-dirs eshell-glob eshell-hist eshell-joc eshell-ls eshell-pred eshell-prompt eshell-rebind eshell-script eshell-term eshell-unix))) '(font-lock-global-modes t) '(font-lock-maximum-decoration t) '(font-lock-support-mode (quote lazy-lock-mode)) '(font-menu-ignore-scaled-fonts nil) '(global-auto-revert-mode t nil (autorevert)) '(global-auto-revert-mode-text " GRev") '(global-font-lock-mode t nil (font-lock)) '(indent-tabs-mode t) '(line-number-mode t) '(next-line-add-newlines nil) '(quack-browse-url-browser-function (quote browse-url-mozilla)) '(quack-fontify-style nil) '(recentf-menu-before "dired") '(show-paren-mode t nil (paren)) '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))) '(transient-mark-mode t) '(uniquify-buffer-name-style (quote forward) nil (uniquify)) '(user-full-name "Duncan Mak") '(user-login-name "duncan" t) '(user-mail-address "duncan@ximian.com") '(xsl-element-indent-step 8)) (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. '(default ((t (:stipple nil :background "gray25" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height unspecified :width normal :family unspecified)))) '(border ((t (:background "#102e4e")))) '(change-log-acknowledgement-face ((t (:italic t :slant italic :foreground "CadetBlue")))) '(change-log-conditionals-face ((t (:foreground "SeaGreen2")))) '(change-log-date-face ((t (:foreground "burlywood")))) '(change-log-email-face ((t (:foreground "SeaGreen2")))) '(change-log-file-face ((t (:bold t :weight bold :foreground "goldenrod")))) '(change-log-function-face ((t (:foreground "SeaGreen2")))) '(change-log-list-face ((t (:bold t :weight bold :foreground "DeepSkyBlue1")))) '(change-log-name-face ((t (:foreground "gold")))) '(cursor ((t (:background "red")))) '(custom-button-face ((((type x w32 mac) (class color)) (:background "lightgrey" :foreground "black" :box (:line-width 3 :style released-button))))) '(custom-comment-face ((((class grayscale color) (background dark)) (:background unspecified :foreground "pink" :slant italic)))) '(cvs-handled-face ((nil (:foreground "green" :weight bold)))) '(cvs-need-action-face ((nil (:foreground "orange" :weight bold)))) '(cvs-unknown-face ((((class color) (background dark)) (:foreground "grey35" :slant italic)))) '(diff-added-face ((t (:inherit diff-changed-face :foreground "skyblue" :weight bold)))) '(diff-file-header-face ((t (:inherit font-lock-string-face :weight bold)))) '(diff-header-face ((((class color) (background dark)) (:inherit font-lock-string-face)))) '(diff-removed-face ((t (:inherit (diff-changed-face font-lock-function-name-face) :weight normal)))) '(font-lock-builtin-face ((t (:foreground "LightCoral")))) '(font-lock-comment-face ((t (:italic t :foreground "pink2" :slant italic)))) '(font-lock-constant-face ((t (:foreground "gold")))) '(font-lock-doc-face ((t (:foreground "BlanchedAlmond")))) '(font-lock-doc-string-face ((t (:foreground "BlanchedAlmond")))) '(font-lock-function-name-face ((t (:bold t :foreground "goldenrod" :weight bold)))) '(font-lock-keyword-face ((t (:bold t :foreground "DeepSkyBlue1" :weight bold)))) '(font-lock-preprocessor-face ((t (:foreground "gold")))) '(font-lock-reference-face ((t (:foreground "LightCoral")))) '(font-lock-string-face ((t (:foreground "burlywood" :slant italic)))) '(font-lock-type-face ((t (:foreground "CadetBlue1")))) '(font-lock-variable-name-face ((t (:foreground "SeaGreen2")))) '(font-lock-warning-face ((t (:foreground "yellow")))) '(highlight ((t (:background "orange3")))) '(ido-first-match-face ((t (:background "deepskyblue4" :foreground "yellow" :weight bold)))) '(ido-only-match-face ((((class color)) (:background "deepskyblue2" :foreground "yellow2" :weight bold)))) '(ido-subdir-face ((((class color)) (:slant italic)))) '(isearch ((((class color) (background light)) (:background "goldenrod" :foreground "whitesmoke")))) '(isearch-lazy-highlight-face ((((class color) (background light)) (:background "lightskyblue2" :foreground "black")))) '(region ((nil (:background "darkolivegreen4")))) '(show-paren-match-face ((t (:bold t :foreground "blue" :background "lightgreen" :weight bold)))) '(show-paren-mismatch-face ((t (:bold t :foreground "yellow" :background "red" :weight bold))))) ;; GNOME doc (load "gnome-doc") ;; On est fini. (message ".emacs loaded.") ;; ;; BEGIN TRASH LINES, usefull for ideas when no sleeping is desired. ;; ;;;;;;;;;;;;;;;;;;;;;;; ;; Some key bindings ;; ;;;;;;;;;;;;;;;;;;;;;;; ;(global-set-key "\C-cF" 'font-lock-mode) ; Slå av/på font-lock ;(global-set-key "\C-cc" 'compile) ;(global-set-key [delete] `backward-delete-char) ;( define-key global-map [f12] 'undo) ;;; -*-Emacs-Lisp-*- ;; Mainly because i didn't like the colors in font-lock-mode ;; I use black text on white background, and a color scheme ;; based on the one in KDevelop. ;;;;;;;;;; ;; Misc ;; ;;;;;;;;;; ;; Misc settings that I found here and there... ;;(delete-selection-mode nil) ;; Set extensions ;; (setq tex-dvi-view-command "xdvi") ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; HTML/WWW related stuff ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Gör så att vi editerar HTML-filer med html-helper-mode. ;; (autoload 'html-helper-mode "html-helper-mode" "HTML editing mode" t) ;; (or (assoc "\\.pxr$" auto-mode-alist) ;; (setq auto-mode-alist (cons '("\\.pxr$" . html-helper-mode) ;; auto-mode-alist))) ;; egtk.el mode (autoload 'egtk-mode "egtk" "mode for editing GTK+ code") (add-hook 'c-mode-hook 'egtk-mode) ;; Neil's perkymbf stuff ;; (when window-system (require 'perkymbf)) ;; Fyll i nya HTML-dokument med ett skelett. ;;(setq html-helper-build-new-buffer t) ;; Ladda lite extra HTML-prylar och slå på auto-fill och aao-mode när ;; man editerar HTML-filer ;;(add-hook 'html-helper-load-hook ;; '(lambda () ;; (load "hhm-netscape") ;; (load "html-font") ;; (turn-on-auto-fill) ;; (turn-on-aao-mode))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Saker som låg i min .emacs på IDA ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;(set-input-mode t nil 'gazonk 7) ;;(setq standard-display-european t) ;;(defun delete-to-beginning-of-line () ;; (interactive) ;; (let ((p (point))) ;; (beginning-of-line) ;; (kill-region (point) p))) ;;(defun delete-whole-line () ;; (interactive) ;; (beginning-of-line) ;; (kill-line)) ;; ;;(defun save-eval-changebuffer () ;; (interactive) ;; (save-buffer) ;; (eval-buffer) ;; (switch-to-buffer *common-lisp*)) ; ;;(global-set-key "\C-l" 'save-eval-changebuffer)