* Creating a function to change custom-set-faces
@ 2003-04-15 9:44 Jon
2003-04-15 18:12 ` Johan Bockgård
0 siblings, 1 reply; 5+ messages in thread
From: Jon @ 2003-04-15 9:44 UTC (permalink / raw)
I have a set of custom colors set up in emacs that I find much easier
on the eyes - lots of greens & pastels.
Unfortunately, it doesn't print too nicely. My current solution is
two .emacs files - when I want to print, quit emacs, swap the files,
start emacs, print, etc etc.
Obviously, this doesn't seem like the best way of doing things.
The .emacs file contains a section custom-set-faces, with all of my
customizations in. I was hoping to create a function to set these for
me, so I could swap colors on the fly.
I tried M-x custom-set-faces, which doesn't exist. And that's about
where my emacs knowledge runs out...
How can I set custom faces up, based on info from the .emacs file?
Thanks,
Jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating a function to change custom-set-faces
2003-04-15 9:44 Creating a function to change custom-set-faces Jon
@ 2003-04-15 18:12 ` Johan Bockgård
2003-04-16 8:21 ` Jon
0 siblings, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2003-04-15 18:12 UTC (permalink / raw)
j_del_strother@hotmail.com (Jon) writes:
> I tried M-x custom-set-faces, which doesn't exist.
The function does exist, but it is not interactive (hence M-x doesn't
work). See C-h f custom-set-faces
> I have a set of custom colors set up in emacs that I find much
> easier on the eyes - lots of greens & pastels. Unfortunately, it
> doesn't print too nicely.
You might also want to look at ps-print.el (it should be in the lisp
directory). If so there is plenty in that file to read.
,----[ ps-print.el ]
| ;; About ps-print
| ;; --------------
| ;;
| ;; This package provides printing of Emacs buffers on PostScript
| ;; printers; the buffer's bold and italic text attributes are
| ;; preserved in the printer output. ps-print is intended for use
| ;; with Emacs or Lucid Emacs, together with a fontifying package
| ;; such as font-lock or hilit.
| ;;
| ;; ps-print uses the same face attributes defined through font-lock
| ;; or hilit to print a PostScript file, but some faces are better
| ;; seeing on the screen than on paper, specially when you have a
| ;; black/white PostScript printer.
| ;;
| ;; ps-print allows a remap of face to another one that it is better
| ;; to print, for example, the face font-lock-comment-face (if you
| ;; are using font-lock) could have bold or italic attribute when
| ;; printing, besides foreground color. This remap improves printing
| ;; look (see How Ps-Print Maps Faces).
|
| [...]
|
| ;; How Ps-Print Deals With Color
| ;; -----------------------------
| ;;
| ;; ps-print detects faces with foreground and background colors
| ;; defined and embeds color information in the PostScript image. The
| ;; default foreground and background colors are defined by the
| ;; variables `ps-default-fg' and `ps-default-bg'.
| ;; On black/white printers, colors are displayed in gray scale. To
| ;; turn off color output, set `ps-print-color-p' to nil. You can
| ;; also set `ps-print-color-p' to 'black-white to have a better
| ;; looking on black/white printers. See also `ps-black-white-faces'
| ;; for documentation.
|
| [...]
`----
--
Johan Bockgård
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating a function to change custom-set-faces
2003-04-15 18:12 ` Johan Bockgård
@ 2003-04-16 8:21 ` Jon
2003-04-16 8:52 ` Johan Bockgård
0 siblings, 1 reply; 5+ messages in thread
From: Jon @ 2003-04-16 8:21 UTC (permalink / raw)
bojohan+news@dd.chalmers.se (Johan Bockgård) wrote in message news:<yoijvfxfr5nx.fsf@helm.dd.chalmers.se>...
> j_del_strother@hotmail.com (Jon) writes:
>
> > I tried M-x custom-set-faces, which doesn't exist.
>
> The function does exist, but it is not interactive (hence M-x doesn't
> work). See C-h f custom-set-faces
Ahh...that makes more sense.
Incidentally, for other noobs like me, you can create a
custom-set-faces interactive function using something like this:
(defun green_face ()
"Changes to a green typeset"
(interactive)
(custom-set-faces
'(default((t (:background "darkgreen" blah blah blah))
'(cursor ((t (:background "white" etc...
)
)
Which will then allow you to do M-x custom-set-faces.
Thanks for the help,
Jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating a function to change custom-set-faces
2003-04-16 8:21 ` Jon
@ 2003-04-16 8:52 ` Johan Bockgård
2003-04-16 14:19 ` Jon
0 siblings, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2003-04-16 8:52 UTC (permalink / raw)
j_del_strother@hotmail.com (Jon) writes:
> (defun green_face ()
> "Changes to a green typeset"
> (interactive)
[...]
> )
>
> Which will then allow you to do M-x custom-set-faces.
Rather M-x green_face ...
--
Johan Bockgård
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating a function to change custom-set-faces
2003-04-16 8:52 ` Johan Bockgård
@ 2003-04-16 14:19 ` Jon
0 siblings, 0 replies; 5+ messages in thread
From: Jon @ 2003-04-16 14:19 UTC (permalink / raw)
bojohan+news@dd.chalmers.se (Johan Bockgård) wrote in message news:<yoij8yuaese0.fsf@helm.dd.chalmers.se>...
> j_del_strother@hotmail.com (Jon) writes:
>
> > (defun green_face ()
> > "Changes to a green typeset"
> > (interactive)
> [...]
> > )
> >
> > Which will then allow you to do M-x custom-set-faces.
>
> Rather M-x green_face ...
Uhh...Indeed. That's what I get for posting before I have any coffee :)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-16 14:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-15 9:44 Creating a function to change custom-set-faces Jon
2003-04-15 18:12 ` Johan Bockgård
2003-04-16 8:21 ` Jon
2003-04-16 8:52 ` Johan Bockgård
2003-04-16 14:19 ` Jon
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.