emacs, dot-emacs: Mark files as being UTF-8.
[profile] / dot-emacs.el
index c5e3dfd..9fe9741 100644 (file)
@@ -1,4 +1,4 @@
-;;; -*-emacs-lisp-*-
+;;; -*- mode: emacs-lisp; coding: utf-8 -*-
 ;;;
 ;;; $Id$
 ;;;
@@ -34,7 +34,9 @@
   "Execute FORMS without allowing errors to propagate outside."
   `(condition-case err
        ,(if (cdr forms) (cons 'progn forms) (car forms))
-     (error (message "Error (trapped): %s" (error-message-string err)))))
+     (error (message "Error (trapped): %s in %s"
+                    (error-message-string err)
+                    ',forms))))
 
 ;; --- Configuration reading ---
 
@@ -578,13 +580,15 @@ doesn't cope with anything approximating a complicated case."
       ,@(cond ((eq window-system 'w32)
               '(:family "courier new" :height 85))
              ((eq window-system 'x)
-              '(:family "misc-fixed" :width semi-condensed))))
+              '(:family "misc-fixed" :height 130 :width semi-condensed))))
     (fixed-pitch)
     (minibuffer-prompt)
-    (modeline :foreground "blue" :background "yellow"
-             :box (:line-width 1 :style released-button))
+    (mode-line :foreground "blue" :background "yellow"
+              :box (:line-width 1 :style released-button))
+    (mode-line-inactive :foreground "yellow" :background "blue"
+                       :box (:line-width 1 :style released-button))
     (scroll-bar :foreground "black" :background "lightgrey")
-    (fringe :foreground "yellow" :background "grey30")
+    (fringe :foreground "yellow" :background "black")
     (show-paren-match-face :background "darkgreen")
     (show-paren-mismatch-face :background "red")
     (font-lock-warning-face :background "red" :weight bold)
@@ -1639,6 +1643,26 @@ strip numbers instead."
         (list "[$^_{}#&]"
               '(0 mdw-punct-face)))))
 
+;;;----- SGML hacking -------------------------------------------------------
+
+(defun mdw-sgml-mode ()
+  (interactive)
+  (sgml-mode)
+  (mdw-standard-fill-prefix "")
+  (make-variable-buffer-local 'sgml-delimiters)
+  (setq sgml-delimiters
+       '("AND" "&" "COM" "--" "CRO" "&#" "DSC" "]" "DSO" "[" "DTGC" "]"
+         "DTGO" "[" "ERO" "&" "ETAGO" ":e" "GRPC" ")" "GRPO" "(" "LIT" "\""
+         "LITA" "'" "MDC" ">" "MDO" "<!" "MINUS" "-" "MSC" "]]" "NESTC" "{"
+         "NET" "}" "OPT" "?" "OR" "|" "PERO" "%" "PIC" ">" "PIO" "<?"
+         "PLUS" "+" "REFC" "." "REP" "*" "RNI" "#" "SEQ" "," "STAGO" ":"
+         "TAGC" "." "VI" "=" "MS-START" "<![" "MS-END" "]]>"
+         "XML-ECOM" "-->" "XML-PIC" "?>" "XML-SCOM" "<!--" "XML-TAGCE" "/>"
+         "NULL" ""))
+  (setq major-mode 'mdw-sgml-mode)
+  (setq mode-name "[mdw] SGML")
+  (run-hooks 'mdw-sgml-mode-hook))
+
 ;;;----- Shell scripts ------------------------------------------------------
 
 (defun mdw-setup-sh-script-mode ()
@@ -1929,7 +1953,7 @@ strip numbers instead."
            'comint-watch-for-password-prompt))
 
 (defun mdw-term-mode-setup ()
-  (setq term-prompt-regexp "^[^]#$%>»}\n]*[]#$%>»}] *")
+  (setq term-prompt-regexp "^[^]#$%>»}\n]*[]#$%>»}] *")
   (make-local-variable 'mouse-yank-at-point)
   (make-local-variable 'transient-mark-mode)
   (setq mouse-yank-at-point t)