;; -*- emacs-lisp -*- ;; $Id: dotEmacs.txt,v 1.6 2001/07/16 22:06:48 js3guj Exp $ ;; for debugging ;(add-hook 'after-init-hook ; '(lambda () (setq debug-on-error t))) ;(setq debug-on-error t) ;(setq debug-on-quit t) ;(setq debug-on-next-call t) ;; init things (setq inhibit-default-init nil) ;;(setq inhibit-startup-message t) ;;(set-specifier default-toolbar-visible-p nil) (if (eq window-system nil) (menu-bar-mode nil)) ;; set Japanese environment (set-language-environment 'Japanese) (set-default-coding-systems 'iso-2022-jp) (set-terminal-coding-system 'iso-2022-jp) (setq default-buffer-file-coding-system 'euc-jp) ;;(select-input-method "japanese-egg-wnn") (setq use-kuten-for-period nil) (setq use-touten-for-comma nil) ;; font ;;(if (eq (console-type) 'x) ;; (set-face-font ;; 'default ;; '("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1" ;; "-mnkaname-fixed-medium-r-normal--12-110-75-75-c-120-jisx0208.1983-0" ;; "-mnkaname-fixed-medium-r-normal--12-110-75-75-c-60-jisx0201.1976-0") ;; 'global '(mule-fonts) 'prepend)) ;; global settings (setq default-major-mode 'text-mode) (setq next-line-add-newlines nil) (setq minibuffer-max-depth nil) (put 'eval-expression 'disabled nil) (setq blink-matching-paren t) ;; add local emacs lisp load path (setq load-path (cons (expand-file-name "~/elisp") load-path)) (setq load-path (cons (expand-file-name "~/mailcrypt-3.5.6") load-path)) (setq load-path (cons (expand-file-name "~/gnus-5.8.8/lisp") load-path)) (setq load-path (cons (expand-file-name "~/irchat-2.4j") load-path)) ;; setup for sendmail (setq sendmail-coding-system 'iso-2022-jp) (setq sendmail-program "/usr/sbin/sendmail") (modify-coding-system-alist 'process ".*sendmail.*" 'iso-2022-jp) ;; message setup (setq message-yank-prefix "| ") (setq message-local-organization "The Ministry of Beer") ;; hairy checking (setq mail-use-rfc822 t) ;; e-mail address style (setq mail-host-address "hogehoge") (setq user-full-name "IKEDA Shigeru") (setq user-mail-address "hogehoge@hogehoge") (setq message-from-style 'angles) (setq message-syntax-checks (append '((sender . disabled) (control-chars . disabled)))) ;; (defun message-make-fqdn () "Return user's fully qualified domain name." "hogehoge") ;; header setup (defun xface-header () (concat "X-Face: )kw,!%[~K@]Yw=t'mTr2#mx_9*Y{mZ&}(|1bK6QvVvc=2Y|v}tE6alT;P\n" " jZ^XhfJ?7U%S)59nlwMX#~-$o3'e*fut>2A7,]MmuT8}.)#VM+E,j!9!O\n" " r>%K#w1i5z:AwUZ4}zq8iJBQCN^jZJaJZ\n")) (defun my-message-default-headers () (setq message-default-headers (concat "X-Uname: " (shell-command-to-string "uname -a") "X-Uptime: " (shell-command-to-string "uptime") "X-Copyright: Copyright (c) " (format-time-string "%Y" (current-time)) " IKEDA Shigeru. All Rights Reserved.\n" "X-Notice: Duplication and redistribution without consent of author\n" " is strictly prohibited.\n" (xface-header)))) (defun my-message-default-mail-headers () (setq message-default-mail-headers (concat "User-Agent: " (gnus-extended-version) "\n" (format "BCC: %s\n" user-mail-address)))) (defun my-message-default-news-headers () (setq message-default-news-headers (concat "Mail-Copies-To: always\n" "X-No-Archive: yes\n"))) (defun my-message-header-setup-hook () (my-message-default-headers) (my-message-default-mail-headers) (my-message-default-news-headers)) (add-hook 'message-mode-hook 'my-message-header-setup-hook) (setq message-required-mail-headers '(From Subject Date (optional . In-Reply-To) Lines (optional . User-Agent))) ;; for mailcrypt (load-library "mailcrypt") (mc-setversion "gpg") (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) (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) (add-hook 'message-mode-hook 'mc-install-write-mode) (add-hook 'news-reply-mode-hook 'mc-install-write-mode) (setq mc-gpg-user-id "IKEDA Shigeru") (setq mc-gpg-comment "no comments") (setq mc-pgp-comment nil) (setq mc-encrypt-for-me t) (setq mc-pgp-always-sign t) (modify-coding-system-alist 'process ".*pgp.*" 'iso-2022-jp) (modify-coding-system-alist 'process ".*gpg.*" 'iso-2022-jp) ;; info directory setup (setq Info-default-directory-list (list "/usr/share/info" "/usr/local/info")) (setq Info-default-directory-list (cons "~/gnus-5.8.8/texi" Info-default-directory-list)) ;; I don't like make -k (setq compile-command "make ") ;; major mode setup (autoload 'c++-mode "cc-mode" "C++ Editing Mode" t) (autoload 'c-mode "cc-mode" "C Editing Mode" t) (autoload 'objc-mode "cc-mode" "Objective-C Editing Mode" t) (autoload 'java-mode "cc-mode" "Java Editing Mode" t) (setq auto-mode-alist (append '(("\\.C$" . c++-mode) ("\\.H$" . c++-mode) ("\\.cc$" . c++-mode) ("\\.hh$" . c++-mode) ("\\.c$" . c-mode) ("\\.h$" . c-mode) ("\\.js$" . c-mode) ("\\.m$" . objc-mode) ("\\.java$" . java-mode) ("\\.txt$" . indented-text-mode) ("\\.doc$" . indented-text-mode) ("\\.pl$" . perl-mode) ("\\.cgi$" . perl-mode)) auto-mode-alist)) ;; sgml-mode (autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t) (autoload 'xml-mode "psgml" "Major mode to edit XML files." t) ;; use lynx with rxvt for URL (require 'browse-url) (defun browse-url-lynx-rxvt (url &optional new-window) ;; new-window ignored "Ask the Lynx WWW browser to load URL. Default to the URL around or before point. A new Lynx process is run in an Rxvt window." (interactive (browse-url-interactive-arg "Lynx URL: ")) (start-process (concat "lynx" url) nil "rxvt" "-e" "lynx" url)) (setq browse-url-browser-function 'browse-url-lynx-rxvt) (autoload 'browse-url-lynx-rxvt "browse-url-lynx-rxvt" "Lynx in rxvt" t) ;; for gnus, move to gnus.el in the future. (setq gnus-inhibit-startup-message t) (setq gnus-select-method '(nntp "orange.js3guj.ampr.org")) (setq gnus-secondary-select-methods '((nnml ""))) ;;(setq gnus-secondary-select-methods ;; '((nnml "") ;; (nnimap "localhost" ;; (nnimap-address "localhost") ;; (nnimap-authenticator login)))) (setq gnus-read-active-file 'some) (setq gnus-check-new-newsgroups `ask-server) (setq gnus-verbose-backends 14) (setq gnus-nov-is-evil nil) (setq gnus-auto-select-first nil) (setq gnus-auto-select-next t) (setq gnus-novice-user nil) (setq gnus-save-all-headers t) (setq gnus-default-article-saver 'gnus-summary-save-in-file) (setq gnus-home-score-file "all.SCORE") (setq gnus-subscribe-newsgroup-method 'gnus-subscribe-randomly) (setq gnus-use-nocem nil) (setq gnus-thread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-date)) (setq gnus-thread-hide-subtree nil) (setq gnus-large-newsgroup 100) (setq gnus-verbose 10) (setq gnus-use-cache nil) (setq gnus-fetch-old-headers nil) (setq gnus-local-organization "The Ministry of Beer") (defun my-archive-prefix () (format-time-string "%Y-%m" (current-time))) (defun my-gnus-message-archive-group () (setq gnus-message-archive-group '((if (message-news-p) (concat "news." (my-archive-prefix)) (concat "mail." (my-archive-prefix)))))) (add-hook 'message-mode-hook 'my-gnus-message-archive-group) (setq gnus-treat-highlight-signature t) (setq gnus-treat-buttonize nil) (setq gnus-treat-buttonize-head nil) (setq gnus-treat-emphasize t) (setq gnus-treat-fill-article nil) (setq gnus-treat-strip-cr nil) (setq gnus-treat-hide-headers 'head) (setq gnus-treat-hide-boring-headers 'head) (setq gnus-treat-hide-signature nil) (setq gnus-treat-hide-citation nil) (setq gnus-treat-strip-pgp nil) (setq gnus-treat-strip-pem nil) (setq gnus-treat-highlight-headers 'head) (setq gnus-treat-highlight-citation t) (setq gnus-treat-highlight-signature nil) (setq gnus-treat-date-ut nil) (setq gnus-treat-date-local nil) (setq gnus-treat-date-lapsed nil) (setq gnus-treat-date-original 'head) (setq gnus-treat-strip-headers-in-body nil) (setq gnus-treat-strip-trailing-blank-lines t) (setq gnus-treat-strip-leading-blank-lines t) (setq gnus-treat-strip-multiple-blank-lines t) (setq gnus-treat-overstrike t) (setq gnus-treat-display-xface 'head) (setq gnus-treat-display-smileys nil) (setq gnus-treat-display-picons nil) (setq gnus-treat-capitalize-sentences nil) (setq gnus-treat-fill-long-lines nil) (setq gnus-treat-play-sounds nil) (setq gnus-treat-translate nil) (setq gnus-ignored-mime-types '("text/html")) (setq mm-discouraged-alternatives '("text/html" "text/richtext")) (setq gnus-auto-expirable-newsgroups "nnml:.*") (setq nnmail-expiry-wait 14) ;;(setq mail-sources ;; '((imap ;; :server "localhost" ;; :predicate nil ;; :fetchflag "\\Deleted"))) (setq mail-sources '((file :path "/var/mail/js3guj"))) ;; split methods ;; You must escape `.' like `\\.' for the strict matching. ;; For the sake of readablity I omit these. (setq nnmail-split-methods '( ("port-mac68k" "^\\([Cc][Cc]\\|To\\):.*port-mac68k@netbsd.org.*") ("port-dreamcast" "^\\([Cc][Cc]\\|To\\):.*port-dreamcast@netbsd.org.*") ("other" ""))) ;; use message-user-agent for composing a new mail (C-m) (require 'gnus-msg) (setq mail-user-agent 'gnus-user-agent) (setq irchat-server "irc.kyoto.wide.ad.jp") (setq irchat-nickname "s.i") (autoload 'irchat "irchat" "Internet Relay Chat." t) ;; start emacs server ;; use existing emacs as editor. the following example open a new ;; buffer for file hogehoge in exsisting emacs. ;; $ emacsclient hogehoge & ;; (server-start) ;; final message (message "loading .emacs has completed.")