Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
;;; The .emacs file of Gary T. Leavens ;;; ;;; Last updated on $Date: 1997/08/20 21:19:52 $ ;;; ;;; Feel free to browse, copy, and tweak as desired. ;;; I try to make these sensible for anyone to just use, ;;; but of course I offer no warranty on anything here. ;;; If you're new to emacs type the escape key, then x, ;;; then help-with-tutorial and then the return key. ;;; That is: M-x help-with-tutorial RET ;;; Files mentioned below are found in "~/emacs" and "/usr/unsup/emacs" ;;; This means if you're looking for leavens's files, ;;; they are in ~leavens/emacs. For example, for user leavens, ;;; (load "mode-customizations") loads the file whose source is in ;;; ~leavens/emacs/mode-customizations.el ;;; (setq load-path (cons "~/emacs" (cons "/usr/unsup/emacs" load-path))) ;;; Load my emacs-lisp files from the directory ~/emacs/ (see above). ;;; If these don't exist, they are silently ignored, ;;; because of the `t' at the end of the load command ;;; ; Customization of various emacs modes (load "mode-customizations" t) ; Other commands of mine (these don't take effect unless invoked) (load "my-commands" t) ; Customizations for the local system, varies between HP, Vincent etc... (load "local-customization" t) ; Allow undo of scrolling by M-x unscroll (load "unscroll" t) ;;; Disabling commands and key bindings (disaster prevention) ;;; The following disable key sequences that can cause ;;; big or unnoticed mistakes (put 'zap-to-char 'disabled t) ; M-z (put 'rmail-edit-current-message 'disabled 't) (global-unset-key "\C-x\C-u") ; C-x C-u (upcase-region) vs. C-x u (undo) (global-unset-key "\C-x\C-l") ; downcase of region can be disaster (global-unset-key "\C-xf") ; can use set-fill-column explicitly (global-unset-key "\C-z") ; can still suspend with C-x C-z ;;; I don't use emacs to change directories, just to get to files (setq find-file-run-dired nil) ; never run dired ;;; it's safer to not allow local variable lists to take effect automatically (setq enable-local-variables 'query) ;;; Setting new commands and key bindings (make it do what I want) ;;; Make backspace (BS) work as most people expect (thanks to Bob Glickstein) ;;; ; make BS delete characters backwards, just like DEL (global-set-key "\C-h" 'backward-delete-char-untabify) ; put help on M-? (i.e., ESC ?) (global-set-key "\M-?" 'help-command) ;;; function key binding, the \M-O ones come from Kermit in emacs mode... ;;; (global-set-key "\M-OP" 'help) (global-set-key [f2] 'goto-line) (global-set-key "\M-OQ" 'goto-line) (global-set-key [f3] 'begin) (global-set-key "\M-OR" 'begin) ;(global-set-key "\M-[B" 'scroll-left) ;;; key bindings that are useful especially for flow control (ISN, telnet), ;;; which sometimes eats all the C-s and C-q chars, ;;; and which I can live with all the time anyway. ;;; (global-set-key "\C-\\" 'isearch-forward) (global-set-key "\C-^" 'quoted-insert) (global-set-key "\M-s" 'isearch-forward-regexp) (define-key isearch-mode-map "\C-\\" 'isearch-repeat-forward) (define-key isearch-mode-map "\C-^" 'isearch-quote-char) ; turn off C-s and C-q on the following terminal types (see ~/emacs/term/*.el) (enable-flow-control-on "vt100" "vt102") ;;; Other customizations ;;; Preserve links of files when editing ;;; (setq backup-by-copying-when-linked 't) ;;; Make ~ backup files even when using RCS or SCCS ;;; (setq vc-make-backup-files 't) ;;; Make files always end in a newline ;;; (setq require-final-newline 't) ;;; Mode-line customization ;;; ; I don't want constantly check my email, so make it look like there's no mail (setq display-time-mail-file ".non-existent-file") ; I like to know what day it is... (setq display-time-day-and-date t) ; display the time in the mode-line (display-time) ;;; Emacs diary (appointment book) and calendar, which uses the file .diary ;;; ; if you don't want it, then comment it out (add-hook 'diary-hook 'appt-make-list) (diary)