The very unofficial .emacs home SteveMolitor.emacs
emacs
Sections
home
what is this all about ?
customization basics
special topics
local dotfiles
dotfiles on the web
new and updated pages
useful sites and pages
search locally
EMacro
OS/2 Emacs
Latest Additions
local files:
John J. Glynn
David Jolley

linked files:


articles:


links:
The Emacs wiki
ODP search for Emacs


dmoz.org
;;;; .emacs -- Steve Molitor's .emacs file


;;; bash shell
(setenv "PID" nil)

(setq explicit-shell-file-name "d:/cygnus/cygwin-b20/H-i586-cygwin32/bin/bash.exe")
(setenv "PS1" "`pwd`$ ")

(defun my-shell-setup ()  "For bash (cygwin 20) under Emacs 20"
  (setq comint-scroll-show-maximum-output 'this)
  (setq comint-completion-addsuffix t)
  ;; (setq comint-process-echoes t) ;; reported that this is no longer needed
  (setq comint-eol-on-send t)  (setq w32-quote-process-args ?\")
  (make-variable-buffer-local 'comint-completion-addsuffix))
(setq shell-mode-hook 'my-shell-setup)
(setq process-coding-system-alist (cons '("bash" . raw-text-unix)
                                        process-coding-system-alist))

;;; key bindings, miscellaneous command settings
(put 'narrow-to-region 'disabled nil)

(global-set-key "\C-xw" 'what-line)
(global-set-key [f9] 'shell)
(global-set-key "\C-cs" 'shell)
(global-set-key [f7] 'compile)
(global-set-key "\C-cm" 'compile)
(global-set-key "\C-cd" 'kill-some-buffers)

;;; title bar
(cond ((featurep 'xemacs)
       (setq frame-title-format
             (concat "%S: " "   --- Steve's XEmacs ---           Current buffer is " " %b"))))

;;; C/C++ setttings
(setq auto-mode-alist
      (append '(("\\.C$"  . c++-mode)
                ("\\.cc$" . c++-mode)
                ("\\.hh$" . c++-mode)
                ("\\.c$"  . c-mode)
                ("\\.h$"  . c++-mode)
                ("\\.hpp$" . c++-mode)
                ("\\.cpp$" . c++-mode)
                ("\\.ec$" . c++-mode)
                ("\\.tcpp$" . c++-mode)
                ("\\.mak$" . makefile-mode))
              auto-mode-alist))

(setq c-recognize-knr-p nil)

(defun my-c-mode-common-hook ()
  (c-set-style "stroustrup")
  (c-set-offset 'case-label '+)  
  (c-set-offset 'comment-intro 0)
  (c-set-offset 'c 0)
  (require 'ctypes)
  (turn-on-font-lock)
  )
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

(defun my-ctypes-load-hook()
  (ctypes-read-file "~/.ctypes" nil t t))
(add-hook 'ctypes-load-hook 'my-ctypes-load-hook)

;;; func-menu
(cond ((featurep 'xemacs)
       (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)

       ;; For descriptions of the following user-customizable variables,
       ;; type C-h v <variable>
       (setq fume-max-items 25
             fume-fn-window-position 3
             fume-auto-position-popup t
             fume-display-in-modeline-p nil
             fume-menubar-menu-location "File"
             fume-buffer-name "*Function List*"
             fume-no-prompt-on-valid-default nil)
       ))



;;; resize minibuffer
;;; ********************
;;; resize-minibuffer-mode makes the minibuffer automatically
;;; resize as necessary when it's too big to hold its contents.
(autoload 'resize-minibuffer-mode "rsz-minibuf" nil t)
(resize-minibuffer-mode)
(setq resize-minibuffer-window-exactly nil)

;;; font lock
(cond ((featurep 'xemacs)

;       (setq font-lock-use-default-fonts nil)
;       (setq font-lock-use-default-colors nil)

       (require 'font-lock)

;;         (set-face-foreground 'font-lock-string-face "forest green")
;;       (set-face-foreground 'font-lock-comment-face "red")
;;
;;       ;; function names are bold and blue
;;       (copy-face 'bold 'font-lock-function-name-face)
;;       (set-face-foreground 'font-lock-function-name-face "blue")
;;
;;       ;; misc. faces
;;       (copy-face 'bold 'font-lock-variable-name-face)
;;       (set-face-foreground 'font-lock-variable-name-face "blue")
;;       (copy-face 'bold 'font-lock-type-face)
;;       (set-face-foreground 'font-lock-type-face "black")
;;       (copy-face 'bold 'font-lock-keyword-face)
       ))

(set-face-font 'default "Courier New:Regular:12::Western")

;;; mode line stuff
(setq display-time-day-and-date t)
(display-time)
(line-number-mode t)
(column-number-mode t)
;;; tags
(setq tag-table-alist
      '(("\\.el$" . (expand-file-name "~/xemacs/TAGS"))
        ("\\Enterprise\\EDGE" . ("d:\\Enterprise\\Edge\\Phase1_D2\\Development\\TAGS"))
        ("\\Enterprise\\Architecture" . ("d:\\Enterprise\\Architecture\\TAGS"))
        ("epackages" . (expand-file-name "~/epackages/TAGS"))))

;;; load some elisp files
(if (not (member (expand-file-name "~/lisp") load-path))
    (setq load-path (append load-path (list (expand-file-name "~/lisp")))))

(if (string= (getenv "OS") "linux")
    (progn
      (require 'battery-status)
      (battery-status)))

(require 'python-mode)
(require 'rec-files)
(require 'utils)
(require 'ss-mode)
(require 'cxx)

;;; some functions
(defun push-line ()
  "Select current line, push onto kill ring."
  (interactive)
  (save-excursion
    (copy-region-as-kill (re-search-backward "^") (re-search-forward "$"))))
(global-set-key "\C-cp" 'push-line)

(defun push-rest-of-line ()
  "Select text from point to end of current line, push onto kill ring."
  (interactive)
  (save-excursion
    (copy-region-as-kill (point) (re-search-forward "$"))))
(global-set-key "\C-ck" 'push-rest-of-line)


;;; transient mark mode
(setq zmacs-regions nil)


(remove-hook 'after-init-hook 'after-init-display-warnings)  


;;; oo-browser
(setq load-path (append
                 '("D:/home/steve/oo-browser"
                   "D:/home/steve/oo-browser/hypb")
                 load-path))
(load "br-start")
(global-set-key "\C-c\C-o" 'oo-browser)


;; margins
(set-screen-left-margin-width 2)

(cd "~")

;;; vm
;(setq vm-spool-files '("pop4.ibm.net:110:pass:el4807g:walter"))
;(setq vm-folder-directory "~/vm-save")


;;; mail
(setq user-full-name "Stephen Molitor")
(setq user-mail-address "smolitor@erac.com")

(setq smtpmail-default-smtp-server "smtp1.ibm.net")
(setq smtpmail-local-domain nil)
(setq send-mail-function 'smtpmail-send-it)
(load-library "smtpmail")

;;; gnus
(require 'gnus)
(setq gnus-select-method '(nntp "news1.ibm.net"))
(setq message-send-mail-function 'smtpmail-send-it)
(setq gnus-post-method '(nntp "news1.ibm.net"))
(setq gnus-always-read-dribble-file t)
(add-hook 'gnus-article-mode-hook 'turn-on-auto-fill)

(require 'pop3)
(setq gnus-secondary-select-methods '((nnml "")))
(setq nnmail-movemail-program 'nnmail-pop3-movemail)
(setq pop3-maildrop "el4807g")
(setq pop3-mailhost "pop4.ibm.net")
(setq nnmail-pop-password-required t)
(setq pop3-authentication-scheme 'pass)
(setq pop3-password "walter")
(setq nnmail-spool-file "po:el4807g")

(setq nnmail-split-methods
      '(("mail.harp-l" "harp-l")
        ("mail.batch-errors" "^From:.*sa1003@erac.com")
        ("mail.enterprise" "^From:.*erac.com")
        ("mail.other" "")))

(setq gnus-posting-styles
      '((".*"
         (signature-file "~/.signature")
              (name "Steve Molitor"))))

;;; speedbar
(require 'speedbar)
(global-set-key [(f4)] 'speedbar-get-focus)


;;; bbbd
(require 'bbdb)
(bbdb-initialize 'gnus 'message 'w3 'vm)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
(bbdb-insinuate-w3)

;;; w3
(setq load-path (cons (expand-file-name "~/w3-4.0pre.46/lisp") load-path))
(setq w3-icon-format 'xpm)
(setq url-be-asynchronous t)
(require 'w3-auto)

;;; modeline
(setq modeline-multibyte-status "")

(setq Info-directory-list (append '("d:\\home\\steve\\w3-4.0pre.46\\texi") Info-directory-list))

;;; customization
(custom-set-variables
 '(Info-additional-search-directory-list (quote ("d:\\home\\steve\\w3-4.0pre.46\\texi")))
 '(cxx-user-id "Steve Molitor")
 '(toolbar-visible-p nil)
 '(truncate-lines nil)
 '(user-mail-address "smolitor@erac.com" t)
 '(query-user-mail-address nil))
(custom-set-faces
 '(info-node ((t (:bold t))))
 '(font-lock-reference-face ((((class color) (background light)) (:foreground "blue" :background "white" :bold t))))
 '(font-lock-preprocessor-face ((((class color) (background light)) (:foreground "magenta"))))
 '(font-lock-variable-name-face ((((class color) (background light)) (:foreground "black" :size "12pt" :bold t))))
 '(font-lock-keyword-face ((((class color) (background light)) (:foreground "black" :size "12pt" :bold t))))
 '(yellow ((t (:foreground "red"))) t)
 '(font-lock-type-face ((((class color) (background light)) (:foreground "black" :size "12pt" :bold t))))
 '(bold ((t (:size "12pt" :bold t))) t)
 '(bold-italic ((t (:size "12pt" :bold t :italic t))) t)
 '(cperl-pod-face ((t (:foreground "red"))))
 '(font-lock-comment-face ((((class color) (background light)) (:foreground "red"))))
 '(font-lock-function-name-face ((((class color) (background light)) (:foreground "black" :size "12pt" :bold nil)))))

(setq minibuffer-max-depth nil)

;;;; Steve Molitor's .emacs file ends here -- smolitor@erac.com
All content copyright by the contributors. Website maintained with Emacs , wsmake and html-helper-mode
Emacs community logo by Daniel Lundin Last updated on Sat Jan 22 14:49:24 2005 by Ingo Koch