# HG changeset patch # User Oleksandr Gavenko # Date 1281889313 -10800 # Node ID ab94e51efbc64a801db11574fad330404cd19fa3 # Parent 71ee42742a81ac2bfd4f06466f24d7b9ed2e8050 Determining running environment/platform. diff -r 71ee42742a81 -r ab94e51efbc6 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) ...)