emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.60; Echo Area Face


From: Alin Soare
Subject: Re: 23.0.60; Echo Area Face
Date: Mon, 2 Dec 2013 18:02:19 +0200

> I was experimenting with Miles Baders new face remapping functionality
> and tried to display the minibuffer/echo area in a smaller font size.
> This does the job for minibuffer-iteraction:
> (add-hook 'minibuffer-setup-hook 'set-minibuffer-face)
> (defun set-minibuffer-face ()
>     (set (make-local-variable 'face-remapping-alist)
>        '((default :family "DejaVu Sans" :height 0.75))))
> but there doesn't seem a way to influence the display of messages
> displayed in the minibuffer. I tought the above would take care of it. I
> know the minibuffer is somewhat special. How do I set a buffer local
> variable for it?
I thought that maybe the following hack I've been using for ages (to add
special key bindings to my minibuffer-only frame, such as `f' to
find-file-other-frame) would work as well but it doesn't because the
echo messages are displayed in the same window as the minibuffers, but
in diferent buffers.
(add-hook 'minibuffer-exit-hook
          (lambda ()
            (with-current-buffer (window-buffer (minibuffer-window))
              (set (make-local-variable 'face-remapping-alist)
                   '((default :family "DejaVu Sans" :height 0.75))))))
so you'll need to set this var in all the " *Echo Area N*" buffers,
which is rather ugly.  I don't know how many of them there can be:
I only see 2 here (the 0 and the 1), but maybe there can be more (tho
maybe not, since there can't be recursive echo area messages AFAIK),

        Stefan


I do not undestand at all why do you set the faces of a *minibuffer* when you EXIT, instead of setting it when you ENTER it, via minibuffer-setup-hook.

I did so for all major modes (a different file for each hook I need) -- including for minibiffer --, and it works well:

(defun minibuffer-setup ()
  (load (thinkpad-x-theme 'minibuffer) t t)
  )

(add-hook 'minibuffer-setup-hook 'minibuffer-setup nil)







reply via email to

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