(defmacro GNUEmacs (&rest x)
(list
'if
(string-match "GNU Emacs" (prin1-to-string (version)))
(cons 'progn x)))
(defmacro GNUEmacs20 (&rest x)
(list
'if
(string-match "GNU Emacs 20" (prin1-to-string (version)))
(cons 'progn x)))
(defmacro GNUEmacs21 (&rest x)
(list
'if (string-match "GNU Emacs 21" (prin1-to-string (version)))
(cons 'progn x)))
(defmacro XEmacs (&rest x)
(list
'if (string-match "XEmacs 21" (prin1-to-string (version)))
(cons 'progn x)))
(defmacro GNULinux (&rest x)
(list
'if (string-match "linux" (prin1-to-string system-type))
(cons 'progn x)))
(defmacro Windows (&rest x)
(list
'if (string-match "windows" (prin1-to-string system-type))
(cons 'progn x)))
(defmacro Solaris (&rest x)
(list
'if (string-match "usg-unix-v" (prin1-to-string system-type))
(cons 'progn x)))
(defmacro XWindow (&rest x)
(list
'if (string-match "x" (prin1-to-string window-system))
(cons 'progn x)))
(GNUEmacs
(setq
load-path (cons "~/emacs/misc" load-path))
(setq
load-path (cons "~/emacs/Mule\-UCS\-0\.83/lisp" load-path))
(setq
load-path (cons "~/emacs/html-helper-mode" load-path))
(setq
load-path (cons "~/emacs/ps-print" load-path))
(setq
load-path (cons "~/emacs/xslide" load-path)))
(defvar cp866-decode-table
[
255 240 nil nil 242 nil nil 244 nil nil nil nil nil nil 246 nil
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
252 241 nil nil 243 nil nil 245 nil nil nil nil nil nil 247 nil]
"Table for converting ISO-8859-5 characters into codepage 866 glyphs.")
(setplist 'cp866-decode-table
'(charset cyrillic-iso8859-5 language "Cyrillic-ISO" offset 160))
(defvar cp737-decode-table
[
255 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
248 nil 253 nil nil nil 234 250 235 236 237 nil 238 nil 239 240
nil 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
143 144 nil 145 146 147 148 149 150 151 244 245 225 226 227 229
nil 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
167 168 170 169 171 172 173 174 175 224 228 232 230 231 232 nil]
"Table for converting ISO-8859-7 characters into codepage 737 glyphs.")
(setplist 'cp737-decode-table
'(charset greek-iso8859-7 language "Greek" offset 160))
(GNUEmacs
(codepage-setup 437) (codepage-setup 737) (codepage-setup 869) (codepage-setup 851) (codepage-setup 866) (codepage-setup 1251)
(set-keyboard-coding-system nil)
(set-terminal-coding-system 'iso-8859-5)
(prefer-coding-system 'iso-8859-5)
(setq default-buffer-file-coding-system 'iso-2022-8bit-ss2)
(define-coding-system-alias 'windows-1251 'cp1251)
(define-coding-system-alias 'microsoft-1251 'cp1251)
(define-coding-system-alias 'microsoft-cp1251 'cp1251)
(define-coding-system-alias 'windows-cp1251 'cp1251)
(define-coding-system-alias 'koi8-u 'cyrillic-koi8)
(define-coding-system-alias 'KOI8-R 'cyrillic-koi8)
(modify-coding-system-alist 'file "\.*" 'iso-8859-5)
(modify-coding-system-alist 'file "\\.el$" 'iso-2022-7bit))
(standard-display-8bit 128 255)
(GNUEmacs
(pc-bindings-mode)
(pc-selection-mode))
(condition-case err
(require 'belarusian)
(error
(message "Cannot load belaruisan input method %s" (cdr err))))
(condition-case err
(require 'russian)
(error
(message "Cannot load russian input method %s" (cdr err))))
(condition-case err
(require 'php-mode)
(error
(message "Cannot load php-mode %s" (cdr err))))
(condition-case err
(require 'htmlize)
(error
(message "Cannot load htmlize %s" (cdr err))))
(condition-case err
(require 'msb)
(error
(message "Cannot load msb %s" (cdr err))))
(condition-case err
(require 'dictionary)
(error
(message "Cannot load dictionary %s" (cdr err))))
(condition-case err
(require 'blank-mode)
(error
(message "Cannot load blank-mode %s" (cdr err))))
(condition-case err
(require 'python-mode)
(error
(message "Cannot load python-mode %s" (cdr err))))
(condition-case err
(require 'css-mode)
(error
(message "Cannot load css-mode %s" (cdr err))))
(condition-case err
(require 'jde)
(error
(message "Cannot load jde-mode %s" (cdr err))))
(condition-case err
(require 'ansi-color)
(error
(message "Cannot load ansi-color %s" (cdr err))))
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(condition-case err
(require 'whitespace)
(error
(message "Cannot load whitespace nuke %s" (cdr err))))
(autoload 'nuke-trailing-whitespace "whitespace" nil t)
(condition-case err
(require 'slashdot)
(error
(message "Cannot load slashdot headline fetcher %s" (cdr err))))
(autoload 'xrdb-mode "xrdb-mode" nil t)
(autoload 'fetchmail-mode "fetchmail-mode" nil t)
(autoload 'dtd-mode "tdtd" "Major mode for SGML and XML DTDs." t)
(condition-case err
(require 'backup-dir)
(error
(message "Cannot load backup-dir %s" (cdr err))))
(setq bkup-backup-directory-info
'((
"/home/lowry/.*"
"~/.backups/"
ok-create full-path prepend-name)))
(cond
((fboundp 'global-font-lock-mode)
(global-font-lock-mode t)
(setq
lazy-lock-stealth-time 2
lazy-lock-minimum-size 20000
lazy-lock-defer-on-scrolling t
lazy-lock-defer-on-the-fly nil
lazy-lock-defer-contextually t
lazy-lock-stealth-verbose t
font-lock-support-mode 'lazy-lock-mode
font-lock-maximum-decoration t)))
(GNUEmacs
(transient-mark-mode t))
(GNUEmacs
(show-paren-mode t))
(setq auto-mode-alist
(append
'(
("\\.h$" . c++-mode)
("\\.dps$" . pascal-mode)
("\\.l$" . c-mode)
("\\.y$" . c-mode)
("\\.py$" . python-mode)
("\\.css$" . css-mode)
("\\.Xdefaults$" . xrdb-mode)
("\\.Xenvironment$" . xrdb-mode)
("\\.Xresources$" . xrdb-mode)
("*.\\.ad$" . xrdb-mode)
("\\.fetchmailrc$" . fetchmail-mode)
("\\.xsl$" . xml-mode)
("\\.tei$" . xml-mode)
("\\.php$" . php-mode)
("\\.dcl$" . dtd-mode)
("\\.dec$" . dtd-mode)
("\\.dtd$" . dtd-mode)
("\\.ele$" . dtd-mode)
("\\.ent$" . dtd-mode)
("\\.mod$" . dtd-mode)
) auto-mode-alist))
(GNUEmacs21
(auto-image-file-mode 1)
(tool-bar-mode nil)
(toggle-truncate-lines)
(setq
tool-bar-button-margin 0
tool-bar-button-relief 1
tool-bar-originally-present nil))
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(resize-minibuffer-mode 1)
(setq-default case-fold-search t)
(setq-default indent-tabs-mode nil)
(add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t)
(column-number-mode 1)
(GNUEmacs
(hscroll-global-mode t))
(setq
enable-local-eval t
inhibit-startup-message t
next-line-add-newlines nil
require-final-newline "yes"
delete-old-versions t
scroll-step 1
scroll-preserve-screen-position t
default-tab-width 2
display-time-24hr-format t
display-time-day-and-date t
european-calendar-style t
calendar-week-start-day 1
calendar-latitude 51.05
calendar-longitude -2.39
calendar-location-name "Ieper"
mouse-yank-at-point t
require-final-newline t
search-highlight t
compilation-scroll-output t
compilation-ask-about-save nil
compilation-read-command nil
compilation-window-height 7
apropos-do-all t
auto-save-interval 512
kept-new-versions 5
kept-old-versions 5
auto-save-list-file-prefix "~/.backups/save-"
tex-dvi-view-command "xdvi *")
(fset 'yes-or-no-p 'y-or-n-p)
(auto-compression-mode t)
(abbrev-mode t)
(Windows
(set-message-beep 'silent))
(setq-default
frame-title-format
(list
'((buffer-file-name
" %f"
(dired-directory
dired-directory
(revert-buffer-function
" %b"
("%b - Dir: " default-directory)))))))
(setq-default
icon-title-format
(list
'((buffer-file-name
" %f"
(dired-directory
dired-directory
(revert-buffer-function
" %b"
("%b - Dir: " default-directory)))))))
(custom-set-variables
'(url-be-asynchronous t)
'(url-external-retrieval-program "wget")
'(url-mail-command (quote mail)))
(eval-after-load "mule-sysdp"
'(and
(push '("windows-1251" . cp1251) w3-mime-charset-coding-alist)
(push '("utf-8" . utf-8) w3-mime-charset-coding-alist)))
(setq w3-default-homepage
"http://bellinux.sourceforge.net")
(setq user-name "mikhailian"
user-full-name "Alexander Mikhailian"
user-mail-address "mikhailian @ altern.org"
mail-yank-prefix ">")
(setq mail-signature t)
(defadvice dired-advertised-find-file (around dired-subst-directory activate)
"Replace current buffer if file is a directory."
(interactive)
(let ((orig (current-buffer))
(filename (dired-get-filename)))
ad-do-it
(when (and (file-directory-p filename)
(not (eq (current-buffer) orig)))
(kill-buffer orig))))
(defun insert-userid ()
"Insert the my full name and address"
(interactive)
(insert user-full-name " <" user-mail-address ">"))
(defun insert-date ()
"Insert date at point."
(interactive)
(insert (format-time-string "%Y.%m.%d %H:%M")))
(setq ps-n-up-printing 1 ps-print-header nil)
(defun my-sgml()
"PSGML Manual in Russian: http://xtalk.kak-sam.to/SGML/em.html"
(interactive)
(setq sgml-omittag-transparent t sgml-omittag nil
sgml-set-face t sgml-shorttag nil
sgml-minimize-attributes nil
sgml-namecase-general t
sgml-always-quote-attributes t
sgml-auto-activate-dtd t
sgml-indent-step 2
sgml-indent-data t
sgml-balanced-tag-edit t
sgml-warn-about-undefined-entities nil
sgml-warn-about-undefined-elements nil
sgml-auto-insert-required-elements nil)
(make-face 'sgml-comment-face)
(make-face 'sgml-doctype-face)
(make-face 'sgml-end-tag-face)
(make-face 'sgml-entity-face)
(make-face 'sgml-ignored-face)
(make-face 'sgml-ms-end-face)
(make-face 'sgml-ms-start-face)
(make-face 'sgml-pi-face)
(make-face 'sgml-sgml-face)
(make-face 'sgml-short-ref-face)
(make-face 'sgml-start-tag-face)
(set-face-foreground 'sgml-comment-face "gray")
(set-face-italic-p 'sgml-comment-face t)
(set-face-foreground 'sgml-doctype-face "white")
(set-face-background 'sgml-doctype-face "dodger blue")
(set-face-bold-p 'sgml-doctype-face t)
(set-face-foreground 'sgml-end-tag-face "dodger blue")
(set-face-foreground 'sgml-entity-face "dim gray")
(set-face-foreground 'sgml-ignored-face "maroon")
(set-face-background 'sgml-ignored-face "gray90")
(set-face-foreground 'sgml-ms-end-face "maroon")
(set-face-foreground 'sgml-ms-start-face "maroon")
(set-face-foreground 'sgml-pi-face "maroon")
(set-face-foreground 'sgml-sgml-face "maroon")
(set-face-foreground 'sgml-short-ref-face "goldenrod")
(set-face-foreground 'sgml-start-tag-face "dodger blue")
(setq-default
sgml-markup-faces
'(
(comment . sgml-comment-face)
(doctype . sgml-doctype-face)
(end-tag . sgml-end-tag-face)
(entity . sgml-entity-face)
(ignored . sgml-ignored-face)
(ms-end . sgml-ms-end-face)
(ms-start . sgml-ms-start-face)
(pi . sgml-pi-face)
(sgml . sgml-sgml-face)
(short-ref . sgml-short-ref-face)
(start-tag . sgml-start-tag-face)
))
(setq
sgml-custom-dtd
'(("TEIlite XML"
"<!DOCTYPE TEI.2 PUBLIC \"-//TEI//DTD TEI Lite XML ver. 1//EN\"
\"teixlite.dtd\">"
"teixlite.ced"))))
(add-hook 'sgml-mode-hook 'my-sgml)
(add-hook 'xsl-mode-hook
'turn-on-font-lock)
(defun my-c-mode()
"Customizations for C/C++ mode"
(interactive)
(global-set-key [f7] 'compile)
(setq c-auto-newline t))
(add-hook 'c-mode-hook 'my-c-mode)
(add-hook 'c++-mode-hook 'my-c-mode)
(defun my-java-mode-hook()
"Hook for running Java file..."
(c-set-offset 'substatement-open 0)
(c-set-offset 'statement-case-open 0)
(c-set-offset 'case-label '+)
(setq tab-width 2
c-basic-offset 2
indent-tabs-mode nil))
(add-hook 'java-mode-hook 'my-java-mode-hook)
(auto-insert-mode 1)
(add-hook 'find-file-hooks 'auto-insert)
(define-auto-insert
(cons "\\.\\([Hh]\\)$" "C/C++ Header File Template")
'(nil
"/*\n"
"\n"
" $Header: $\n"
" $Log: $\n"
"\n"
" \n"
"\n"
"*/\n"
(let* ((noext (substring buffer-file-name 0 (match-beginning 0)))
(nopath (file-name-nondirectory noext))
(indent (concat "__" (upcase nopath)
"_" (upcase (file-name-extension
buffer-file-name)))))
(concat "#ifndef " indent "\n"
"#define " indent "\n\n\n"
"#endif /* " indent " */"))
(previous-line 7)
(end-of-line)))
(define-auto-insert
(cons "\\.\\([cC]\\)" "C/C++ Source File Template")
'(nil
"/*\n"
"\n"
" $Header: $\n"
" $Log: $\n"
"\n"
" \n"
"\n"
"*/\n"
(let* ((nopath (file-name-nondirectory buffer-file-name))
(noext (file-name-sans-extension nopath)))
(concat "#include \"" noext ".h\"\n\n"))
(previous-line 5)
(end-of-line)))
(define-auto-insert
(cons "\\.\\(awk\\)" "AWK File Template")
'(nil
"#!/bin/bash\n"
"#\n"
"# $Header: $\n"
"# $Log: $\n"
"#\n"
"# \n"
"#\n"
"BEGIN{}\n"
"{\n"
"\n"
"}\n"
(previous-line 6)
(end-of-line)))
(define-auto-insert
(cons "\\.\\(htm\\)" "HTML File Template")
'(nil
"<!DOCTYPE XHTML PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\">\n"
"<html>\n"
" <head>\n"
" <title>\n"
"\n"
" </title>\n"
" <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n"
" <meta name=\"generator\" content=\"GNUEmacs\">\n"
" <meta name=\"keywords\" content=\"TODO\">\n"
" <meta name=\"description\" content=\"TODO\">\n"
" </head>\n"
" <body>\n"
" \n"
" <p align=\"right\"><b>Best</b> <i>viewed</i> <a><u>with</u></a> Lynx</p>\n"
" </body>\n"
"</html>\n"
(previous-line 4)
(end-of-line)))
(GNULinux
(define-key global-map [(delete)] "\C-d")
(XWindow
(create-fontset-from-fontset-spec
"-adobe-courier-medium-r-*-*-12-*-*-*-*-*-fontset-adobe,
latin-iso8859-1:-rfx-courier-medium-r-*-*-12-*-*-*-*-*-*-1,
latin-iso8859-2:-rfx-courier-medium-r-*-*-12-*-*-*-*-*-*-2,
cyrillic-iso8859-5:-rfx-courier-medium-r-*-*-12-*-*-*-*-*-*-5")
(create-fontset-from-fontset-spec
"-adobe-courier-medium-o-*-*-12-*-*-*-*-*-fontset-adobe,
latin-iso8859-1:-rfx-courier-medium-o-*-*-12-*-*-*-*-*-*-1,
latin-iso8859-2:-rfx-courier-medium-o-*-*-12-*-*-*-*-*-*-2,
cyrillic-iso8859-5:-rfx-courier-medium-o-*-*-12-*-*-*-*-*-*-5")
(create-fontset-from-fontset-spec
"-adobe-courier-bold-o-*-*-12-*-*-*-*-*-fontset-adobe,
latin-iso8859-1:-rfx-courier-bold-o-*-*-12-*-*-*-*-*-*-1,
latin-iso8859-2:-rfx-courier-bold-o-*-*-12-*-*-*-*-*-*-2,
cyrillic-iso8859-5:-rfx-courier-bold-o-*-*-12-*-*-*-*-*-*-5")
(create-fontset-from-fontset-spec
"-adobe-courier-bold-r-*-*-12-*-*-*-*-*-fontset-adobe,
latin-iso8859-1:-rfx-courier-bold-r-*-*-12-*-*-*-*-*-*-1,
latin-iso8859-2:-rfx-courier-bold-r-*-*-12-*-*-*-*-*-*-2,
cyrillic-iso8859-5:-rfx-courier-bold-r-*-*-12-*-*-*-*-*-*-5")
(create-fontset-from-fontset-spec
"-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf,
japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*,
katakana-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
latin-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
japanese-jisx0208-1978:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1978-*,
thai-tis620:-misc-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1,
lao:-misc-fixed-medium-r-normal--16-160-72-72-m-80-MuleLao-1,
tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1,
ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode,
tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0")
(setq default-frame-alist
'(
(top . 15) (left . 35) (width . 80) (height . 33) (cursor-color . "black")
(cursor-type . box)
(foreground-color . "black")
(background-color . "white")
(font . "-adobe-courier-medium-r-*-*-12-*-*-*-*-*-fontset-adobe"))))
(load-library "ps-mule")
(setq ps-multibyte-buffer
'bdf-font
ps-mule-font-info-database ps-mule-font-info-database-bdf
bdf-directory-list
'("/usr/X11R6/lib/X11/fonts/misc")))
(Windows
(set-w32-system-coding-system 'cp1251)
(setq w32-standard-fontset-spec
"-*-Courier New-normal-r-*-*-12-*-*-*-c-*-fontset-courier,
ascii:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-1,
latin-iso8859-1:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-1,
latin-iso8859-2:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-2,
latin-iso8859-3:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-3,
latin-iso8859-4:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-4,
latin-iso8859-9:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-9,
cyrillic-iso8859-5:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-5,
greek-iso8859-7:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-7,
hebrew-iso8859-8:-*-Rod-normal-r-*-*-12-*-*-*-c-*-iso8859-8,
ipa:-*-Lucida Sans Unicode-normal-r-*-*-12-*-*-*-c-*-muleipa*-*,
thai-tis620:-*-Tahoma-normal-r-*-*-12-*-*-*-c-*-tis620-*,
latin-jisx0201:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
katakana-jisx0201:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
japanese-jisx0208:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
japanese-jisx0208-1978:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
japanese-jisx0212:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0212-sjis,
korean-ksc5601:-*-Gulim-normal-r-*-*-12-*-*-*-c-*-ksc5601-*,
chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312-*,
chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5-*,
chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5-*")
(setq w32-enable-italics t) (create-fontset-from-fontset-spec w32-standard-fontset-spec t)
(setq w32-use-w32-font-dialog w32-fixed-font-alist '("Select Fontset"))
(setq bdf-directory-list
'("l:/lowry/emacs/intlfonts/Asian" "l:/lowry/emacs/intlfonts/Chinese"
"l:/lowry/emacs/intlfonts/Chinese.X" "l:/lowry/emacs/intlfonts/Ethiopic"
"l:/lowry/emacs/intlfonts/European" "l:/lowry/emacs/intlfonts/Japanese"
"l:/lowry/emacs/intlfonts/Japanese.X" "l:/lowry/emacs/intlfonts/Korean.X"
"l:/lowry/emacs/intlfonts/Misc/" "l:/lowry/emacs/intlfonts/Japanese.BIG"))
(setq w32-bdf-filename-alist (w32-find-bdf-fonts bdf-directory-list))
(setq ps-printer-name "//server/printer")
(load-library "ps-mule")
(setq ps-multibyte-buffer
'bdf-font
ps-mule-font-info-database ps-mule-font-info-database-bdf
bdf-directory-list
'(
"l:/intlfonts/Asian"
"l:/intlfonts/Chinese"
"l:/intlfonts/Chinese.X"
"l:/intlfonts/Ethiopic"
"l:/intlfonts/European"
"l:/intlfonts/Japanese"
"l:/intlfonts/Japanese.X"
"l:/intlfonts/Korean.X"
"l:/intlfonts/Misc"
"l:/intlfonts/Japanese.BIG")
)
(create-fontset-from-fontset-spec
"-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf8,
japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*,
katakana-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
latin-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
japanese-jisx0208-1978:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1978-*,
thai-tis620:-misc-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1,
lao:-misc-fixed-medium-r-normal--16-160-72-72-m-80-MuleLao-1,
tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1,
ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode,
tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0,
indian-1-column:-misc-fixed-medium-r-normal--16-160-72-72-c-80-muleindian-1,
indian-2-column:-misc-fixed-medium-r-normal--16-160-72-72-c-80-muleindian-2,
indian-is13194:-misc-fixed-medium-r-normal--16-160-72-72-c-80-is13194-devanagari")
(setq font-encoding-alist
(append '(("MuleTibetan-0" (tibetan . 0))
("GB2312" (chinese-gb2312 . 0))
("JISX0208" (japanese-jisx0208 . 0))
("JISX0212" (japanese-jisx0212 . 0))
("VISCII" (vietnamese-viscii-lower . 0))
("KSC5601" (korean-ksc5601 . 0))
("MuleArabic-0" (arabic-digit . 0))
("MuleArabic-1" (arabic-1-column . 0))
("MuleArabic-2" (arabic-2-column . 0))
("MuleIndian-1" (indian-1-column . 0))
("MuleIndian-2" (indian-2-column . 0))
("is13194-Devanagari" (indian-is13194 . 0))
)
font-encoding-alist))
(setq default-frame-alist
'(
(cursor-color . "black")
(cursor-type . box)
(foreground-color . "black")
(background-color . "white")
(font . "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-fontset-courier")
)
)
(defun my-shell-setup ()
"For bash under Emacs 20"
(setq comint-scroll-show-maximum-output 'this)
(setq comint-completion-addsuffix t)
(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 binary-process-input t)
(setq process-coding-system-alist
(cons
'("bash" . cp1251)
process-coding-system-alist)))
(custom-set-faces
'(xsl-xslt-main-face
((((class color)) (:foreground "black"))))
'(xsl-xslt-alternate-face
((((class color)) (:foreground "dodger blue"))))
'(xsl-fo-alternate-face
((((class color)) (:foreground "blue" :italic t))))
'(xsl-fo-main-face
((((class color)) (:foreground "Wheat"))))
'(xsl-other-element-face
((((class color)) (:foreground "dodger blue" :bold t))))
'(font-lock-comment-face
((((class color)) (:foreground "gray" :italic t))))
'(info-xref
((t (:bold t :foreground "DarkBlue"))))
'(font-lock-keyword-face
((((class color)) (:foreground "dodger blue" :bold t))))
'(message-highlighted-header-contents
((t (:foreground "red" :bold t :italic t))))
'(message-headers
((t (:foreground "forestgreen" :size "15" :bold t))))
'(modeline
((t (:inverse-video nil :foreground "black" :background "skyblue"))))
'(info-node
((t (:bold t :italic t :foreground "firebrick"))))
'(font-lock-function-name-face
((((class color)) (:foreground "DarkSlateBlue" :bold t))))
'(font-lock-type-face
((((class color)) (:foreground "cadet blue" :bold t))))
'(message-header-contents
((t (:foreground "rosybrown" :italic t))))
'(region
((t (:background "white smoke"))))
'(font-lock-constant-face
((t (:foreground "olive drab" :bold t))))
'(font-lock-variable-name-face
((t (:foreground "IndianRed" :italic t))))
'(jde-java-font-lock-package-face
((t (:foreground "Pink" :bold t))))
'(font-lock-string-face
((t (:foreground "DeepSkyBlue3"))))
'(jde-java-font-lock-number-face
((t (:foreground "blue"))))
)
(condition-case err
(require 'un-define)
(error
(message "Cannot load Mule-UCS %s" (cdr err))))
(GNUEmacs
(modify-coding-system-alist 'file "\\.utf8$" 'utf-8)
(modify-coding-system-alist 'file "\\.xml$" 'utf-8)
(modify-coding-system-alist 'file "\\.html$" 'utf-8)
(modify-coding-system-alist 'file "\\.tei$" 'utf-8)
(modify-coding-system-alist 'file "\\.xsl$" 'utf-8)
(modify-coding-system-alist 'file "\\.fo$" 'utf-8)
(modify-coding-system-alist 'file "\\.php$" 'utf-8)
(set-selection-coding-system 'cp1251))
(require 'desktop)
(setq
desktop-globals-to-save
(append
'((read-command-history . 9)
(file-name-history . 9)
(compile-history . 9)
(command-history . 9)
(extended-command-history . 9)
(shell-command-history . 9)
(query-replace-history . 9)
(regexp-history . 9)
(grep-history . 9)
(compile-command . 9)
(minibuffer-history . 9))
desktop-globals-to-save))
(desktop-load-default)
(desktop-read)
(add-hook
'kill-emacs-hook
'(lambda ()
(desktop-truncate search-ring 9)
(desktop-truncate regexp-search-ring 9)))
(defun tabify-buffer()
"tabifies the current buffer
has to always return nil, if added
to write-file-hooks"
(save-excursion
(goto-char (point-min))
(while (re-search-forward "[ \t]+$" nil t)
(delete-region (match-beginning 0) (match-end 0)))
(goto-char (point-min))
(if (search-forward "\t" nil t)
(tabify (1- (point)) (point-max))))
nil)
(defun untabify-buffer()
(interactive)
"untabifies the current buffer
has to always return nil, if added
to write-file-hooks"
(save-excursion
(goto-char (point-min))
(while (re-search-forward "[ \t]+$" nil t)
(delete-region (match-beginning 0) (match-end 0)))
(goto-char (point-min))
(if (search-forward "\t" nil t)
(untabify (1- (point)) (point-max))))
nil)
(defun downcase-sgml-buffer()
(interactive)
"downcase all html tags in the current buffer"
(save-excursion
(goto-char (point-min))
(while (re-search-forward "(<)(.+)(>)]" nil t)
(downcase-sgml-tag (match-beginning 2) (match-end 2))))
nil)
(defun downcase-sgml-tag(start end)
(save-excursion
(save-restriction
(narrow-to-region start end)
(goto-char start)
(re-search-forward "^([A-Z]+)" nil t)
(downcase-region (match-beginning 1) (match-end 1))))
nil)
(server-start)
(defun autocompile()
"compile itself if ~/.emacs"
(interactive)
(if (string= (buffer-file-name) (concat default-directory ".emacs"))
(byte-compile-file (buffer-file-name))))
(add-hook 'after-save-hook 'autocompile())
(defun do-on-write-file()
(untabify-buffer)
(setq nuke-trailing-whitespace-p t)
(nuke-trailing-whitespace))
(add-hook 'write-file-hooks 'do-on-write-file)
(add-hook 'mail-send-hook 'do-on-write-file)