|
(put 'narrow-to-region 'disabled nil)
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
(global-set-key "\C-xw" 'what-line)
(global-set-key [f1] 'help-command)
(global-set-key [f2] 'undo)
(global-set-key [f3] 'find-file)
(global-set-key [f4] 'set-mark-command)
(global-set-key [f5] "\M-w")
(global-set-key [f6] "\C-y")
(global-set-key [(shift f4)] (lambda () (interactive) (set-mark-command t)))
(global-set-key [f7] 'save-buffer)
(global-set-key [f8] 'start-kbd-macro)
(global-set-key [f9] 'end-kbd-macro)
(global-set-key [f10] 'call-last-kbd-macro)
(cond (running-xemacs
(setq find-file-use-truenames nil
find-file-compare-truenames t
minibuffer-confirm-incomplete t
complex-buffers-menu-p t
next-line-add-newlines nil
mail-yank-prefix "> "
kill-whole-line t
)
(setq ispell-extra-args '("-W" "3"))
(cond ((or (not (fboundp 'device-type))
(equal (device-type) 'x))
(global-set-key "\C-x\C-c" nil)
(if (equal frame-title-format "%S: %b")
(setq frame-title-format
(concat "%S: " invocation-directory invocation-name
" [" emacs-version "]"
(if nil ""
" %b"))))
(cond ((string-match ":0" (getenv "DISPLAY"))
(load-default-sounds))
(t
(setq bell-volume 40)
(setq sound-alist
(append sound-alist '((no-completion :pitch 500))))
))
(define-key global-map [(control x) return] nil)
(set-glyph-image modeline-pointer-glyph "leftbutton")
(and (fboundp 'set-glyph-property)
(boundp 'continuation-glyph)
(set-glyph-property continuation-glyph 'face 'bold))
(if (featurep 'xpm)
(let ((file (expand-file-name "recycle.xpm" data-directory)))
(if (condition-case error
(make-image-instance file nil
'(pointer))
(error nil)) (set-glyph-image gc-pointer-glyph file))))
(when (featurep 'menubar)
(add-menu-button '("File") ["Edit Directory" dired t])
(add-menu-button nil ["Top" beginning-of-buffer t])
(add-menu-button nil ["<<<" scroll-down t])
(add-menu-button nil [" . " recenter t])
(add-menu-button nil [">>>" scroll-up t])
(add-menu-button nil ["Bot" end-of-buffer t]))
(setq mouse-yank-at-point t)
(define-key global-map '(shift tab) 'self-insert-command)
(define-key emacs-lisp-mode-map '(control C) 'compile-defun)
(define-key emacs-lisp-mode-map '(control E) 'eval-defun)
))
))
(cond
((and (string-match "XEmacs" emacs-version)
(eq window-system 'x)
(boundp 'emacs-major-version)
(= emacs-major-version 19)
(>= emacs-minor-version 12))
(let* ((root-p (eq 0 (user-uid)))
(dpy (or (getenv "DISPLAY") ""))
(remote-p (not
(or (string-match "^\\(\\|unix\\|localhost\\):" dpy)
(let ((s (system-name)))
(if (string-match "\\.\\(netscape\\|mcom\\)\\.com" s)
(setq s (substring s 0 (match-beginning 0))))
(string-match (concat "^" (regexp-quote s)) dpy)))))
(bg (cond (root-p "coral2")
(remote-p "palegreen1")
(t nil))))
(cond (bg
(let ((def (color-name (face-background 'default)))
(faces (face-list)))
(while faces
(let ((obg (face-background (car faces))))
(if (and obg (equal def (color-name obg)))
(set-face-background (car faces) bg)))
(setq faces (cdr faces)))))))))
(if (and (not (boundp 'emacs-major-version))
(string-match "^[0-9]+" emacs-version))
(setq emacs-major-version
(string-to-int (substring emacs-version
(match-beginning 0) (match-end 0)))))
(if (and (not (boundp 'emacs-minor-version))
(string-match "^[0-9]+\\.\\([0-9]+\\)" emacs-version))
(setq emacs-minor-version
(string-to-int (substring emacs-version
(match-beginning 1) (match-end 1)))))
(defun running-emacs-version-or-newer (major minor)
(or (> emacs-major-version major)
(and (= emacs-major-version major)
(>= emacs-minor-version minor))))
(cond ((and running-xemacs
(running-emacs-version-or-newer 19 6))
))
(cond ((>= emacs-major-version 19)
))
(cond ((and (not running-xemacs)
(>= emacs-major-version 19))
))
(cond ((< emacs-major-version 19)
))
(require 'dired)
(if (and running-xemacs
(or (and (= emacs-major-version 20) (>= emacs-minor-version 1))
(and (= emacs-major-version 19) (>= emacs-minor-version 15))))
(progn
(message "Loading and configuring bundled packages... efs")
(require 'efs-auto)
(if (getenv "USER")
(setq efs-default-user (getenv "USER")))
(if (getenv "EMAIL_ADDRESS")
(setq efs-generate-anonymous-password (getenv "EMAIL_ADDRESS"))
(if (and (getenv "USER")
(getenv "DOMAINNAME"))
(setq efs-generate-anonymous-password
(concat (getenv "USER")"@"(getenv "DOMAINNAME")))))
(setq efs-auto-save 1))
(progn
(message "Loading and configuring bundled packages... ange-ftp")
(require 'ange-ftp)
(if (getenv "USER")
(setq ange-ftp-default-user (getenv "USER")))
(if (getenv "EMAIL_ADDRESS")
(setq ange-ftp-generate-anonymous-password (getenv "EMAIL_ADDRESS"))
(if (and (getenv "USER")
(getenv "DOMAINNAME"))
(setq ange-ftp-generate-anonymous-password
(concat (getenv "USER")"@"(getenv "DOMAINNAME")))))
(setq ange-ftp-auto-save 1)
)
)
(if (and running-xemacs
(or (and (= emacs-major-version 20) (>= emacs-minor-version 1))
(and (= emacs-major-version 19) (>= emacs-minor-version 15))))
(require 'default-dir))
(setq auto-save-directory (expand-file-name "~/autosave/")
auto-save-directory-fallback auto-save-directory
auto-save-hash-p nil
efs-auto-save t
efs-auto-save-remotely nil
auto-save-interval 2000
)
(require 'auto-save)
(setq auto-mode-alist
(append '(("\\.C$" . c++-mode)
("\\.cc$" . c++-mode)
("\\.hh$" . c++-mode)
("\\.c$" . c-mode)
("\\.h$" . c-mode))
auto-mode-alist))
(setq c-recognize-knr-p nil)
(add-hook 'c-mode-hook (lambda () (setq c-basic-offset 4)))
(load-library "completer")
(setq crypt-encryption-type 'pgp crypt-confirm-password t )
(require 'crypt)
(define-key emacs-lisp-mode-map "\C-xx" 'edebug-defun)
(cond (running-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")
(copy-face 'italic 'font-lock-comment-face)
(set-face-underline-p 'font-lock-comment-face nil 'global 'tty)
(set-face-highlight-p 'font-lock-comment-face t 'global 'tty)
(copy-face 'font-lock-comment-face 'font-lock-doc-string-face)
(set-face-foreground 'font-lock-comment-face "red")
(copy-face 'bold 'font-lock-function-name-face)
(set-face-foreground 'font-lock-function-name-face "blue")
(and (find-face 'font-lock-preprocessor-face) (copy-face 'bold 'font-lock-preprocessor-face))
(copy-face 'italic 'font-lock-type-face)
(copy-face 'bold 'font-lock-keyword-face)
))
(add-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
(setq lazy-lock-stealth-time nil)
(cond (running-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)
(define-key global-map '(shift button3) 'mouse-function-menu)
(setq fume-max-items 25
fume-fn-window-position 3
fume-auto-position-popup t
fume-display-in-modeline-p t
fume-menubar-menu-location "File"
fume-buffer-name "*Function List*"
fume-no-prompt-on-valid-default nil)
))
(setq mh-delete-yanked-msg-window t)
(setq mh-yank-from-start-of-msg 'body)
(setq mh-summary-height 11)
(autoload 'resize-minibuffer-mode "rsz-minibuf" nil t)
(resize-minibuffer-mode)
(setq resize-minibuffer-window-exactly nil)
|
|
|
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 |
|
|
|
|