emacs-devel
[Top][All Lists]
Advanced

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

how to test whether Emacs uses Gtk+?


From: Drew Adams
Subject: how to test whether Emacs uses Gtk+?
Date: Thu, 17 Jan 2013 10:48:46 -0800

The doc of `frame-pixel-height' says this:

  In the Gtk+ version of Emacs, it includes only any window (including
  the minibuffer or echo area), mode line, and header line.  It does not
  include the tool bar or menu bar.

To use function `frame-pixel-height' I need to be able to test whether the
current Emacs session is "the Gtk+ version of Emacs".  What Lisp code would tell
me that?

There is no index entry in the Elisp manual matching "Gtk".  Searching for it
shows me that command `emacs-version' might include "Gtk+" in the message it
prints.  Looking at the code for `emacs-version' I find the answer: (featurep
'gtk).

Suggestion: Put that information in the doc string:

  "If (featurep 'gtk) is non-nil then the value includes only..."

That information is much more operational than is simply saying "In the Gtk+
version of Emacs..."

BTW, is "only any window" a typo in that sentence about Gtk+?  If not then I
don't know what is meant.  I would expect something like "only windows", but I
might well be misunderstanding what it is trying to say.




reply via email to

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