aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-03-02 17:00:27 -0800
committerGlenn Morris2014-03-02 17:00:27 -0800
commit7ebd57e9d6b6f26ff4c92dd4d93af163d1befc4e (patch)
treeb264ebe761a50bca97db1861f9b7596ad3f1dce4
parent62d81bd7cb144c30c25739d40e4fd3208e6987f5 (diff)
downloademacs-7ebd57e9d6b6f26ff4c92dd4d93af163d1befc4e.tar.gz
emacs-7ebd57e9d6b6f26ff4c92dd4d93af163d1befc4e.zip
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.
-rw-r--r--doc/lispref/frames.texi2
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/frame.el46
4 files changed, 36 insertions, 21 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 403d9f6884e..439f9686733 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2421,7 +2421,6 @@ images, Emacs cannot display a tool bar.
2421This function returns the number of screens associated with the display. 2421This function returns the number of screens associated with the display.
2422@end defun 2422@end defun
2423 2423
2424@c FIXME: Document `x-display-pixel-{width, height}'?
2425@defun display-pixel-height &optional display 2424@defun display-pixel-height &optional display
2426This function returns the height of the screen in pixels. 2425This function returns the height of the screen in pixels.
2427On a character terminal, it gives the height in characters. 2426On a character terminal, it gives the height in characters.
@@ -2440,7 +2439,6 @@ refers to the pixel width for all physical monitors associated with
2440@var{display}. @xref{Multiple Terminals}. 2439@var{display}. @xref{Multiple Terminals}.
2441@end defun 2440@end defun
2442 2441
2443@c FIXME: Document `x-display-mm-{width, height}'?
2444@defun display-mm-height &optional display 2442@defun display-mm-height &optional display
2445This function returns the height of the screen in millimeters, 2443This function returns the height of the screen in millimeters,
2446or @code{nil} if Emacs cannot get that information. 2444or @code{nil} if Emacs cannot get that information.
diff --git a/etc/NEWS b/etc/NEWS
index ce98be2dda2..a5919069000 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -142,10 +142,11 @@ entries of a file.
142`frame-monitor-attributes' can be used to obtain information about 142`frame-monitor-attributes' can be used to obtain information about
143each physical monitor on multi-monitor setups. 143each physical monitor on multi-monitor setups.
144 144
145+++
145*** The functions `display-pixel-width' and `display-pixel-height' now 146*** The functions `display-pixel-width' and `display-pixel-height' now
146behave consistently among the platforms: they return the pixel width 147behave consistently among the platforms: they return the pixel width
147or height for all physical monitors associated with the given display 148or height for all physical monitors associated with the given display
148as if they were on X11. To get information for each physical 149as if they were on X. To get information for each physical
149monitor, use the new functions above. Similar notes also apply to 150monitor, use the new functions above. Similar notes also apply to
150`x-display-pixel-width', `x-display-pixel-height', `display-mm-width', 151`x-display-pixel-width', `x-display-pixel-height', `display-mm-width',
151`display-mm-height', `x-display-mm-width', and `x-display-mm-height'. 152`display-mm-height', `x-display-mm-width', and `x-display-mm-height'.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a2a88f4b86b..9c3a7ac9945 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12014-03-03 Glenn Morris <rgm@gnu.org>
2
3 * frame.el (display-pixel-height, display-pixel-width)
4 (display-mm-dimensions-alist, display-mm-height)
5 (display-mm-width): Doc tweaks.
6
12014-03-02 Barry O'Reilly <gundaetiapo@gmail.com> 72014-03-02 Barry O'Reilly <gundaetiapo@gmail.com>
2 8
3 * simple.el (undo-elt-in-region): Fix buffer corruption for edge 9 * simple.el (undo-elt-in-region): Fix buffer corruption for edge
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."
1393 1393
1394(defun display-pixel-height (&optional display) 1394(defun display-pixel-height (&optional display)
1395 "Return the height of DISPLAY's screen in pixels. 1395 "Return the height of DISPLAY's screen in pixels.
1396If DISPLAY is omitted or nil, it defaults to the selected frame's display.
1397
1396For character terminals, each character counts as a single pixel. 1398For character terminals, each character counts as a single pixel.
1399
1397For graphical terminals, note that on \"multi-monitor\" setups this 1400For graphical terminals, note that on \"multi-monitor\" setups this
1398refers to the pixel height for all physical monitors associated 1401refers to the pixel height for all physical monitors associated
1399with DISPLAY. To get information for each physical monitor, use 1402with DISPLAY. To get information for each physical monitor, use
1400`display-monitor-attributes-list'. 1403`display-monitor-attributes-list'."
1401If DISPLAY is omitted or nil, it defaults to the selected frame's display."
1402 (let ((frame-type (framep-on-display display))) 1404 (let ((frame-type (framep-on-display display)))
1403 (cond 1405 (cond
1404 ((memq frame-type '(x w32 ns)) 1406 ((memq frame-type '(x w32 ns))
@@ -1410,12 +1412,14 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display."
1410 1412
1411(defun display-pixel-width (&optional display) 1413(defun display-pixel-width (&optional display)
1412 "Return the width of DISPLAY's screen in pixels. 1414 "Return the width of DISPLAY's screen in pixels.
1415If DISPLAY is omitted or nil, it defaults to the selected frame's display.
1416
1413For character terminals, each character counts as a single pixel. 1417For character terminals, each character counts as a single pixel.
1418
1414For graphical terminals, note that on \"multi-monitor\" setups this 1419For graphical terminals, note that on \"multi-monitor\" setups this
1415refers to the pixel width for all physical monitors associated 1420refers to the pixel width for all physical monitors associated
1416with DISPLAY. To get information for each physical monitor, use 1421with DISPLAY. To get information for each physical monitor, use
1417`display-monitor-attributes-list'. 1422`display-monitor-attributes-list'."
1418If DISPLAY is omitted or nil, it defaults to the selected frame's display."
1419 (let ((frame-type (framep-on-display display))) 1423 (let ((frame-type (framep-on-display display)))
1420 (cond 1424 (cond
1421 ((memq frame-type '(x w32 ns)) 1425 ((memq frame-type '(x w32 ns))
@@ -1425,14 +1429,14 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display."
1425 1429
1426(defcustom display-mm-dimensions-alist nil 1430(defcustom display-mm-dimensions-alist nil
1427 "Alist for specifying screen dimensions in millimeters. 1431 "Alist for specifying screen dimensions in millimeters.
1428The dimensions will be used for `display-mm-height' and 1432The functions `display-mm-height' and `display-mm-width' consult
1429`display-mm-width' if defined for the respective display. 1433this list before asking the system.
1430 1434
1431Each element of the alist has the form (display . (width . height)), 1435Each element has the form (DISPLAY . (WIDTH . HEIGHT)), e.g.
1432e.g. (\":0.0\" . (287 . 215)). 1436\(\":0.0\" . (287 . 215)).
1433 1437
1434If `display' equals t, it specifies dimensions for all graphical 1438If `display' is t, it specifies dimensions for all graphical displays
1435displays not explicitly specified." 1439not explicitly specified."
1436 :version "22.1" 1440 :version "22.1"
1437 :type '(alist :key-type (choice (string :tag "Display name") 1441 :type '(alist :key-type (choice (string :tag "Display name")
1438 (const :tag "Default" t)) 1442 (const :tag "Default" t))
@@ -1445,13 +1449,16 @@ displays not explicitly specified."
1445 1449
1446(defun display-mm-height (&optional display) 1450(defun display-mm-height (&optional display)
1447 "Return the height of DISPLAY's screen in millimeters. 1451 "Return the height of DISPLAY's screen in millimeters.
1448System values can be overridden by `display-mm-dimensions-alist'. 1452If the information is unavailable, this function returns nil.
1449If the information is unavailable, value is nil. 1453If DISPLAY is omitted or nil, it defaults to the selected frame's display.
1454
1455You can override what the system thinks the result should be by
1456adding an entry to `display-mm-dimensions-alist'.
1457
1450For graphical terminals, note that on \"multi-monitor\" setups this 1458For graphical terminals, note that on \"multi-monitor\" setups this
1451refers to the height in millimeters for all physical monitors 1459refers to the height in millimeters for all physical monitors
1452associated with DISPLAY. To get information for each physical 1460associated with DISPLAY. To get information for each physical
1453monitor, use `display-monitor-attributes-list'. 1461monitor, use `display-monitor-attributes-list'."
1454If DISPLAY is omitted or nil, it defaults to the selected frame's display."
1455 (and (memq (framep-on-display display) '(x w32 ns)) 1462 (and (memq (framep-on-display display) '(x w32 ns))
1456 (or (cddr (assoc (or display (frame-parameter nil 'display)) 1463 (or (cddr (assoc (or display (frame-parameter nil 'display))
1457 display-mm-dimensions-alist)) 1464 display-mm-dimensions-alist))
@@ -1462,13 +1469,16 @@ If DISPLAY is omitted or nil, it defaults to the selected frame's display."
1462 1469
1463(defun display-mm-width (&optional display) 1470(defun display-mm-width (&optional display)
1464 "Return the width of DISPLAY's screen in millimeters. 1471 "Return the width of DISPLAY's screen in millimeters.
1465System values can be overridden by `display-mm-dimensions-alist'. 1472If the information is unavailable, this function returns nil.
1466If the information is unavailable, value is nil. 1473If DISPLAY is omitted or nil, it defaults to the selected frame's display.
1474
1475You can override what the system thinks the result should be by
1476adding an entry to `display-mm-dimensions-alist'.
1477
1467For graphical terminals, note that on \"multi-monitor\" setups this 1478For graphical terminals, note that on \"multi-monitor\" setups this
1468refers to the width in millimeters for all physical monitors 1479refers to the width in millimeters for all physical monitors
1469associated with DISPLAY. To get information for each physical 1480associated with DISPLAY. To get information for each physical
1470monitor, use `display-monitor-attributes-list'. 1481monitor, use `display-monitor-attributes-list'."
1471If DISPLAY is omitted or nil, it defaults to the selected frame's display."
1472 (and (memq (framep-on-display display) '(x w32 ns)) 1482 (and (memq (framep-on-display display) '(x w32 ns))
1473 (or (cadr (assoc (or display (frame-parameter nil 'display)) 1483 (or (cadr (assoc (or display (frame-parameter nil 'display))
1474 display-mm-dimensions-alist)) 1484 display-mm-dimensions-alist))