unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Why .\.emacs doesn't work after upgrade to 21.2.2
@ 2002-09-17 16:48 TCLin
  2002-09-18  0:01 ` John Paul Wallington
  0 siblings, 1 reply; 2+ messages in thread
From: TCLin @ 2002-09-17 16:48 UTC (permalink / raw)


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")

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why .\.emacs doesn't work after upgrade to 21.2.2
  2002-09-17 16:48 Why .\.emacs doesn't work after upgrade to 21.2.2 TCLin
@ 2002-09-18  0:01 ` John Paul Wallington
  0 siblings, 0 replies; 2+ messages in thread
From: John Paul Wallington @ 2002-09-18  0:01 UTC (permalink / raw)


tclin1998@yahoo.com (TCLin) wrote:

> error: "Invalid face", font-lock-reference-face

from the NEWS file:

"The face and variable previously known as font-lock-reference-face
are now called font-lock-constant-face to better reflect their typical
use for highlighting constants and labels.  (Its face properties are
unchanged.)  The variable font-lock-reference-face remains for now for
compatibility reasons, but its value is font-lock-constant-face."

You could search for all uses of font-lock-reference-face in your
.emacs and replace them with font-lock-constant-face.

-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-18  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-17 16:48 Why .\.emacs doesn't work after upgrade to 21.2.2 TCLin
2002-09-18  0:01 ` John Paul Wallington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).