help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Customization interface not applying all of my changes


From: Benazeer Noorani
Subject: Customization interface not applying all of my changes
Date: Fri, 29 Oct 2004 18:25:01 +0900

Hello.

I'm running GNU emacs 21.2 on redhat. 

I've been trying to customize the colors that font-lock uses so they
aren't quite as unreadable as the defaults. All of my changes have
"stuck," so to speak, except for comments. Regardless of what I've
tried, emacs uses a font called "firebrick-italic" for comments
instead of "font-lock-comment-face"  I've tried using the
customization interface to set firebrick-italic to nil, which corrects
the problem for the current session, but even when I click on "Save
for Future Sessions," the setting is not saved. Googling for "emacs
font," "emacs face," "emacs font-lock" and the like has not provided
any useful advice.  I checked the archives as well and saw nothing
obvious, but I could just be overlooking the one simple fix.

I've copied my .emacs (much of which I did not write - about half of
it is the default .emacs in my lab in order to handle Japanese
correctly, and half I copied from emacswiki.com) in case there's
something weird in there that is causing the problem.

Many thanks,

Benazeer

;;Initialization for each site
;;; You can overwrite the followings in $home/.emacs

(setenv "LC_TIME" "c")

; Lisp ライブラリの load path に "~/elisp" を追加します。
;(setq load-path (cons (expand-file-name "~/elisp") 
;                             load-path))

;; for tm
;(load "mime-setup")
;; fonts and colors


