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

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

Re: Functions that need X


From: Tim X
Subject: Re: Functions that need X
Date: Sun, 02 Jan 2011 08:58:25 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Cecil Westerhof <Cecil@decebal.nl> writes:

> I have a lot of functionality written for my Emacs. I was asked to
> maintain a server for a friend. I installed Emacs there and put my
> Emacs functionality there also. But some things are depending on X.
> Because of this I made those depended working with X. In the start of
> my .emacs I have:
>     (defconst +using-X+ (getenv "DISPLAY"))
>

Alternatively, just use the built-in variable window-system i.e.

(unless (eq 'x window-system)
        ....)

or even better, use one of the display capability predicates, such as

(unless (display-graphic-p)
        ...)

> And where I use X-functionality (not much at the moment) I have:
>     (unless (not +using-X+)
>       (set-scroll-bar-mode 'right)
>       (tool-bar-mode -1))

Do you actually need the above? Long time since I've used emacs in a
non-graphics mode, but when I did, you didn't get things like tool-bar
unless the display could support it.

One of the reasons I no longer use emacs in console mode is because I do
almost everything on remote systems via tramp these days and very rarely
need to run a remote emacs.

Tim



-- 
tcross (at) rapttech dot com dot au


reply via email to

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