[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
setup.el - custom startup configuration (assignments etc.)
From: |
Drew Adams |
Subject: |
setup.el - custom startup configuration (assignments etc.) |
Date: |
Tue, 16 Jan 2001 21:35:20 -0500 |
;;; setup.el --- Startup configuration (assignments etc.).
;;
;; Filename: setup.el
;; Description: Startup configuration (assignments etc.).
;; Author: Drew Adams
;; Maintainer: Drew Adams
;; Copyright (C) 1996-2001, Drew Adams, all rights reserved.
;; Created: Thu Dec 28 09:15:00 1995
;; Version: $Id: setup.el,v 1.7 2001/01/09 22:18:37 dadams Exp $
;; Last-Updated: Tue Jan 9 14:18:33 2001
;; By: dadams
;; Update #: 518
;; Keywords: internal, local
;; Compatibility: GNU Emacs 20.x
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;; Startup configuration (assignments etc.).
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Change log:
;;
;; RCS $Log: setup.el,v $
;; RCS Revision 1.7 2001/01/09 22:18:37 dadams
;; RCS Adapted file header for Emacs Lisp Archive.
;; RCS
;; RCS Revision 1.6 2001/01/03 17:45:52 dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.5 2001/01/03 01:11:58 dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.4 2000/12/07 19:54:27 dadams
;; RCS frame-cmds.el -> shrink-fit-all.el.
;; RCS
;; RCS Revision 1.3 2000/11/28 20:35:25 dadams
;; RCS Optional require's via 3rd arg=t now.
;; RCS
;; RCS Revision 1.2 2000/09/27 22:20:49 dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.1 2000/09/14 17:24:01 dadams
;; RCS Initial revision
;; RCS
; Revision 1.5 1999/08/25 14:26:04 dadams
; Removed: user-vt100-hook, shell-mode-hook.
;
; Revision 1.4 1999/04/02 14:37:02 dadams
; 1. No longer require frame-fns or frame-cmds.
; 2. Put back x-colors redefinition.
; 3. Removed frames stuff to new file setup-frames.el.
; 4. Removed key bindings to new file setup-keys.el.
; 5. Only add frame-cmds fns as hooks if (featurep 'frame-cmds).
; 6. Only add erase-nonempty-inactive-minibuffer as hook if defined.
; 7. Only add notify-user-of-mode as hook if defined.
;
; Revision 1.3 1999/04/02 09:53:33 dadams
; Added defvar help-frame.
;
; Revision 1.2 1999/03/17 15:40:09 dadams
; 1. Removed require: cal-opts, help-minor, frame-cmds.
; 2. Added require (compile too): frame-fns, frame-cmds, strings.
; 3. Removed: last-dabbrev-table, setq window-setup-hook, setq x-colors.
; 4. minibuffer-frame-alist: Added (cons 'menu-bar-lines 1), height 4->10.
; 5. No longer put *Help* buffer in help-minor-mode.
; 6. Protect with fboundp.
; 7. Removed: imenu* as *-mode-hooks (diff langs).
;
; Revision 1.1 1997/03/19 14:29:09 dadams
; Initial revision
;
; Revision 1.31 1997/03/18 09:47:49 dadams
; Redefine x-colors for SGI.
;
; Revision 1.30 1996/07/11 14:32:00 dadams
; Added: completions-frame-background, completions-frame-mouse+cursor-color,
; help-frame-background, and help-frame-mouse+cursor-color.
; Use them for *Completions* and *Help* frames.
;
; Revision 1.29 1996/07/04 12:42:42 dadams
; 1. Require help-minor.el when compile.
; 2. Mode hooks: set imenu-create-index-function, depending on mode.
;
; Revision 1.28 1996/06/20 12:05:05 dadams
; 1. No more latex-outline-mode-hook.
; 2. Renamed to lower case: plain-TeX-mode-hook, (La)TeX-mode-hook.
;
; Revision 1.27 1996/06/06 14:49:09 dadams
; Update of file dependency comments (e.g. "Autoloaded from...").
;
; Revision 1.26 1996/04/25 09:36:43 dadams
; Bound C-M-S- + mouse keys to help-mouse-menu.
;
; Revision 1.25 1996/04/23 07:14:49 dadams
; Removed dired-mode-map bindings to dired+.el.
;
; Revision 1.24 1996/04/16 08:15:33 dadams
; Set lpr-command to declp-command, and lpr-switches to declp-switches.
;
; Revision 1.23 1996/03/20 17:13:06 dadams
; before- & after-make-frame-hook are now named fns rather than lambda forms.
;
; Revision 1.22 1996/03/19 10:26:10 dadams
; 1. last-dabbrev-table, last-dabbrev-table, default-frame-background,
; default-frame-font, default-frame-mouse-color,
; default-frame-cursor-color, minibuffer-frame-font,
; minibuffer-frame-mouse-color, minibuffer-frame-cursor-color,
; minibuffer-frame-foreground: ;;;###autoload
; 2. Removed to frame-fns.el: (in)active-minibuffer-frame-background,
; color-(in)active-minibuffer-frame.
;
; Revision 1.21 1996/03/19 09:58:10 dadams
; color-(in)active-minibuffer-frame: defsubst -> defun.
;
; Revision 1.20 1996/03/15 08:18:09 dadams
; Added shrink-frame-to-fit to after-make-frame-hook.
;
; Revision 1.19 1996/03/12 16:12:27 dadams
; 1. Require strings when compile.
; 2. color-(in)active-minibuffer-frame: defun -> defsubst.
; 3. Add hooks: before-make-frame-hook, after-make-frame-hook,
; pre-command-hook (erase-nonempty-inactive-minibuffer).
;
; Revision 1.18 1996/03/08 14:09:27 dadams
; Substitute keys: delete-window -> delete/iconify-window.
;
; Revision 1.17 1996/03/06 14:09:51 dadams
; 1. Copyright.
; 2. drew-cal-opts.el -> cal-opts.el, drew-util-19.el -> misc-fns.el,
; drew-misc-19.el -> misc-cmds.el, drew-menu-bar.el -> menu-bar+.el,
; 3. Require frame-cmds.el for rename-frame when compile (else autoloaded).
;
; Revision 1.16 1996/02/29 10:39:56 dadams
; Put *Help* buffer in `help-minor-mode'.
;
; Revision 1.15 1996/02/28 16:50:08 dadams
; substitute-key-definition 'query-replace 'query-replace-w-options
;
; Revision 1.14 1996/02/27 10:34:10 dadams
; special-display-frame-alist: Added (unsplittable . t).
;
; Revision 1.13 1996/02/26 14:03:10 dadams
; 1. Moved last-dabbrev-table here from start.el.
; 2. Added require-final-newline.
; 3. Yellow mouse for dedicated frames.
;
; Revision 1.12 1996/02/15 14:24:11 dadams
; Added binding of yank-secondary to C-M-y.
;
; Revision 1.11 1996/02/12 10:06:04 dadams
; Updated header keywords (for finder).
;
; Revision 1.10 1996/02/09 07:26:11 dadams
; Dedicated frame height lowered to 20.
;
; Revision 1.9 1996/02/06 16:22:18 dadams
; occur-mode-hook, list-options-hook: notify-user-of-mode
;
; Revision 1.8 1996/02/06 11:04:46 dadams
; Put variable-interactive property on appropriate user option vars.
;
; Revision 1.7 1996/02/02 15:24:43 dadams
; Moved server-start to start.el.
;
; Revision 1.6 1996/01/18 08:06:52 dadams
; Require drew-cal-opts.el here, instead of in ~/.emacs.
;
; Revision 1.5 1996/01/12 17:06:06 dadams
; substitute-key-definition list-buffers -> buffer-menu
;
; Revision 1.4 1996/01/09 15:06:54 dadams
; Removed require of elect-mbuf.el to ~/.emacs, so sure it's loaded last.
;
; Revision 1.3 1996/01/09 09:24:25 dadams
; kill-buffer-delete-frames -> kill-buffer-and-its-windows
;
; Revision 1.2 1996/01/08 14:06:40 dadams
; 1. Removed set-window-dedicated-p of minibuffer: Unnecessary, and bugged (via
; e.g. etags.el).
; 2. Use highlight face as show-paren-face. Removed require of drew-faces.el.
;
; Revision 1.1 1996/01/02 16:50:01 dadams
; Initial revision
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program 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.
;; This program 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 this program; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:
(eval-when-compile (require 'cl)) ;; when
(require 'misc-fns nil t) ;; (no error if not found): notify-user-of-mode
(require 'strings nil t) ;; (no error if not found):
erase-nonempty-inactive-minibuffer
(require 'shrink-fit nil t) ;; (no error if not found):
;; making-frame-done-msg, making-frame-msg,
;; shrink-frame-to-fit
(require 'paren nil t) ;; (no error if not found):
;; show-paren-match-face, show-paren-mode
(provide 'setup)
;;;;;;;;;;;;;;;;;;;;;;;;
;; This is (make-transient-mark-mode-buffer-local t):
;; Do inline here so don't need to require `misc-fns.el' for the defn.
(make-variable-buffer-local 'transient-mark-mode)
(put 'transient-mark-mode 'permanent-local t)
(setq-default transient-mark-mode t)
;;;;; (when (boundp 'declp-command) ; Defined in `misc-cmds.el'.
;;;;; (setq lpr-command declp-command) ; Assume no `lpr' command is
available.
;;;;; (setq lpr-switches declp-switches))
(make-variable-buffer-local 'require-final-newline)
(setq-default require-final-newline 99999) ; Ask if want newline at eof.
;;; Show matching parentheses.
;;;@@@Emacs20 (setq blink-paren-function 'blink-matching-open) ; Describe
matching `('.
(set-face-background 'show-paren-match-face "Aquamarine") ; in `paren.el'
(show-paren-mode 999) ; in `paren.el'
;; This must be done *after* loading `paren.el'.
;(setq window-setup-hook ; Note: `setq', *not* `add-hook'. This
; (function ; is needed bc `paren.el' sets this to
; (lambda () (when window-system ; also nullify `blink-paren-function'.
; (add-hook 'post-command-hook 'show-paren-command-hook)))))
(setq buffers-menu-max-size 30) ; =< 30 buffers (see `menu-bar.el').
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; ****** Begin stuff to do at the end ***********
;; These functions are defined in `shrink-fit.el'.
(when (featurep 'shrink-fit)
(add-hook 'after-make-frame-functions 'shrink-frame-to-fit)
(add-hook 'after-make-frame-functions 'making-frame-done-msg)
(add-hook 'before-make-frame-hook 'making-frame-msg))
(when (fboundp 'erase-nonempty-inactive-minibuffer)
(add-hook 'pre-command-hook 'erase-nonempty-inactive-minibuffer)) ;
`strings.el'
;; `notify-user-of-mode' is defined in `misc-fns.el'.
;; `imenu-*' functions are defined in `imenu.el'.
;(add-hook 'emacs-lisp-mode-hook
; (function (lambda () (setq imenu-create-index-function
; 'imenu-example--create-lisp-index))))
;(add-hook 'emacs-lisp-mode-hook 'imenu-add-defs-to-search-menu)
(when (fboundp 'notify-user-of-mode)
(add-hook 'emacs-lisp-mode-hook 'notify-user-of-mode)
(add-hook 'lisp-mode-hook 'notify-user-of-mode)
(add-hook 'cmulisp-mode-hook 'notify-user-of-mode)
(add-hook 'ccl-mode-hook 'notify-user-of-mode)
(add-hook 'c-mode-hook 'notify-user-of-mode)
(add-hook 'c++-mode-hook 'notify-user-of-mode)
(add-hook 'hide-ifdef-mode-hook 'notify-user-of-mode)
(add-hook 'makefile-mode-hook 'notify-user-of-mode)
(add-hook 'fortran-mode-hook 'notify-user-of-mode)
(add-hook 'cmushell-mode-hook 'notify-user-of-mode)
(add-hook 'comint-mode-hook 'notify-user-of-mode)
(add-hook 'ps-mode-hook 'notify-user-of-mode)
(add-hook 'sh-mode-hook 'notify-user-of-mode)
(add-hook 'shell-mode-hook 'notify-user-of-mode)
(add-hook 'dired-after-readin-hook 'notify-user-of-mode)
(add-hook 'buffer-menu-mode-hook 'notify-user-of-mode)
(add-hook 'compilation-mode-hook 'notify-user-of-mode)
(add-hook 'electric-help-mode-hook 'notify-user-of-mode)
(add-hook 'calc-edit-mode-hook 'notify-user-of-mode)
(add-hook 'calc-mode-hook 'notify-user-of-mode)
(add-hook 'calc-trail-mode-hook 'notify-user-of-mode)
(add-hook 'fixed-width-text-mode-hook 'notify-user-of-mode)
(add-hook 'texinfo-mode-hook 'notify-user-of-mode)
(add-hook 'latex-mode-hook 'notify-user-of-mode)
(add-hook 'tex-mode-hook 'notify-user-of-mode)
(add-hook 'slitex-mode-hook 'notify-user-of-mode)
(add-hook 'plain-tex-mode-hook 'notify-user-of-mode)
(add-hook 'bibtex-mode-hook 'notify-user-of-mode)
(add-hook 'math-mode-hook 'notify-user-of-mode)
(add-hook 'mfe-mode-hook 'notify-user-of-mode)
(add-hook 'mh-letter-mode-hook 'notify-user-of-mode)
(add-hook 'mh-mode-hook 'notify-user-of-mode)
(add-hook 'sql-mode-hook 'notify-user-of-mode)
(add-hook 'terminal-mode-hook 'notify-user-of-mode)
(add-hook 'array-mode-hook 'notify-user-of-mode)
(add-hook 'asm-mode-hook 'notify-user-of-mode)
(add-hook 'awk-mode-hook 'notify-user-of-mode)
(add-hook 'change-log-mode-hook 'notify-user-of-mode)
(add-hook 'occur-mode-hook 'notify-user-of-mode)
;;(add-hook 'text-mode-hook 'notify-user-of-mode)
(add-hook 'list-options-hook 'notify-user-of-mode))
;(add-hook 'lisp-mode-hook
; (function (lambda () (setq imenu-create-index-function
; 'imenu-example--create-lisp-index))))
;(add-hook 'lisp-mode-hook 'imenu-add-defs-to-search-menu)
;(add-hook 'cmulisp-mode-hook
; (function (lambda () (setq imenu-create-index-function
; 'imenu-example--create-lisp-index))))
;(add-hook 'cmulisp-mode-hook 'imenu-add-defs-to-search-menu)
;(add-hook 'ccl-mode-hook
; (function (lambda () (setq imenu-create-index-function
; 'imenu-example--create-ccl-index))))
;(add-hook 'ccl-mode-hook 'imenu-add-defs-to-search-menu)
;(add-hook 'c-mode-hook
; (function (lambda () (setq imenu-create-index-function
; 'imenu-example--create-c-index))))
;(add-hook 'c-mode-hook 'imenu-add-defs-to-search-menu)
;(add-hook 'c++-mode-hook
; (function (lambda () (setq imenu-create-index-function
; 'imenu-example--create-c++-index))))
;(add-hook 'c++-mode-hook 'imenu-add-defs-to-search-menu)
;(add-hook 'hide-ifdef-mode-hook 'imenu-add-defs-to-search-menu)
;(add-hook 'makefile-mode-hook 'imenu-add-defs-to-search-menu)
;(add-hook 'fortran-mode-hook 'imenu-add-defs-to-search-menu)
;;; ****** End stuff to do at the end ***********
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; `setup.el' ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- setup.el - custom startup configuration (assignments etc.),
Drew Adams <=