diff options
author | Glenn Morris <rgm@gnu.org> | 2014-03-02 17:00:27 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-03-02 17:00:27 -0800 |
commit | 7ebd57e9d6b6f26ff4c92dd4d93af163d1befc4e (patch) | |
tree | b264ebe761a50bca97db1861f9b7596ad3f1dce4 /lisp/frame.el | |
parent | 62d81bd7cb144c30c25739d40e4fd3208e6987f5 (diff) | |
download | emacs-7ebd57e9d6b6f26ff4c92dd4d93af163d1befc4e.tar.gz |
Minor doc tweaks for display-*-width, height
* lisp/frame.el (display-pixel-height, display-pixel-width)
(display-mm-dimensions-alist, display-mm-height)
(display-mm-width): Doc tweaks.
* doc/lispref/frames.texi: Remove FIXME comments. The x- versions of
these functions are internal details that do not need documenting.
* etc/NEWS: Related markup.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r-- | lisp/frame.el | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index 4f189a82289..b62c939d536 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1393,12 +1393,14 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." (defun display-pixel-height (&optional display) "Return the height of DISPLAY's screen in pixels. +If DISPLAY is omitted or nil, it defaults to the selected frame's display. + For character terminals, each character counts as a single pixel. + For graphical terminals, note that on \"multi-monitor\" setups this refers to the pixel height for all physical monitors associated with DISPLAY. To get information for each physical monitor, use -`display-monitor-attributes-list'. -If DISPLAY is omitted or nil, it defaults to the selected frame's display." +`display-monitor-attributes-list'." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1410,12 +1412,14 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." (defun display-pixel-width (&optional display) "Return the width of DISPLAY's screen in pixels. +If DISPLAY is omitted or nil, it defaults to the selected frame's display. + For character terminals, each character counts as a single pixel. + For graphical terminals, note that on \"multi-monitor\" setups this refers to the pixel width for all physical monitors associated with DISPLAY. To get information for each physical monitor, use -`display-monitor-attributes-list'. -If DISPLAY is omitted or nil, it defaults to the selected frame's display." +`display-monitor-attributes-list'." (let ((frame-type (framep-on-display display))) (cond ((memq frame-type '(x w32 ns)) @@ -1425,14 +1429,14 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." (defcustom display-mm-dimensions-alist nil "Alist for specifying screen dimensions in millimeters. -The dimensions will be used for `display-mm-height' and -`display-mm-width' if defined for the respective display. +The functions `display-mm-height' and `display-mm-width' consult +this list before asking the system. -Each element of the alist has the form (display . (width . height)), -e.g. (\":0.0\" . (287 . 215)). +Each element has the form (DISPLAY . (WIDTH . HEIGHT)), e.g. +\(\":0.0\" . (287 . 215)). -If `display' equals t, it specifies dimensions for all graphical -displays not explicitly specified." +If `display' is t, it specifies dimensions for all graphical displays +not explicitly specified." :version "22.1" :type '(alist :key-type (choice (string :tag "Display name") (const :tag "Default" t)) @@ -1445,13 +1449,16 @@ displays not explicitly specified." (defun display-mm-height (&optional display) "Return the height of DISPLAY's screen in millimeters. -System values can be overridden by `display-mm-dimensions-alist'. -If the information is unavailable, value is nil. +If the information is unavailable, this function returns nil. +If DISPLAY is omitted or nil, it defaults to the selected frame's display. + +You can override what the system thinks the result should be by +adding an entry to `display-mm-dimensions-alist'. + For graphical terminals, note that on \"multi-monitor\" setups this refers to the height in millimeters for all physical monitors associated with DISPLAY. To get information for each physical -monitor, use `display-monitor-attributes-list'. -If DISPLAY is omitted or nil, it defaults to the selected frame's display." +monitor, use `display-monitor-attributes-list'." (and (memq (framep-on-display display) '(x w32 ns)) (or (cddr (assoc (or display (frame-parameter nil 'display)) display-mm-dimensions-alist)) @@ -1462,13 +1469,16 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display." (defun display-mm-width (&optional display) "Return the width of DISPLAY's screen in millimeters. -System values can be overridden by `display-mm-dimensions-alist'. -If the information is unavailable, value is nil. +If the information is unavailable, this function returns nil. +If DISPLAY is omitted or nil, it defaults to the selected frame's display. + +You can override what the system thinks the result should be by +adding an entry to `display-mm-dimensions-alist'. + For graphical terminals, note that on \"multi-monitor\" setups this refers to the width in millimeters for all physical monitors associated with DISPLAY. To get information for each physical -monitor, use `display-monitor-attributes-list'. -If DISPLAY is omitted or nil, it defaults to the selected frame's display." +monitor, use `display-monitor-attributes-list'." (and (memq (framep-on-display display) '(x w32 ns)) (or (cadr (assoc (or display (frame-parameter nil 'display)) display-mm-dimensions-alist)) |