Determining running environment/platform.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 15 Aug 2010 19:21:53 +0300
changeset 499 ab94e51efbc6
parent 498 71ee42742a81
child 500 0126175e6252
Determining running environment/platform.
emacs.rst
--- a/emacs.rst	Thu Aug 12 21:08:07 2010 +0300
+++ b/emacs.rst	Sun Aug 15 19:21:53 2010 +0300
@@ -99,9 +99,9 @@
 With transient-mark-mode and delete-selection-mode enabled: select region,
 type M-| sort -u RET to replace selection with sorted and uniquified lines.
 
-** Determining running environment.
+** Determining running environment/platform.
 
-Check such variable:
+Check variables:
 
   emacs-major-version
   emacs-minor-version
@@ -115,7 +115,23 @@
   system-uses-terminfo
   window-size-fixed
 
-Run such checks:
+or check functions:
+
+  (fboundp ...)             - return t if SYMBOL's function definition is not void
+  (featurep ...)            - returns t if FEATURE is present in this Emacs
+  (display-graphic-p)       - return non-nil if DISPLAY is a graphic display; graphical
+                              displays are those which are capable of displaying several
+                              frames and several different fonts at once
+  (display-multi-font-p)    - same as 'display-graphic-p'
+  (display-multi-frame-p)   - same as 'display-graphic-p'
+  (display-color-p)         - return t if DISPLAY supports color
+  (display-images-p)        - return non-nil if DISPLAY can display images
+  (display-grayscale-p)     - return non-nil if frames on DISPLAY can display shades of gray
+  (display-mouse-p)         - return non-nil if DISPLAY has a mouse available
+  (display-popup-menus-p)   - return non-nil if popup menus are supported on DISPLAY
+  (display-selections-p)    - return non-nil if DISPLAY supports selections
+
+Run those checks as below:
 
   (when window-system ...)
   (when (eq window-system 'x) ...)