;;; -*- Mode: Emacs-Lisp -*- (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) ;;{{{ global keys (global-set-key "\C-xw" 'what-line) ;; Make F6 be `save-file' followed by `delete-window'. ;(global-set-key 'f6 "\C-x\C-s\C-x0") ;(global-set-key [select] 'end-of-buffer) ;(global-set-key [find] 'beginning-of-buffer) ;;}}} ;;{{{ global mouse bindings ;; Change the binding of mouse button 2, so that it inserts the ;; selection at point (where the text cursor is), instead of at ;; the position clicked. (define-key global-map 'button2 'x-insert-selection) (global-set-key 'button5 'scroll-up) (global-set-key 'button4 'scroll-down) ;;}}} ;;(load "~/lisp/my-menu") ;(setq load-path ; (nconc '("/usr/local/lib/xemacs/site-lisp") ; load-path)) (gnuserv-start) (setq gnuserv-frame (selected-frame)) (display-time) (savehist-load) (setq minibuffer-confirm-incomplete t complex-buffers-menu-p t next-line-add-newlines nil mail-yank-prefix "> " bell-volume 1 sound-alist nil gc-cons-threshold 1000000 minibuffer-max-depth nil options-save-faces t mark-ring-max 64 ) ;;(set-specifier default-toolbar nil) (setq mark-diary-entries-in-calendar t) (setq mark-holidays-in-calendar t) (fset 'yes-or-no-p 'y-or-n-p) (fset 'describe-function 'hyper-describe-function) (fset 'describe-variable 'hyper-describe-variable) ;;{{{ TAGS (setq tags-file-name "TAGS") (setq tag-table-alist '(("\\.cpp$" . "/usr/include/g++") ("\\.cp$" . "/usr/include/g++") ("\\.cc$" . "/usr/include/g++") ("\\.cc$" . "/usr/include") ("\\.c$" . "/usr/include") ("\\.java$" . "/usr/src/my/java/swing/src") ("\\.java$". "/usr/src/my/java") )) ;;}}} ;(setq ps-print-color-p nil) ;because of ps-print... (require 'mime-setup) (require 'crypt) ;;(load-library "completer") ;;{{{ func menu (require 'func-menu) ;;(define-key global-map 'f8 'function-menu) (add-hook 'find-file-hooks 'fume-add-menubar-entry) ;(define-key global-map "\C-cl" 'fume-list-functions) ;(define-key global-map "\C-cg" 'fume-prompt-function-goto) ;(define-key global-map '(shift button3) 'mouse-function-menu) ;(define-key global-map '(meta button1) 'fume-mouse-function-goto) ;;}}} ;;{{{ efs ;;; ******************** ;;; Load ange-ftp, which uses the FTP protocol as a pseudo-filesystem. ;;; When this is loaded, the pathname syntax /user@host:/remote/path ;;; refers to files accessible through ftp. ;;; ;; turn on font-lock in dired ;(if (console-on-window-system-p) ; (add-hook 'dired-load-hook ; #'(lambda () ; (setq dired-do-permission-highlighting-too t) ; (require 'dired-chmod) ; (require 'dired-xemacs-highlight) ; (set-face-foreground 'dired-face-marked "orange red") ; (set-face-foreground 'dired-face-deleted "yellow3") ; (set-face-foreground 'dired-face-socket "magenta") ; (set-face-foreground 'dired-face-setuid "red") ; (set-face-foreground 'dired-face-boring "DarkGoldenrod") ; (set-face-foreground 'dired-face-symlink "cyan") ; (set-face-foreground 'dired-face-executable "green") ; (set-face-foreground 'dired-face-directory "blue")) ; t)) (require 'dired) (require 'efs-auto) (setq efs-default-user "ftp" ; id to use for /host:/remote/path efs-generate-anonymous-password t ; use $USER@`hostname` efs-binary-file-name-regexp "." ; always transfer in binary mode ) ;;}}} ;;{{{ autosave (setq auto-save-directory ;(expand-file-name "~/autosaves/") (concat "/tmp/" (user-login-name) "-autosaves/") ; this is because of nfs $HOMES auto-save-directory-fallback auto-save-directory auto-save-hash-p nil ange-ftp-auto-save t ange-ftp-auto-save-remotely nil efs-auto-save 1 efs-auto-save-remotely nil ;; now that we have auto-save-timeout, let's crank this up ;; for better interactive response. auto-save-interval 2000 ) (require 'auto-save) ;;}}} ;;{{{ minibuffer (autoload 'resize-minibuffer-mode "rsz-minibuf" nil t) (resize-minibuffer-mode) (setq resize-minibuffer-window-exactly nil) ;;}}} ;;{{{ mail zeugs ;************** (setq user-mail-address "mr@kidata.de") (setq mail-host-address "sushi") ;(setq mail-host-address "") (setq send-mail-function 'smtpmail-send-it) (setq smtpmail-default-smtp-server "mail") (setq smtpmail-smtp-service "smtp") (setq smtpmail-local-domain nil) (setq smtpmail-debug-info t) (setq smtpmail-from-code "kidata.de") (setq smtpmail-code-conv-from nil) (load-library "smtpmail") (setq user-full-name "Michael Rohleder") ;(setq send-mail-function 'feedmail-send-it) ;(autoload 'feedmail-send-it "feedmail") ;(setq feedmail-from-line "mike@mroh.gun.de (Michael Rohleder)") (setq mail-signature t) (setq message-signature t) (setq mail-signature-file "~/.signature") ;face Zeugs (defun mail-insert-x-face () (save-excursion (goto-char (point-min)) (search-forward mail-header-separator) (beginning-of-line) (insert "X-Face:") (insert-file-contents "~/.face")) ) (add-hook 'mail-setup-hook 'mail-insert-x-face) ;; ***** mailcrypt ;;**************** (autoload 'mc-install-write-mode "mailcrypt" nil t) (autoload 'mc-install-read-mode "mailcrypt" nil t) (add-hook 'mail-mode-hook 'mc-install-write-mode) ;; Mailcrypt configuration for accessing key server through HTTP proxy (setq mc-pgp-keyserver-address "pgp.ai.mit.edu") (setq mc-pgp-keyserver-port 80) ; Your proxy's port (setq mc-pgp-keyserver-url-template "http://pgp.ai.mit.edu/htbin/pks-extract-key.pl?op=get&search=%s") (setq mime-editor/split-message nil) ;dont split large messages ;;}}} ;;{{{ **************** modes ***************** ;;{{{ hs-mode (load-library "hideshow") (defun my-hs-setup () "enables hideshow and binds some commands" (hs-minor-mode 1) (define-key hs-minor-mode-map [f5] 'hs-hide-block) (define-key hs-minor-mode-map [f6] 'hs-show-block) ) ;; (add-hook 'X-mode-hook 'my-hs-setup t) ; other modes similarly ;;}}} ;;{{{ c-mode (defun my-c-mode-common-hook () (setq c-basic-offset 2) (setq c-block-comments-indent-p 3) ;; Tell cc-mode not to check for old-style (K&R) function declarations. ;; This speeds up indenting a lot. (setq c-recognize-knr-p nil) ;; keybindings for all supported languages. We can put these in ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map, ;; java-mode-map, and idl-mode-map inherit from it. (define-key c-mode-base-map "\C-m" 'newline-and-indent) ;; we like auto-newline and hungry-delete ;; (c-toggle-auto-hungry-state 1) (set indent-tab-mode nil) ;i dont want tabs ;; (c-set-style "bsd") ) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) (add-hook 'c-mode-common-hook 'my-hs-setup) ;; linus style ;(setq c-indent-level 2) ;(setq c-brace-imaginary-offset 0) ;(setq c-brace-offset -2) ;(setq c-argdecl-indent 2) ;(setq c-label-offset -2) ;(setq c-continued-statement-offset 2) ;(setq indent-tabs-mode nil) ;(setq tab-width 2) ;(setq c-brace-offset 2) ; c-cleanup-list ;;}}} ;;{{{ java Zeugs ;(defun my-java-mode-hook () ; (setq fume-auto-rescan-buffer-p nil) ; (message "my-jde-mode-hook function executed") ;) ;(add-hook 'java-mode-hook 'my-java-mode-hook) ;(setq fume-function-name-regexp-java nil) ; Too slow in Java.... (load "jde") ;(setq jde-web-browser "BROWSER") ;(setq jde-doc-dir "/autofs/gw/doc/jdk-docs-1.1.5/") (jde-db-set-source-paths "/usr/src/my/java/studio/studio") ; wird anscheinend nicht aufgerufen, das cc- mode?? (defun my-jde-mode-hook () ;;(hs-minor-mode) (define-key jde-mode-map [f9] 'jde-compile) (setq c-basic-offset 2) ;(message "my-jde-mode-hook function executed") ) (add-hook 'jde-mode-hooks 'my-jde-mode-hook) (setq javahelp-directories '("/pub/doc/java/jdk1.1.8/docs/api/" "/usr/src/my/java/swing/doc/api" ) ) (load "~/lisp/javahelp") (load "~/lisp/jdok") ;C-cj ;;}}} ;;{{{ compile-mode (defun my-compile-mode-hook () (define-key compilation-mode-map [f12] 'recompile) ) (add-hook 'compilation-mode-hook 'my-compile-mode-hook) ;;}}} ;;{{{ bc-mode (autoload 'bc-mode "bc-mode" "Minor-mode for formatting right-margin block-style comments in source code." t) ;;}}} ;;{{{ SQL-Mode ;(setq auto-mode-alist (cons '("\\.sql$" . sql-mode) auto-mode-alist)) ;(setq auto-mode-alist (cons '("\\.msql$" . msql-mode) auto-mode-alist)) ;(defun msql-mode nil ; "Start SQL mode and tailor it to mSQL" ; (interactive) ; (sql-mode) ; (sql-msql) ;) ;(autoload 'sql "sql-mode" ; "Start the interactive SQL interpreter in a new buffer." t) ;(autoload 'sql-mode "sql-mode" ; "Mode for editing SQL files and running a SQL interpetror." t) ;;}}} ;;{{{ xpm mode (setq auto-mode-alist (append '(("\\.xpm$" . xpm-mode)) auto-mode-alist)) (autoload 'xpm-mode "xpm-mode") ;;}}} ;;{{{ folding mode ;(setq fold-default-mouse-keys-function 'my-fold-bind-mouse) ;(defun my-fold-bind-mouse () ; "My favourite folding mouse keys" ; (define-key folding-mode-map [mouse-1] ; 'fold-mouse-context-sensitive) ; ;; ; ;; If you define mouse-3, The Emacs default mouse-3 ; ;; won't work. Sorry. But mouse-3 may be handy in folding mode. ; (define-key folding-mode-map [mouse-3] 'fold-hide) ; (define-key folding-mode-map [S-mouse-2] 'fold-mouse-pick-move) ; ) (load "folding" 'nomessage 'noerror) ;(autoload 'folding-mode "folding-mode") (fold-add-to-marks-list 'jde-mode "// {{{ " "// }}}" nil t) (folding-mode-add-find-file-hook) ;;}}} ;;{{{ sgml-mode ;;************************* (setq sgml-live-element-indicator t) (setq sgml-balanced-tag-edit t) (setq sgml-auto-insert-required-elements t) (setq sgml-custom-markup '(("" "\n") ("" "\n") ) ) ;;}}} ;;{{{ bbdb-mode ;;************************* (autoload 'bbdb "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-name "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-company "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-net "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-notes "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-insinuate-vm "bbdb-vm" "Hook BBDB into VM") (autoload 'bbdb-insinuate-rmail "bbdb-rmail" "Hook BBDB into RMAIL") (autoload 'bbdb-insinuate-mh "bbdb-mhe" "Hook BBDB into MH-E") (autoload 'bbdb-insinuate-gnus "bbdb-gnus" "Hook BBDB into GNUS") (autoload 'bbdb-insinuate-sendmail "bbdb" "Hook BBDB into sendmail") (autoload 'bbdb-ftp "bbdb-ftp" "Ftp BBDB Package" t) (autoload 'bbdb-create-ftp-site "bbdb-ftp" "Ftp BBDB Package" t) (setq bbdb/mail-auto-create-p nil) ; do not create a record 4 each mail (setq bbdb-use-pop-up t) ; i dont want this frame (define-key mail-mode-map "\M-." 'bbdb-complete-name) ;weil M-TAB im kde nicht geht?! ;;}}} ;;{{{ ics (autoload 'ics "~/lisp/ics-devel" "ics package" t) (add-hook 'ics-startup-hook (function (lambda () ;; handle and a funky regexp for highlighting (setq ics-default-handle "MRohleder") (setq ics-handle-regexp '("[mM][Rr]ohleder" 0)) ;; I want it to send my handle (setq ics-send-handle t) ;; I like the buttons even if they are buggy (setq ics-add-buttons t) ;; I like abbrevs (setq ics-use-abbrev-mode t) ;; my emacs windows are light coloured backgrounds (setq ics-background-mode 'light) ;; reset the aliases list to use timestamp/timeseal ;; where possible (setq ics-servers-alist '(("i" "ICC" "204.178.125.65" "5000" "timestamp") ; chess.lm.com ("f" "mroh-timestamp" "mroh" "5500" "telnet") ; ics.onenet.net ("e" "mroh" "mroh" "5000" "telnet") ; mroh ;("d" "D-FICS" "193.78.33.69" "5000" "telnet") ; dds.hacktic.nl ;("b" "B-FICS" "137.205.192.12" "5000" "telnet") ; holly.csv.warwick.ac.uk ;("g" "G-FICS" "131.246.89.3" "5000" "telnet") ; chess.unix-ag.uni-kl.de ;("m" "M-FICS" "132.76.80.77" "5000" "telnet") ; wisdom.weizmann.ac.il ))))) ;;}}} ;;{{{ perl mode ;(autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl programs" t) (load "cperl-mode") (setq cperl-hairy t) (setq auto-mode-alist (append '(("\\.[pP][Llm]$" . cperl-mode)) auto-mode-alist )) (setq interpreter-mode-alist (append interpreter-mode-alist '(("miniperl" . cperl-mode)))) (setq cperl-help t) (add-hook 'cperl-mode-hook 'my-hs-setup) ;;}}} ;;{{{ zone mode (load "~/lisp/zone-mode") ;;}}} ;;{{{ lisp mode ;; LISPM bindings of Control-Shift-C and Control-Shift-E. ;; Note that "\C-C" means Control-C, not Control-Shift-C. ;; To specify shifted control characters, you must use the ;; more verbose syntax used here. ;(define-key emacs-lisp-mode-map '(control C) 'compile-defun) ;(define-key emacs-lisp-mode-map '(control E) 'eval-defun) ;;; Edebug is a source-level debugger for emacs-lisp programs. ;(define-key emacs-lisp-mode-map "\C-xx" 'edebug-defun) (add-hook 'emacs-lisp-mode-hook 'my-hs-setup) ;;}}} ;;{{{ zenirc ;(load "~/lisp/myzenirc") ;;}}} ;;{{{ ircchat ; seems to be very buggy... disconnects after some time... ;(load "/home/mike/lisp/irchat-mrz/irchat.el") ;(load "/home/mike/lisp/irchat-mrz/mrz.irchat.setqs.el") ;;}}} ;;}}} ;;{{{ paren (setq paren-mode 'paren) (setq paren-message-offscreen t) ;;}}} ;;{{{ mode alist (setq auto-mode-alist (cons '("\\.phtml$" . html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.php3$" . html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.shtml3$" . hm--html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.rxml$" . hm--html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.js$" . c-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.xrtl$" . sgml-mode) auto-mode-alist)) ;;}}} (autoload 'imenu-choose-buffer-index "imenu" "Menu of buffer index." t) (autoload 'imenu-cctags-jump-tag "imenu-cctags" "Menu of tags index." t) ;;{{{ radix (autoload 'number-to-number "radix" "Convert NUMBER in radix RADIX1 to string in radix RADIX2." t) (autoload 'hex-to-string "radix" "Convert arg HEX ascii to a one-character string." t) (autoload 'string-to-hex "radix" "Convert arg STRING to hexadecimal ascii." t) (autoload 'apply-operator "radix" "Apply OPERATOR, returning in radix RADIX, to NUMBERS." t) ;;}}} ;;(autoload 'gdbsrc "gdbsrc" "gdbsrc" t) (add-hook 'gdb-mode-hook '(lambda () (require 'gdb-highlight))) ;;{{{ rpm (autoload 'rpm "rpm" "Shell for the rpm package management utility." t) ;; (autoload 'rpm-dired-install "rpm" "Install all marked (or next ARG) rpm-files." t) ;;}}} ;;{{{ igrep (autoload (function igrep) "igrep" "*Run `grep' to match EXPRESSION in FILES..." t) (autoload (function egrep) "igrep" "*Run `egrep'..." t) (autoload (function fgrep) "igrep" "*Run `fgrep'..." t) (autoload (function igrep-recursively) "igrep" "*Run `grep' recursively..." t) (autoload (function egrep-recursively) "igrep" "*Run `egrep' recursively..." t) (autoload (function fgrep-recursively) "igrep" "*Run `fgrep' recursively..." t) ;;; Usage: ;;; ;;; M-x igrep M-x egrep M-x fgrep ;;; M-x igrep-recursively M-x egrep-recursively M-x fgrep-recursively ;;; (Each of the 6 igrep commands accepts 1, 2, or 3 `C-u' prefix arguments). ;;; C-x ` (M-x next-error) ;;}}} ;;{{{ cvs (require 'vc-hooks) ;;(load-library "pcl-cvs-xemacs") ;;}}} ;;{{{ id-select (add-hook 'mouse-track-click-hook 'id-select-double-click-hook) (autoload 'id-select-and-kill-thing "id-select" "Kill syntactical region selection" t) (autoload 'id-select-and-copy-thing "id-select" "Select and copy syntactical region" t) (autoload 'id-select-double-click-hook "id-select" "Double mouse click syntactical region selection" nil) (autoload 'id-select-thing "id-select" "Keyboard-driven syntactical region selection" t) (autoload 'id-select-thing-with-mouse "id-select" "Single mouse click syntactical region selection" t) ;; for selecting a class in java ;(add-hook 'java-mode-hook ; (function ; (lambda () ; (setq defun-prompt-regexp ; "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*")))) ;;; for selecting a class in c++ ;(add-hook 'c++-mode-hook ; (function ; (lambda () ; (setq defun-prompt-regexp ; "^[ \t]*\\(template[ \t\n\r]*<[^>;.{}]+>[ \t\n\r]*\\)?\\(\\(\\(auto\\|const\\|explicit\\|extern[ \t\n\r]+\"[^\"]+\"\\|extern\\|friend\\|inline\\|mutable\\|overload\\|register\\|static\\|typedef\\|virtual\\)[ \t\n\r]+\\)*\\(\\([[a-zA-Z0-9 ,]+>[ \t\n\r]*[*&]*\\|[[a-zA-Z0-9]*\\(::[[a-zA-Z0-9]+\\)?[ \t\n\r]*[*&]*\\)[*& \t\n\r]+\\)\\)?\\(\\(::\\|[[;{}]+>[ \t\n\r]*[*&]*::\\|[[a-zA-Z0-9]*[ \t\n\r]*[*&]*::\\)[ \t\n\r]*\\)?\\(operator[ \t\n\r]*[^ \t\n\r:;.,?~{}]+\\([ \t\n\r]*\\[\\]\\)?\\|[_~;{}]+[ \t\n\r>]*>\\|[_~a-zA-Z0-9]*\\)\\)[ \t\n\r]*\\(([^{;]*)\\(\\([ \t\n\r]+const\\|[ \t\n\r]+mutable\\)?\\([ \t\n\r]*[=:][^;{]+\\)?\\)?\\)\\s-*")))) ;; If you want tags, comments, sentences and text blocks to be selectable ;; in HTML mode, you need to add the following to your personal ;; initializations (You would do something similar for SGML mode.): ;; ;; ;; Make tag begin and end delimiters act like grouping characters, ;; ;; for easy syntactical selection of tags. (add-hook 'html-mode-hook (function (lambda () (modify-syntax-entry ?< "(>" html-mode-syntax-table) (modify-syntax-entry ?> ")<" html-mode-syntax-table) (modify-syntax-entry ?\" "\"" html-mode-syntax-table) (modify-syntax-entry ?= "." html-mode-syntax-table) (make-local-variable 'comment-start) (make-local-variable 'comment-end) (setq comment-start "") (make-local-variable 'sentence-end) (setq sentence-end "\\([^ \t\n\r>]<\\|>\\(<[^>]*>\\)*\\|[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)\\)[ \t\n]*") (define-key html-mode-map "\C-c." 'id-select-goto-matching-tag) ))) ;;}}} ;;{{{ font lock ;;; ;;; (set-face-foreground 'font-lock-function-name-face "blue") ;;; (set-face-foreground 'font-lock-comment-face "red") ;;; (set-face-foreground 'font-lock-string-face "forest green") ;;; (make-face-unitalic 'font-lock-string-face) ;;; (make-face-unitalic 'font-lock-function-name-face) (require 'font-lock) (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) (add-hook 'lisp-mode-hook 'turn-on-font-lock) (add-hook 'c-mode-hook 'turn-on-font-lock) (add-hook 'java-mode-hook 'turn-on-font-lock) (add-hook 'c++-mode-hook 'turn-on-font-lock) (add-hook 'perl-mode-hook 'turn-on-font-lock) (add-hook 'tex-mode-hook 'turn-on-font-lock) (add-hook 'texinfo-mode-hook 'turn-on-font-lock) ;; (add-hook 'dired-mode-hook 'turn-on-font-lock) (add-hook 'html-mode-hook 'turn-on-font-lock) (add-hook 'makefile-mode-hook 'turn-on-font-lock) (add-hook 'tcl-mode-hook 'turn-on-font-lock) (add-hook 'zone-mode-hook 'turn-on-font-lock) (add-hook 'shell-mode-hook 'turn-on-font-lock) ;(remove-hook 'font-lock-mode-hook 'turn-on-fast-lock) ;(add-hook 'font-lock-mode-hook 'turn-on-lazy-lock) (setq-default font-lock-auto-fontify t) (setq-default font-lock-use-fonts '(or (mono) (grayscale))) (setq-default font-lock-use-colors '(color)) (setq-default font-lock-maximum-decoration t) ;;}}} ;;{{{ W3 ;(setq url-be-asynchronous t) ;(setq w3-delay-image-loads t) ;(setq w3-use-ps-print t) (setq url-personal-mail-address "mr@kidata.de") ;;(setq w3-use-telnet t ;; ;; ;; ;; If the Telnet program you use to access the outside world is ;; ;; not called "telnet", specify its name like this. ;; w3-telnet-prog "itelnet" ;; ;; ;; ;; If your Telnet program adds lines of junk at the beginning ;; ;; of the session, specify the number of lines here. ;; w3-telnet-header-length 4 ;; ) ;;}}} ;;{{{ recent files (load "recent-files") (recent-files-initialize) (setq recent-files-permanent-submenu t) (setq recent-files-number-of-entries 25) ;;}}} ;;{{{ desktop ;;************ (load "desktop") (desktop-load-default) (desktop-read) ;;desktop-save ;;}}} ;;{{{ yank menu ;********************************** (defvar yank-menu-length 30 "*Maximum length of an item in the menu for select-and-yank.") (defun select-and-yank-filter (menu) (let* ((count 0)) (append menu (mapcar #'(lambda (str) (if (> (length str) yank-menu-length) (setq str (substring str 0 yank-menu-length))) (prog1 (vector str (list 'progn '(push-mark (point)) (list 'insert (list 'current-kill count t))) t) (setq count (1+ count)))) kill-ring)))) (add-submenu '("Edit") '("Kill-Ring" :included kill-ring :filter select-and-yank-filter)) ;;}}} ;;{{{ disabled ;(fset 'libc-index ; [(control h) i m g l i b c return m F u n c t i o n space I n d e x return]) ;; Make backspace and delete be the same. This doesn't work in all ;; cases; a better way would be to use xmodmap. ;; (global-set-key 'backspace [delete]) ;; (global-set-key '(meta backspace) [(meta delete)]) ;; (global-set-key '(control backspace) [(control delete)]) ;; (global-set-key '(meta control backspace) [(meta control delete)]) ;; Change the cursor used during garbage collection. ;; ;; Note that this cursor image is rather large as cursors go, and so it ;; won't work on some X servers (such as the MIT R5 Sun server) because ;; servers may have lamentably small upper limits on cursor size. ;;(if (featurep 'xpm) ;; (setq x-gc-pointer-shape ;; (expand-file-name "trash.xpm" data-directory))) ;; Here's another way to do that: it first tries to load the cursor ;; once and traps the error, just to see if it's possible to load that ;; cursor on this system; if it is, then it sets x-gc-pointer-shape, ;; because we knows that will work. Otherwise, it doesn't change that ;; variable because we know it will just cause some error messages. ;(if (featurep 'xpm) ; (let ((file (expand-file-name "recycle.xpm" data-directory))) ; (if (condition-case error ; (make-cursor file) ; returns a cursor if successful. ; (error nil)) ; returns nil if an error occurred. ; (setq x-gc-pointer-shape file)))) ;; ************ ;; HyperBole ;;(load "hversion") ;;(load "hyperbole") ;;;(require 'hsite) ;; ***************** ;; OO-Browser ;(autoload 'oobr "br-start" "Invoke the OO-Browser" t) ;(autoload 'br-env-browse "br-start" ; "Browse an existing OO-Browser Environment" t) ;(global-set-key "\C-c\C-o" 'oobr) ;(add-menu-item '("Programming") "OO-br" 'oobr t) ;; ************* ;; TCL ;(autoload 'inferior-tcl "tcl" "Run inferior Tcl process." t) ;(setq tcl-help-directory-list '("/usr/local/lib/tclX/7.3b/")) ;(autoload 'tcl-help-on-word "tcl" "Help on Tcl commands" t) ;(setq tcl-application "tkChess") ;(require 'find-file) ;(define-key global-map "\C-co" 'ff-find-other-file) ;(add-menu-item '("Programming") "find-other-file" 'ff-find-other-file t) ;(add-menu-item '("Programming") "C++-Jump-Tag" 'imenu-cctags-jump-tag t) ;;(cond (window-system ;; (define-key global-map [M-down-mouse-3] 'imenu-cctags-jump-tag))) ;;*************** ;(require 'ps-print) ;;(autoload 'ps-print-buffer "ps-print" ;; "Generate and print a PostScript image of the buffer..." t) ;(add-menu-item '("Programming") "PS-Print-Faces" 'ps-print-buffer-with-faces t) ;;************ ;;(autoload 'archie "archie" "Archie interface" t) ;;************ ;; two-column ;; (define-key function-keymap "\^b" ;; '(lambda () (interactive) ;; (load-library "two-column") ;; (define-key function-keymap "\^b" two-column:mode-map) ;; (call-interactively ;; (cdr (assq (read-char) two-column:mode-map))))) ;;fvwm-mode ;;****************** ;(setq auto-mode-alist ; (append '(("\\.fvwm$" . fvwm-mode) ; (".fvwmrc$" . fvwm-mode)) ; auto-mode-alist)) ;(autoload 'fvwm-mode "fvwm-mode" "Mode for editing fvwm config files") ;(add-hook 'fvwm-mode-hook ; '(lambda () ; (font-lock-mode t) ; (setq font-lock-keywords fvwm-font-lock-keywords) ; (font-lock-fontify-buffer))) ;;***************** (geht nicht??!) ;(autoload 'live-find-file "" "View a file with \"tail -f\"" t) ;(setq mc-pgp-fetch-methods '(mc-pgp-fetch-from-keyrings)) ;(setq mc-pgp-fetch-keyring-list '("/usr/share/pgp/pubring.pgp")) ;{{{ switch from header to impl (defun switch-cc-to-h () (interactive) (when (string-match "^\\(.*\\)\\.\\([^.]*\\)$" buffer-file-name) (let ((name (match-string 1 buffer-file-name)) (suffix (match-string 2 buffer-file-name))) (cond ((string-match suffix "c\\|cc\\|C\\|cpp") (cond ((file-exists-p (concat name ".h")) (find-file (concat name ".h")) ) ((file-exists-p (concat name ".hh")) (find-file (concat name ".hh")) ) )) ((string-match suffix "h\\|hh") (cond ((file-exists-p (concat name ".cc")) (find-file (concat name ".cc")) ) ((file-exists-p (concat name ".C")) (find-file (concat name ".C")) ) )) ) ) ) ) (global-set-key '(meta h) 'switch-cc-to-h) ;(defun switch-c-to-h () (interactive) ; (let ((buf (buffer-name))) ; (cond ;;; C++ ; ((string-match "\\.cc$" buf) ; (find-file (concat (substring buf 0 (string-match "\\.cc$" buf)) ;".hh")) ; ) ; ((string-match "\\.hh$" buf) ; (find-file (concat (substring buf 0 (string-match "\\.hh$" buf)) ;".cc")) ; ) ;;; C++ vc style ; ((string-match "\\.cpp$" buf) ; (find-file (concat (substring buf 0 (string-match "\\.cpp$" ;buf)) ".h")) ; ) ; ((string-match "\\.h$" buf) ; (find-file (concat (substring buf 0 (string-match "\\.h$" buf)) ;".cpp")) ; ) ;;; libg++ templates ; ((string-match "\\.ccP$" buf) ; (find-file (concat (substring buf 0 (string-match "\\.ccP$" ;buf)) ".hP")) ; ) ; ((string-match "\\.hP$" buf) ; (find-file (concat (substring buf 0 (string-match "\\.hP$" buf)) ;".ccP")) ; ) ; ) ; ) ;) ;(define-key global-map '(meta h) 'switch-c-to-h) ;}}} ;; do % parenthesis matching in emacs, as in vi ;; From Eric Hendrickson edh@med.umn.edu ;(defun match-paren (arg) ; "Go to the matching parenthesis if on parenthesis." ; (interactive "p") ; (cond ((looking-at "[([{]") (forward-sexp 1) (backward-char)) ; ((looking-at "[])}]") (forward-char) (backward-sexp 1)))) ;(global-set-key "\M-%" 'match-paren) ;; W3 Options Settings ;; =================== ;; (setq-default w3-delay-image-loads t) ;; (setq-default w3-delay-mpeg-loads t) ;; (setq-default ps-print-color-p nil) ;; (setq-default w3-color-use-reducing t) ;; (setq-default w3-color-filter 'ppmdither) ;; (setq-default w3-dump-to-disk nil) ;; (setq-default url-automatic-caching t) ;; (setq-default url-standalone-mode nil) ;; (setq-default url-use-hypertext-gopher t) ;; (setq-default url-use-hypertext-dired t) ;; (setq-default url-proxy-services t) ;; (setq-default url-using-proxy "http://gw:3128/") ;; (setq-default url-be-asynchronous t) ;; (setq-default w3-default-homepage "http://www.rohleder.de/") ;; (setq-default url-privacy-level 'none) ;; (setq-default w3-toolbar-orientation 'top) ;; ========================== ;; End of W3 Options Settings ;;}}} ;;{{{ Options Menu Settings ;; ===================== (load-options-file "/home/mike/.xemacs-options") ;; ============================ ;;}}} End of Options Menu Settings ;;{{{ custom zeugs (setq custom-file "/home/mike/.xemacs/options.el") (load custom-file) ;;}}} (load-file "~/lisp/.XEMACS-colors") ;from mrz (nice black...)