From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: tclin1998@yahoo.com (TCLin) Newsgroups: gmane.emacs.help Subject: Why .\.emacs doesn't work after upgrade to 21.2.2 Date: 17 Sep 2002 09:48:50 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1032281760 3639 127.0.0.1 (17 Sep 2002 16:56:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 17 Sep 2002 16:56:00 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17rLdj-0000w7-00 for ; Tue, 17 Sep 2002 18:55:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17rLe3-0005SJ-00; Tue, 17 Sep 2002 12:56:15 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 184 Original-NNTP-Posting-Host: 158.140.2.102 Original-X-Trace: posting.google.com 1032281330 6553 127.0.0.1 (17 Sep 2002 16:48:50 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 17 Sep 2002 16:48:50 GMT Original-Xref: nntp.stanford.edu gnu.emacs.help:104986 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1542 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1542 Hello All: The attachment is the .emacs I used to use and it works fine. After upgrating Emacs to 21.2.2, I have the following error message: --- An error has occurred while loading `/home/tachlin/.emacs': error: "Invalid face", font-lock-reference-face To ensure normal operation, you should investigate the cause of the error in your initialization file and remove it. Start Emacs with the `--debug-init' option to view a complete error backtrace --- Any idea? -Todd -- .emacs begin ---; Author: Various sources (define-key global-map [f2] 'save-buffer) (define-key global-map [f3] 'kill-buffer) (define-key global-map [f4] 'find-file) (define-key global-map [f7] 'scroll-down) (define-key global-map [f8] 'scroll-up) (define-key global-map [f9] 'compile) (define-key global-map [f10] 'shell) (define-key global-map [home] 'beginning-of-line) (define-key global-map [end] 'end-of-line) (define-key global-map "\C-f" 'scroll-up) (define-key global-map "\C-b" 'scroll-down) (define-key global-map "\C-cg" 'goto-line) (define-key global-map "\C-ce" 'new-equation) (define-key global-map "\C-cc" 'set-justification-center) (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) ;; ;; (defun color-emacs () (setq transient-mark-mode t) (turn-on-font-lock) (add-hook 'tex-mode-hook 'turn-on-font-lock) (add-hook 'c-mode-hook 'turn-on-font-lock) (add-hook 'c++-mode-hook 'turn-on-font-lock) (add-hook 'c++-mode-hook 'turn-on-font-lock) (add-hook 'perl-mode-hook 'turn-on-font-lock) (add-hook 'verilog-mode-hook 'turn-on-font-lock) (set-face-background 'default "black") (set-face-foreground 'default "white") (set-face-background 'modeline "green") (set-face-foreground 'modeline "black") (set-cursor-color "green") (set-mouse-color "red3") (setq default-frame-alist '((width . 80) (height . 35) (menu-bar-lines . 1) (cursor-color . "red3") (foreground-color . "green") (background-color . "black") (mouse-color . "red"))) (set-face-foreground 'font-lock-comment-face "gold") (set-face-foreground 'font-lock-string-face "limegreen") (set-face-foreground 'font-lock-function-name-face "pink") (set-face-foreground 'font-lock-variable-name-face "GreenYellow") (set-face-foreground 'font-lock-keyword-face "cyan") (set-face-foreground 'font-lock-type-face "red") (set-face-foreground 'font-lock-reference-face "red") ) (if (and window-system (x-display-color-p)) (progn (cond (running-xemacs (color-xemacs)) (t (color-emacs))))) ;; Options Menu Settings ;; ===================== (cond ((and (string-match "XEmacs" emacs-version) (boundp 'emacs-major-version) (= emacs-major-version 19) (>= emacs-minor-version 12)) (setq-default overwrite-mode nil) (setq-default teach-extended-commands-p t) (setq-default bar-cursor nil) (setq-default debug-on-error nil) (setq-default debug-on-quit nil) (setq-default complex-buffers-menu-p nil) (setq-default font-menu-ignore-scaled-fonts t) (setq-default font-menu-this-frame-only-p t) (setq-default buffers-menu-max-size 20) (setq-default case-fold-search t) (setq-default case-replace t) (setq-default zmacs-regions t) (setq-default truncate-lines nil) (setq-default mouse-yank-at-point nil) (if (and (featurep 'toolbar) (eq (device-type (selected-device)) 'x)) (progn (remove-sp ecifier default-toolbar 'global) (add-spec-list-to-specifier default-toolbar '((global (n il [toolbar-file-icon find-file t "Open a file"] [toolbar-folder-icon dired t "View direc tory"] [toolbar-disk-icon save-buffer t "Save buffer"] [toolbar-printer-icon print-buffer t "Print buffer"] [toolbar-cut-icon x-kill-primary-selection t "Kill region"] [toolbar-c opy-icon x-copy-primary-selection t "Copy region"] [toolbar-paste-icon x-yank-clipboard-s election t "Paste from clipboard"] [toolbar-undo-icon undo t "Undo edit"] [toolbar-spell- icon toolbar-ispell t "Spellcheck"] [toolbar-replace-icon query-replace t "Replace text"] [toolbar-mail-icon toolbar-mail t "Mail"] [toolbar-info-icon toolbar-info t "Information "] [toolbar-compile-icon compile t "Compile"] [toolbar-debug-icon toolbar-debug t "Debug" ] [toolbar-news-icon toolbar-news t "News"])))))) (add-spec-list-to-specifier modeline-shadow-thickness '((global (nil . 2)))) (setq-default font-lock-auto-fontify t) (setq-default font-lock-use-fonts nil) (setq-default font-lock-use-colors t) (setq-default font-lock-use-maximal-decoration nil) (setq-default font-lock-mode-enable-list nil) (setq-default font-lock-mode-disable-list nil) (require 'font-lock) (remove-hook 'font-lock-mode-hook 'turn-on-fast-lock) (set-face-foreground 'font-lock-comment-face "gold") (set-face-background 'font-lock-comment-face "midnightblue") (set-face-font 'font-lock-comment-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-* ") (set-face-foreground 'font-lock-string-face "limegreen") (set-face-background 'font-lock-string-face "midnightblue") (set-face-font 'font-lock-string-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*") (set-face-foreground 'font-lock-doc-string-face "lightseagreen") (set-face-background 'font-lock-doc-string-face "midnightblue") (set-face-font 'font-lock-doc-string-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*") (set-face-foreground 'font-lock-function-name-face "pink") (set-face-background 'font-lock-function-name-face "midnightblue") (set-face-font 'font-lock-function-name-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*") (set-face-foreground 'font-lock-keyword-face "cornsilk") (set-face-background 'font-lock-keyword-face "midnightblue") (set-face-font 'font-lock-keyword-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*") (set-face-foreground 'font-lock-type-face "red") (set-face-background 'font-lock-type-face "midnightblue") (set-face-font 'font-lock-type-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*") (set-face-foreground 'font-lock-preprocessor-face "cyan") (set-face-background 'font-lock-preprocessor-face "midnightblue") (set-face-font 'font-lock-type-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*") (set-face-foreground 'font-lock-keyword-face "pink") (set-face-background 'font-lock-keyword-face "midnightblue") (set-face-font 'font-lock-type-face "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*") )) ;; ============================ ;; End of Options Menu Settings ;; ;; learning ;;(setq default-major-mode 'text-mode) ;;(add-hook 'text-mode-hook 'turn-on-auto-fill) ;;(setq auto-mode-alist (cons '("\\.c\\'" . text-mode) auto-mode-alist)) ;;(setq auto-mode-alist (cons '("\\.h\\'" . text-mode) auto-mode-alist)) ;(setq default-tab-width 4) ; (setq auto-save-default nil) (set-background-color "Black") (set-foreground-color "White")