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

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

Re: [h-e-w] 21.1: Mixed bold/normal font for modeline?


From: Alexander G. Burchell
Subject: Re: [h-e-w] 21.1: Mixed bold/normal font for modeline?
Date: 14 Nov 2001 15:05:24 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

This solution is somewhat complicated.  There may be an easier way
now.

  (make-face 'mode-line-keyword-face)
  (make-face 'mode-line-function-name-face)
  ;; Rearrange the modeline so that everything is to the left of the
  ;; long list of minor modes, which is relatively unimportant but takes
  ;; up so much room that anything to the right is obliterated.
  (setq-default mode-line-buffer-identification
                '(:eval (propertize "%12b" 'face 'mode-line-keyword-face)))
  (setq-default which-func-format
                '("[" (:eval (propertize which-func-current 'face
                                         'mode-line-function-name-face)) "]"))
  (setq-default mode-line-format
                (list "-" mode-line-mule-info mode-line-modified
                      mode-line-frame-identification
                      mode-line-buffer-identification "   "
                      'global-mode-string
                      '(which-func-mode (" " which-func-format))
                      '(line-number-mode (" L%l"))
                      '(column-number-mode (" C%c" "--")) '(-4 . " %p")
                      "   %[("
                      '(:eval (mode-line-mode-name)) 'mode-line-process
                      'minor-mode-alist "%n" ")%]--" "-%-"))

Now you can change mode-line-function-name-face and
mode-line-keyword-face as you wish.  I do it in the following way,
which is wrong:

  ;; XXX should move
  (add-hook 'after-init-hook
            '(lambda ()
               (copy-face 'font-lock-keyword-face 'mode-line-keyword-face)
               (set-face-foreground 'mode-line-keyword-face "royalblue")
               (copy-face 'font-lock-function-name-face
                          'mode-line-function-name-face)
               (set-face-foreground 'mode-line-function-name-face
                                    "darkslateblue")))

Best wishes,
-- 
Alexander G. Burchell
Wilshire Associates
address@hidden




reply via email to

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