[geeks] Emacs .emacs question
Joshua Boyd
jdboyd at jdboyd.net
Fri Feb 8 17:08:48 CST 2008
On Fri, Feb 08, 2008 at 04:38:07PM -0600, Micah R Ledbetter wrote:
> Scotty Logan wrote:
> >On Feb 8, 2008, at 7:49 AM, Joshua Boyd wrote:
> >>I want to make something in my .emacs file conditional upon whether
> >>emacs is running in a GUI (X11, OSX, Win32) window instead of a terminal
> >>window.
> >
> >(display-graphic-p)
> >
> >returns non-nil if the current display is graphical.
>
> I use "(eq window-system nil)", wrapping it with an "unless" (in this
> case, though an "if" would work too).
>
> I actually have several conditions for various types of window systems;
> various values for window-system might be nil (as above), x, w32,
> Interix, ns (Cocoa-flavored Mac) or mac (Carbon-flavored Mac). (All of
> the preceding besides "nil" would be designated like so: "(eq
> window-system 'w32)", i.e., with the single-quote.) I also use "(eq
> system-type 'something)" for one or two things.
>
> For the pathologically interested, you can see my .emacs here:
> <http://mrled.org/svn/dhd/hbase/.emacs>
I'd prefer not to be considered pathological, but I'm always interested
in seeing the .emacs files of others.
I guess I should slap my own on the web someday.
More information about the geeks
mailing list