(global-font-lock-mode 1)
(set-foreground-color "wheat")
(set-background-color "DarkSlateGrey")
(add-to-list 'default-frame-alist '(font .
"-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"))



 (defun egoge-wash-out-colour (colour &optional degree)
  "Return a colour string specifying a washed-out version of COLOUR."
  (let ((basec (color-values
                (face-attribute 'default :foreground)))
        (col (color-values colour))
        (list nil))
    (unless degree (setq degree 2))
    (while col
      (push (/ (/ (+ (pop col) 
                     (* degree (pop basec)))
                  (1+ degree))
               256)
            list))
    (apply 'format "#%02x%02x%02x" (nreverse list))))
 
 
 (defun egoge-wash-out-face (face &optional degree)
   "Make the foreground colour of FACE appear a bit more pale."
   (let ((colour (face-attribute face :foreground)))
     (unless (eq colour 'unspecified)
       (set-face-attribute face nil
                          :foreground (egoge-wash-out-colour colour degree)))))
 
 (defun egoge-find-faces (regexp)
   "Return a list of all faces whose names match REGEXP."
   (delq nil
        (mapcar (lambda (face)
                  (and (string-match regexp
                                     (symbol-name face))
                       face))
                (face-list))))
 
 (defun egoge-wash-out-fontlock-faces (&optional degree)
   (mapc (lambda (elt) 
           (egoge-wash-out-face elt degree))
         (delq 'font-lock-warning-face 
               (egoge-find-faces "^font-lock"))))
 
(when (> (length (defined-colors)) 16)
  (egoge-wash-out-fontlock-faces 2))


;; kanji-code
(setq default-mc-flag t)
(setq mc-verbose-code t)
(setq enable-double-n-syntax t)


; 文字コードを *euc-japan* にします。

(if (and (boundp 'MULE) MULE)
    (progn
      (set-default-file-coding-system '*euc-japan*)
      (set-file-coding-system  '*euc-japan*)
          (set-keyboard-coding-system  '*euc-japan*)
            ))
(cond
  ((and (string-match "XEmacs" emacs-version)
         (set-default-buffer-file-coding-system 'euc-japan)
          (set-default-file-coding-system        'euc-japan)
           (set-file-coding-system                'euc-japan)
            (set-keyboard-coding-system            'euc-japan)
             )))
;;

; MH のプログラムとやりとりするときの文字コードを JIS に指定します。
(if (boundp 'MULE)
(progn
        (define-program-coding-system nil ".*scan.*" (cons *junet* *junet*))
        (define-program-coding-system nil ".*inc.*" (cons *junet*
        *junet*))))
(if (boundp 'NEMACS)
(progn
        (define-program-kanji-code nil ".*scan.*" 2)
        (define-program-kanji-code nil ".*inc.*" 2)))

; Text モードにするとき、常に auto-fill-mode にします。
(setq text-mode-hook
        '(lambda () (auto-fill-mode 1)))
;;; For Text Mode
(setq text-mode-hook 'turn-on-auto-fill)
(setq text-mode-hook
  '(lambda () (auto-fill-mode 1)
              (setq fill-column 70)
              (setq tab-width 8)
        )
)
(setq c-mode-hook
  '(lambda () (setq tab-width 8)
                  (setq c-indent-level 8)
                  (setq c-tab-width 8)
                  (setq c-argdecl-indent 0)
              (setq comment-column 50)
              (setq-default comment-column 50)
        )
)

; mail-mode にしたときに、ファイル文字コードを JIS にセットするようにし
; ます。
(setq mail-mode-hook
        '(lambda ()
        (setq kanji-fileio-code 2)  ; for Nemacs
        (if (boundp 'MULE)
        (set-file-coding-system *junet*))))

; GNUS 用の設定を行います。
; 注:必ず各サイト用の設定に書き直してください。
(setq gnus-nntp-server "newsread.atr.co.jp")
(autoload 'gnus "gnus" "Read network news." t)
(autoload 'gnus-post-news "gnuspost" "Post a new news." t)
(setq gnus-your-domain "mic.atr.co.jp")
(setq gnus-nntp-service "nntp")
(setq gnus-use-generic-from t)
(setq gnus-local-organization "MI&C ATR" )
(setq gnus-local-timezone "+0900")



; BS (C-h) キーと DEL キーを入れかえます。
(load-library "term/bobcat")

;;; Mode hook setting part.

; Display line number
(line-number-mode 1)

; Display Time
(setq display-time-and-date nil)
(display-time)

; High Light mode
(cond (window-system
       (load "hilit19.elc")
))

;;; For Mail Mode
(setq mail-self-blind t)
(setq mail-archive-file-name "~/RMAIL-archive")
(setq mail-interactive t)
(setq rmail-file-name "~/RMAIL")
(setq gnus-mail-reply-method(function gnus-mail-reply-using-mhe))
(setq gnus-mail-forward-method(function gnus-mail-forward-using-mhe))
(setq gnus-mail-other-window-method(function gnus-mail-other-window-using-mhe))

;;; Misc.
(setq inhibit-startup-message t)
(setq version-control t)
(setq kept-new-versions 1)
(setq kept-old-versions 0)
(setq trim-versions-without-asking t)
(setq visible-bell t)

(setq display-time-day-and-date nil)
(global-set-key "\C-xd" 'dired)
(global-set-key "\C-w" 'kill-region)


(load-library "shell")

;;; Wnn
(setq wnn-host-name "localhost")

;;; SJ3 
;;(setq atr-sw-use-sj3 t)

;; for canna
(if (and (boundp 'CANNA) CANNA)
    (progn
      (setq canna-server "localhost")
      (cond ((boundp 'egg-version)
             (require 'can-n-egg)
             (can-n-egg))
            (t
             (require 'canna)
             (setq canna-underline t)
             (load-library "canna")
             (setq canna-do-keybind-for-functionkeys t)
             (global-set-key "\C-\\" 'canna-toggle-japanese-mode)
             (global-set-key "\C-t" 'canna-touroku-region)
             (setq canna-file (expand-file-name "~/.canna"))
             (global-set-key "\C-_" 'canna-undo)
             (canna)
             ))
      ))
;
(defun all ()
  " printout buffer all "          
  (interactive)
  (mark-whole-buffer) () )
(fset 'p1 "xshe -c -o 
a2ps|lpr -Pdp-a4
")   ; ( DP300 )
(fset 'p2 "xshe -c -o 
a2ps|lpr -Pdp-a4-2up
")    ; ( DP300 )
(fset 'p3 "xshe -c -o 
a2ps|dpallpr -P dp -SP T2
")   ; ( DP300 )

;;; Pensee

(fset 'je "xshe -c -o 
rsh ms17 PNS_TRANS -je -
")   ; 

;;; short cut 
;(global-unset-key "\C-xm")
;(global-set-key "\C-xm" 'mh-rmail)

;;; for mew
(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)
(setq mew-mail-domain-list
 '("mic.atr.co.jp" ))
;(setq mew-cc "your@domain")
;(setq mew-fcc "Yourname")
;(setq mew-use-overlay-keymap nil)

;; to process marks in summary mode before exiting Emacs.
;;
;;(setq mew-init-hook
;;      (function
;;       (lambda ()
;;         (setq kill-emacs-hook (function mew-mark-process-all-folders)))))
 (setq mew-from "Your Name <you@mic.atr.co.jp>")

;;
;; to handle colors.
;;

(cond
 ((and window-system (string-match "^19" emacs-version))
      (setq hilit-mode-enable-list  nil
            hilit-background-mode   'light
            hilit-inhibit-hooks     nil
            hilit-inhibit-rebinding nil)
      (require 'hilit19)
      ;;
      (add-hook 'mew-message-hook
                'hilit-rehighlight-buffer-quietly)
      (hilit-set-mode-patterns 
       '(mew-message-mode)
       '(("^Subject:.*$" nil msg-subject)
         ("^From:.*$" nil msg-from)
         ("^X-.*:.*$" nil msg-quote)
         ("^>.*$" nil msg-quote)
         ("^[A-Za-z][A-Za-z0-9-]+:" nil msg-header)))
      ;;
      (add-hook 'mew-draft-mode-hook
                'hilit-rehighlight-buffer-quietly)
      (hilit-set-mode-patterns 
       '(mew-draft-mode)
       '(("^Subject:.*$" nil msg-subject)
         ("^From:.*$" nil msg-from)
         ("^>.*$" nil msg-quote)
         ("^[A-Za-z][A-Za-z0-9-]+:" nil msg-header)))
      )
 )


;; For html-helper-mode
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
;; to invoke html-helper-mode automatically on .html files, do this:
(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist)) 


;; for lookup
(autoload 'lookup "lookup" nil t)
(autoload 'lookup-region "lookup" nil t)
(autoload 'lookup-pattern "lookup" nil t)
;(setq lookup-search-agents '((ndtp "dserver") 
;       (ndic "/export/hostname/dict") (ndspell)))
(setq lookup-search-agents '((ndtp "dserver") (ndspell)))
;; End of file.

(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(firebrick-italic ((t nil))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]