From: "Drew Adams" <drew.adams@oracle.com>
To: "moueza" <mouezapeter@gmail.com>,
"Help-Gnu-Emacs" <help-gnu-emacs@gnu.org>
Cc: Emacs-devel@gnu.org
Subject: RE: live programming
Date: Fri, 26 Jan 2007 07:12:30 -0800 [thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMCEHGCOAA.drew.adams@oracle.com> (raw)
In-Reply-To: <8598159.post@talk.nabble.com>
> >> Usually, we modify .emacs files for example to load a new color of
> >> scroll-bar at the start of emacs. But is it possible to change this
> >> color in real time when it is already loaded...
> >
> > I believe you can just `M-x customize-face scroll-bar RET', at least in
> > Emacs 22. Or use `M-x modify-face scroll-bar RET' or call
> > `modify-face' or `set-face-attribute' from Emacs-Lisp code.
>
> Yes , but with M-x , it implies to load it manually.But I want an
> automatic periodically change of colors.
Sorry, I guess I didn't understand what you're asking. Please try again.
You mentioned "real-time", so I thought you wanted to change the color
interactively. Do you want to change it by Emacs-Lisp at runtime? If so, you
can use modify-face or set-face-attribute from Lisp, then save the change
using a custom function.
Check cus-edit.el to see if there is a function to save a changed face. I
don't see a `customize-save-face', however, so perhaps you'll have to write
one, using `customize-save-variable' as inspiration. In some of my code, I
do what I think you want this way:
;; change the background
(if (fboundp 'set-face-attribute) ; Not available in Emacs 20
(set-face-attribute face nil ':background new-background)
(modify-face face nil new-background nil nil nil nil))
;; save the change
(put face 'customized-face
(list (list 't (list ':background new-background)))))
(put face 'face-modified nil)
FYI - This is in my library doremi-frm.el:
http://www.emacswiki.org/cgi-bin/wiki/doremi-frm.el (code) and
http://www.emacswiki.org/cgi-bin/wiki/DoReMi (doc).
Perhaps someone else has a better suggestion. I'm moving this to the proper
list, help-gnu-emacs; please remove emacs-devel from the cc of any replies.
prev parent reply other threads:[~2007-01-26 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 12:45 live programming moueza
2007-01-23 21:31 ` Drew Adams
2007-01-25 8:44 ` moueza
2007-01-26 15:12 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EIENLHALHGIMHGDOLMIMCEHGCOAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
--cc=Emacs-devel@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=mouezapeter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.