; emacs configuration from Dirk Jagdmann ; http://cubic.org/~doj/emacs ;;;;This sets garbage collection to hundred times of the default. ;;;;Supposedly significantly speeds up startup time. (Seems to work ;;;;for me, but my computer is pretty modern. Disable if you are on ;;;;anything less than 1 ghz). (setq gc-cons-threshold 50000000) (global-font-lock-mode t) ; desktop mode lets us saves buffer state. activate it with M-x desktop-save RET. (desktop-save-mode 1) (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. '(auto-compression-mode t nil (jka-compr)) '(browse-url-browser-function (quote browse-url-firefox)) '(case-fold-search t) '(column-number-mode t) '(compile-auto-highlight t) '(current-language-environment "ASCII") '(desktop-save t) '(display-time-24hr-format t) '(display-time-mode t nil (time)) '(display-time-use-mail-icon t) '(ecb-layout-always-operate-in-edit-window (quote (delete-window delete-other-windows split-window-horizontally split-window-vertically switch-to-buffer))) '(ecb-layout-name "left6") '(ecb-layout-nr 6) '(ecb-options-version "2.27") '(ecb-tree-indent 1) '(ecb-truncate-lines nil) '(ecb-truncate-long-names t) '(ecb-windows-width 0.25) '(inhibit-startup-screen t) '(line-number-mode t) '(mouse-wheel-follow-mouse t) '(mouse-wheel-mode t nil (mwheel)) '(mouse-yank-at-point t) '(org-log-done t) '(paren-mode (quote paren) nil (paren)) '(query-user-mail-address nil) '(save-place t nil (saveplace)) '(show-paren-mode t nil (paren)) '(show-trailing-whitespace t) '(speedbar-navigating-speed 2 t) '(speedbar-update-speed 2 t) '(sql-product (quote postgres)) '(tab-width 8) '(tool-bar-mode nil nil (tool-bar)) '(toolbar-captioned-p nil) '(toolbar-visible-p nil) '(transient-mark-mode t) '(truncate-partial-width-windows nil) '(uniquify-buffer-name-style nil nil (uniquify)) '(user-full-name "Dirk Jagdmann") '(user-mail-address "doj@cubic.org")) ; (global-set-key [(meta g)] 'goto-line) (global-set-key [f1] (lambda () (interactive) (manual-entry (current-word)))) (global-set-key [(control f1)] 'ecb-activate) (global-set-key [(control shift f1)] 'ecb-deactivate) (global-set-key [(meta f1)] 'font-lock-mode) (global-set-key [f2] 'revert-buffer) (global-set-key [(control f2)] 'delete-trailing-whitespace) (global-set-key [f3] 'repeat-complex-command) (global-set-key [f4] 'add-change-log-entry) (global-set-key [f5] 'replace-string) (global-set-key [(control f5)] 'query-replace) (global-set-key [f6] 'replace-regexp) (global-set-key [(control f6)] 'query-replace-regexp) (global-set-key [f9] 'compile) (global-set-key [(control f9)] 'kill-compilation) (global-set-key [f10] 'next-error) (global-set-key [(control f10)] 'sort-lines) (global-set-key [f11] 'fill-region) (global-set-key [(control f11)] 'hide-ifdef-block) (global-set-key [(control shift f11)] 'show-ifdef-block) (global-set-key [f12] 'hs-show-block) (global-set-key [(control f12)] 'hs-hide-block) (global-set-key [(shift f12)] 'hs-show-all) (global-set-key [(control shift f12)] 'hs-hide-all) (global-set-key [Scroll_Lock] 'scroll-lock-mode) ; A wheel mouse that doesn't beep, unlike mwheel-install (defun scroll-me-up () (interactive) (scroll-up 20)) (defun scroll-me-down () (interactive) (scroll-down 20)) (defun scroll-me-up-a-bit () (interactive) (scroll-up 5)) (defun scroll-me-down-a-bit () (interactive) (scroll-down 5)) (define-key global-map [(button4)] 'scroll-me-down) (define-key global-map [(button5)] 'scroll-me-up) (define-key global-map [(shift button4)] 'scroll-me-down-a-bit) (define-key global-map [(shift button5)] 'scroll-me-up-a-bit) ; alternative buffer window (require 'bs) (global-set-key "\C-x\C-b" 'bs-show) ; use aspell instead of ispell (setq-default ispell-program-name "aspell") ; start emacs in server mode (add-hook 'after-init-hook 'server-start) ; provide command 'uncomment-region' (defun uncomment-region (beg end) "Like `comment-region' invoked with a C-u prefix arg." (interactive "r") (comment-region beg end -1)) ; enable auto compression mode (auto-compression-mode 1) ; make scripts executable upon saving (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p) ;; Make all yes/no prompts into y/n prompts (fset 'yes-or-no-p 'y-or-n-p) ;;; some code stolen from KDE emacs script ; Creates the ifndef/define/endif statements necessary for a header file (defun header-protection () (interactive) (let ((f (buffer-file-name))) (if (string-match "^.*/" f) (setq f (replace-match "" t t f))) (while (string-match "\\." f) (setq f (replace-match "__" t t f))) (save-excursion (goto-char (point-min)) (insert "#ifndef " (upcase f) "\n#define " (upcase f) "\n\n") (goto-char (point-max)) (insert "\n#endif\n") ) ) ) (defun insert-c-skeleton () (interactive) (insert "/* Copyright (c) ") (insert (format-time-string "%Y")) (insert (format " %s <%s> */\n\n" user-full-name user-mail-address)) (insert "#include \n\n") (insert "int main(int argc, char **argv)\n{\n\n return 0;\n}\n") (previous-line) (previous-line) (previous-line) ) (defun insert-select-skeleton () (insert "/* #include */\n") (insert "int __maxfd__=-1;\n") (insert "fd_set rfds;\n") (insert "FD_ZERO(&rfds);\n") (insert "#define SET_FD(fd) do { FD_SET(fd, &rfds); if(fd > __maxfd__) __maxfd__=fd; } while(0)\n") (insert "\n") (insert "#undef SET_FD\n") (insert "struct timeval tv;\n") (insert "tv.tv_sec = 1;\n") (insert "tv.tv_usec = 0;\n") (insert "\n") (insert "const int __s__ = select(__maxfd__+1, &rfds, NULL, NULL, &tv);\n") (insert "if(__s__ < 0)\n") (insert " {\n") (insert " perror("select()");\n") (insert " }\n") (insert "else if(__s__ == 0)\n") (insert " {\n") (insert " /* timeout */\n") (insert " }\n") (insert "else if(FD_ISSET(fd, &rfds))\n") (insert " {\n") (insert " }\n") ) ; add .pgc files to c++mode (autoload 'c++-mode "c++" "Major mode for C++ code." t) (setq auto-mode-alist (cons '("\.pgc$" . c++-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\.ipp$" . c++-mode) auto-mode-alist)) ; add wxWidgets stuff (require 'cc-mode) (add-to-list 'c++-font-lock-extra-types "\\bwx[A-Z][a-z][a-zA-Z]*?\\b") (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)))) (setq c++-mode-hook (lambda () (c-set-offset 'topmost-intro-cont 'c-wx-lineup-topmost-intro-cont))) ; customize CPerl mode (defun doj-cperl-setup () (cperl-set-style "C++")) (add-hook 'cperl-mode-hook 'doj-cperl-setup) (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\|t\\)\\'" . cperl-mode)) (add-to-list 'interpreter-mode-alist '("env perl" . cperl-mode)) (defalias 'perl-mode 'cperl-mode) (defun insert-perl-skeleton () (interactive) (insert "#!/usr/bin/env perl\n# $Header:$\n# Copyright (c) ") (insert (format-time-string "%Y")) (insert (format " %s <%s>\n" user-full-name user-mail-address)) (insert "\n") (insert "while(<>)\n{\n chomp;\n\n print \"$_\\n\";\n}\n") (previous-line) (previous-line) (previous-line) ) ; from http://www.emacswiki.org/cgi-bin/wiki/ChangingEncodings (defun recode-region (start end &optional coding-system) "Replace the region with a recoded text." (interactive "r\n\zCoding System (utf-8): ") (setq coding-system (or coding-system 'utf-8)) (let ((buffer-read-only nil) (text (buffer-substring start end))) (delete-region start end) (insert (decode-coding-string (string-make-unibyte text) coding-system)))) ;;; buffer-charsets.el --- show usage of charsets in a buffer ;; Displays list of charsets used in current buffer. (require 'hi-lock) (defun charset-chars-regexp (charset) (let ((dim (charset-dimension charset)) (chars (charset-chars charset)) (plane (charset-iso-graphic-plane charset)) min max) (cond ((eq charset 'eight-bit-control) (setq min 128 max 159)) ((eq charset 'eight-bit-graphic) (setq min 160 max 255)) (t (if (= chars 94) (setq min 33 max 126) (setq min 32 max 127)) (or (= plane 0) (setq min (+ min 128) max (+ max 128))))) (if (= dim 1) (format "[%c-%c]" (make-char charset min) (make-char charset max)) (format "[%c-%c]" (make-char charset min min) (make-char charset max max))))) (defun buffer-charsets () (find-charset-region (point-min) (point-max))) (defun display-buffer-charsets () "Displays list of charsets used in current buffer" (interactive) (let ((charsets (buffer-charsets)) (curr-buf-name (current-buffer))) (with-output-to-temp-buffer "*Buffer Charsets*" (save-excursion (set-buffer standard-output) (insert (format "Buffer %s uses the following charsets:\n" curr-buf-name)) (while charsets (insert (symbol-name (car charsets))) (insert "\n") (setq charsets (cdr charsets))))))) (defun charset-alist (charset-list) (let ((l (charset-list)) charset-alist) (while l (setq charset-alist (cons (list (symbol-name (car l))) charset-alist)) (setq l (cdr l))) charset-alist)) (defun show-buffer-charset-characters (charset face) "Uses hi-lock-mode to highlight by face characters of charset." (interactive (let ((completion-ignore-case t)) (list (completing-read "Charset:" (charset-alist (buffer-charsets)) nil t nil nil) (hi-lock-read-face-name)))) (highlight-regexp (charset-chars-regexp (intern charset)) face)) (defun unhighlight-charset (charset) (interactive (let ((completion-ignore-case t)) (list (completing-read "Charset:" (charset-alist (buffer-charsets)) nil t nil nil)))) (unhighlight-regexp (charset-chars-regexp (intern charset)))) ;(define-key hi-lock-map "\C-xwc" 'show-buffer-charset-characters) ;(define-key hi-lock-map "\C-xwu" 'unhighlight-charset) ; po-mode (setq auto-mode-alist (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist)) (autoload 'po-mode "po-mode" "Major mode for translators to edit PO files" t) ;(modify-coding-system-alist 'file "\\.po\\'\\|\\.po\\." 'po-find-file-coding-system) ;(autoload 'po-find-file-coding-system "po-mode") ;; set time to show in corner (setq display-time-day-and-date t) (display-time) ; cycle buffers with C-Tab, ignoring uninteresting ones ; ripped from http://www.dotemacs.de/dotfiles/KilianAFoth.emacs.html (defun backward-buffer () (interactive) "Switch to previously selected buffer." (let* ((list (cdr (buffer-list))) (buffer (car list))) (while (and (cdr list) (string-match "\\*" (buffer-name buffer))) (progn (setq list (cdr list)) (setq buffer (car list)))) (bury-buffer) (switch-to-buffer buffer))) (defun forward-buffer () (interactive) "Opposite of backward-buffer." (let* ((list (reverse (buffer-list))) (buffer (car list))) (while (and (cdr list) (string-match "\\*" (buffer-name buffer))) (progn (setq list (cdr list)) (setq buffer (car list)))) (switch-to-buffer buffer))) (global-set-key [(control tab)] 'backward-buffer) (global-set-key [(control shift tab)] 'forward-buffer) ; kill current buffer without confirmation ; ripped from http://www.dotemacs.de/dotfiles/DaveGallucci.emacs.html (defun kill-current-buffer () "Kill the current buffer, without confirmation." (interactive) (kill-buffer (current-buffer))) (global-set-key "\C-xk" 'kill-current-buffer) ;convert a buffer from dos ^M end of lines to unix end of lines (defun dos2unix () (interactive) (goto-char (point-min)) (while (search-forward "\r" nil t) (replace-match ""))) (defun turn-to-unix () (interactive) (set-buffer-file-coding-system 'iso-8859-1-unix)) (defun insert-time () (interactive) (insert (format-time-string "%Y-%m-%d"))) (defun insert-libpng-license () (interactive) (insert "/* Copyright (c) ") (insert (format-time-string "%Y")) (insert (format " %s <%s>\n" user-full-name user-mail-address)) (insert "\n") (insert "This software is provided 'as-is', without any express or implied\n") (insert "warranty. In no event will the authors be held liable for any damages\n") (insert "arising from the use of this software.\n") (insert "\n") (insert "Permission is granted to anyone to use this software for any purpose,\n") (insert "including commercial applications, and to alter it and redistribute it\n") (insert "freely, subject to the following restrictions:\n") (insert "\n") (insert " 1. The origin of this software must not be misrepresented; you\n") (insert " must not claim that you wrote the original software. If you use\n") (insert " this software in a product, an acknowledgment in the product\n") (insert " documentation would be appreciated but is not required.\n") (insert "\n") (insert " 2. Altered source versions must be plainly marked as such, and\n") (insert " must not be misrepresented as being the original software.\n") (insert "\n") (insert " 3. This notice may not be removed or altered from any source\n") (insert " distribution. */\n") (insert "\n") (insert "/* $Header:$ */\n") ) (defun insert-gpl () (interactive) (insert "/* Copyright (c) ") (insert (format-time-string "%Y")) (insert (format " %s <%s>\n" user-full-name user-mail-address)) (insert "\n") (insert "This program is free software; you can redistribute it and/or modify\n") (insert "it under the terms of the GNU General Public License as published by\n") (insert "the Free Software Foundation; either version 2 of the License, or\n") (insert "(at your option) any later version.\n") (insert "\n") (insert "This program is distributed in the hope that it will be useful,\n") (insert "but WITHOUT ANY WARRANTY; without even the implied warranty of\n") (insert "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n") (insert "GNU General Public License for more details.\n") (insert "\n") (insert "You should have received a copy of the GNU General Public License\n") (insert "along with this program; if not, write to the Free Software\n") (insert "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */\n") (insert "\n") (insert "/* $Header:$ */\n") ) ; convert end-of-line style (defun set-buffer-eol-conversion (type) "Convert buffer to TYPE line endings. TYPE should be one of the symbols: unix, dos, mac." (let ((old-bfcs buffer-file-coding-system)) (set-buffer-file-coding-system (coding-system-change-eol-conversion (cond ((null buffer-file-coding-system) 'undecided) ((eq buffer-file-coding-system 'no-conversion) 'raw-text) (buffer-file-coding-system)) type)) (unless (eq old-bfcs buffer-file-coding-system) ;; Larry Smith: This may be necessary to remove ^Ms when going ;; from unix to dos. FJW: When else? (if (eq type 'dos) (decode-coding-region (point-min) (point-max) buffer-file-coding-system)) (message "Coding system changed from %s to %s." old-bfcs buffer-file-coding-system) ))) (defun set-buffer-eol-conversion-unix () "Convert buffer to UNIX line endings" (interactive "*") (set-buffer-eol-conversion 'unix)) (defun set-buffer-eol-conversion-dos () "Convert buffer to MS-DOS line endings" (interactive "*") (set-buffer-eol-conversion 'dos)) (defun set-buffer-eol-conversion-mac () "Convert buffer to Macintosh line endings" (interactive "*") (set-buffer-eol-conversion 'mac)) (define-key global-map (vector '(control x) '(control m) ?:) 'set-buffer-eol-conversion-unix) (define-key global-map (vector '(control x) '(control m) ?\\) 'set-buffer-eol-conversion-dos) (define-key global-map (vector '(control x) '(control m) ?/) 'set-buffer-eol-conversion-mac) ; javascript mode (require 'generic-x) (when (locate-library "javascript") (autoload 'javascript-mode "javascript" nil t) (add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode)) (set-variable 'javascript-indent-level 2) ) ; reload the init file (defun reload-init-file () "Reload the .emacs file" ( interactive "*" ) (load-file "~/.emacs")) ; make TAGS (defun tags-generate-c-file () "generate TAGS file from c sources" (interactive) (setq shell-file-name "/bin/sh") (shell-command "etags *.cc *.hh *.c *.h *.cpp *.hpp 2>/dev/null")) ; turn on terminal type colors (defun black-background () "Switches colors to white on black." (interactive) (set-background-color "block") (set-foreground-color "white") (set-cursor-color "gray") ; (set-default-font "-outline-Times New Roman-normal-r-normal-normal-*-*-96-96-p-*-iso8859-1") ) ;;;;Use ANSI colors within shell-mode (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) ;;;;Change pasting behavior. Normally, it pastes where the mouse ;;;;is at, which is not necessarily where the cursor is. This changes ;;;;things so all pastes, whether they be middle-click or C-y or menu, ;;;;all paste at the cursor. (setq mouse-yank-at-point t) ;;;;The autosave is typically done by keystrokes, but I'd like to save ;;;;after a certain amount of time as well. (setq auto-save-timeout 1800) ;;;;What it says. Keeps the cursor in the same relative row during ;;;;pgups and dwns. (setq scroll-preserve-screen-position t) ;;;;;Accelerate the cursor when scrolling. (load "accel" t t) ;;;;This apparently allows seamless editting of files in a tar/jar/zip ;;;;file. (auto-compression-mode 1) ;; This function will format the whole file for you (defun indent-whole-buffer () (interactive) (indent-region (point-min) (point-max) 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 (:stipple nil :background "lightgray" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 160 :width normal :family "misc-fixed"))))) (add-to-list 'load-path "~/.emacs.d/site-lisp") (add-to-list 'load-path "/usr/local/share/emacs/site-lisp") ;;; Emacs/W3 Configuration (condition-case () (require 'w3-auto "w3-auto") (error nil)) ; html-helper-mode ;(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t) ;(setq auto-mode-alist (cons '("\\.[sj]?html?$" . html-helper-mode) auto-mode-alist)) ;(setq auto-mode-alist (cons '("\\.php[34]?$" . html-helper-mode) auto-mode-alist)) ;(setq auto-mode-alist (cons '("\\.epl$" . html-helper-mode) auto-mode-alist)) ; use mmm mode for html+embperl ; documentation: 'info mmm' ;(require 'mmm-vars) ;(require 'mmm-auto) ;(require 'mmm-sample) ; needed for embperl ;(require 'mmm-mason) ; needed for mason ;(setq mmm-global-mode 'maybe) ; now we setup mmm to automatically appear - if it is called for ;(setq auto-mode-alist (append '( ("\\.epl\\'" . html-mode)) auto-mode-alist)) ; add .epl to mmm file list ;(mmm-add-mode-ext-class nil "\\.epl\\'" 'embperl) ;(mmm-add-mode-ext-class nil "\\.html?\\'" 'embperl) ; unidiff mode (eval-after-load "diff-mode" '(progn (define-key diff-mode-map [(meta down)] 'diff-hunk-next) (define-key diff-mode-map [(meta up)] 'diff-hunk-prev) ) ) ; enable cedet lib ;(load-file "/usr/local/share/emacs/site-lisp/cedet/common/cedet.el") ;(semantic-load-enable-code-helpers) ;(setq semanticdb-default-save-directory "/tmp") ; enable ecb ;(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/ecb") ;(require 'ecb) ; enable OpenGL ;(add-hook 'c-mode-hook ; '(lambda () ; (cond ((string-match "/\\([Oo]pen\\)?[Gg][Ll]/" ; (buffer-file-name)) ; (require 'OpenGL) ; (OpenGL-minor-mode 1) ; (OpenGL-setup-keys))))) ;or (autoload 'OpenGL-minor-mode "OpenGL" "OpenGL editing utilities." t) (add-hook 'OpenGL-minor-mode-hook 'OpenGL-setup-keys) ; embperl (autoload 'embperl-minor-mode "embperl" "HTML::Embperl Mode" t) ; php (require 'php-mode) (add-hook 'php-mode-user-hook 'turn-on-font-lock) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; XSL mode (autoload 'xsl-mode "xslide" "Major mode for XSL stylesheets." t) ;; Uncomment if you want to use `xsl-grep' outside of XSL files. ;(autoload 'xsl-grep "xslide" "Grep for PATTERN in files matching FILESPEC." t) ;; Uncomment if you want to use `xslide-process' in `xml-mode'. ;(autoload 'xsl-process "xslide-process" "Process an XSL stylesheet." t) ;(add-hook 'xml-mode-hook ; (lambda () ; (define-key xml-mode-map [(control c) (meta control p)] ; 'xsl-process))) ;; Turn on font lock when in XSL mode (add-hook 'xsl-mode-hook 'turn-on-font-lock) (setq auto-mode-alist (append (list '("\\.fo" . xsl-mode) '("\\.xsl" . xsl-mode)) auto-mode-alist)) ;; Uncomment if using abbreviations ;(abbrev-mode t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; enable AuxTeX mode (require 'tex-site) ; enable preview-latex-mode (autoload 'LaTeX-preview-setup "preview") (add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) ; doxymacs mode (require 'doxymacs) (add-hook 'c-mode-common-hook'doxymacs-mode) (defun my-doxymacs-font-lock-hook () (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) (doxymacs-font-lock))) (add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook) ; enable css-mode (autoload 'css-mode "css-mode" "Mode for editing CSS files" t) (setq auto-mode-alist (append '(("\\.css$" . css-mode)) auto-mode-alist)) ; enable nxml-mode (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/nxml-mode") (load "rng-auto.el") (setq auto-mode-alist (cons '("\\.\\(xml\\|xsd\\|rng\\|xhtml\\)\\'" . nxml-mode) auto-mode-alist)) ; povray (autoload 'povray-mode "povray.el") (setq auto-mode-alist (cons '("\\.\\(pov\\)\\'" . povray-mode) auto-mode-alist)) ; octave mode (autoload 'octave-mode "octave-mod" nil t) (setq auto-mode-alist (cons '("\\.m$" . octave-mode) auto-mode-alist)) (add-hook 'octave-mode-hook (lambda () (abbrev-mode 1) (auto-fill-mode 1) (if (eq window-system 'x) (font-lock-mode 1)))) ; python mode (autoload 'python-mode "python-mode" "Python mode" t) (setq auto-mode-alist (append '(("\\.py$" . python-mode)) auto-mode-alist)) ; csv-mode (add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode)) (autoload 'csv-mode "csv-mode" "Major mode for editing comma-separated value files." t) ; ini-mode (autoload 'ini-mode "ini-mode" "Major mode for editing Windows style ini files." t) (setq auto-mode-alist (append '(("\\.[iI][nN][iI]$" . ini-mode)) auto-mode-alist)) ; syslog mode (require 'syslog-mode) (add-to-list 'auto-mode-alist '("/var/log.*\\'" . syslog-mode)) ; lilypond mode (autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t) (add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode)) (add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode)) (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) ; cmake mode (require 'cmake-mode) (setq auto-mode-alist (append '(("CMakeLists\\.txt\\'" . cmake-mode) ("\\.cmake\\'" . cmake-mode)) auto-mode-alist)) ; perl critic minor mode ;(autoload 'perlcritic "perlcritic" "" t) ;(autoload 'perlcritic-region "perlcritic" "" t) ;(autoload 'perlcritic-mode "perlcritic" "" t) ;(eval-after-load "cperl-mode" '(add-hook 'cperl-mode-hook 'perlcritic-mode)) ;(eval-after-load "perl-mode" '(add-hook 'perl-mode-hook 'perlcritic-mode)) ; quilt minor mode ; (load "quilt.el") ; start speedbar ;(when window-system ; start speedbar if we're using a window system ; (speedbar t)) ; ruby mode (require 'ruby-electric) ; nasl mode as javascript mode (setq auto-mode-alist (cons '("\\.\\(nasl\\|inc\\)\\'" . javascript-mode) auto-mode-alist)) ; muttrc mode (require 'muttrc) ; spamassassin mode (autoload 'spamassassin-mode "spamassassin-mode" nil t) (add-to-list 'auto-mode-alist '("\\.cf\\'" . spamassassin-mode)) ; major mode for Linux Magazin Artikel (require 'linmag-mode)