diff options
| author | Glenn Morris | 2014-03-02 17:00:27 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-03-02 17:00:27 -0800 |
| commit | 7ebd57e9d6b6f26ff4c92dd4d93af163d1befc4e (patch) | |
| tree | b264ebe761a50bca97db1861f9b7596ad3f1dce4 | |
| parent | 62d81bd7cb144c30c25739d40e4fd3208e6987f5 (diff) | |
| download | emacs-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.texi | 2 | ||||
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/frame.el | 46 |
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. | |||
| 2421 | This function returns the number of screens associated with the display. | 2421 | This 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 |
| 2426 | This function returns the height of the screen in pixels. | 2425 | This function returns the height of the screen in pixels. |
| 2427 | On a character terminal, it gives the height in characters. | 2426 | On 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 |
| 2445 | This function returns the height of the screen in millimeters, | 2443 | This function returns the height of the screen in millimeters, |
| 2446 | or @code{nil} if Emacs cannot get that information. | 2444 | or @code{nil} if Emacs cannot get that information. |
| @@ -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 |
| 143 | each physical monitor on multi-monitor setups. | 143 | each 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 |
| 146 | behave consistently among the platforms: they return the pixel width | 147 | behave consistently among the platforms: they return the pixel width |
| 147 | or height for all physical monitors associated with the given display | 148 | or height for all physical monitors associated with the given display |
| 148 | as if they were on X11. To get information for each physical | 149 | as if they were on X. To get information for each physical |
| 149 | monitor, use the new functions above. Similar notes also apply to | 150 | monitor, 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 @@ | |||
| 1 | 2014-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 | |||
| 1 | 2014-03-02 Barry O'Reilly <gundaetiapo@gmail.com> | 7 | 2014-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. |
| 1396 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. | ||
| 1397 | |||
| 1396 | For character terminals, each character counts as a single pixel. | 1398 | For character terminals, each character counts as a single pixel. |
| 1399 | |||
| 1397 | For graphical terminals, note that on \"multi-monitor\" setups this | 1400 | For graphical terminals, note that on \"multi-monitor\" setups this |
| 1398 | refers to the pixel height for all physical monitors associated | 1401 | refers to the pixel height for all physical monitors associated |
| 1399 | with DISPLAY. To get information for each physical monitor, use | 1402 | with DISPLAY. To get information for each physical monitor, use |
| 1400 | `display-monitor-attributes-list'. | 1403 | `display-monitor-attributes-list'." |
| 1401 | If 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. |
| 1415 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. | ||
| 1416 | |||
| 1413 | For character terminals, each character counts as a single pixel. | 1417 | For character terminals, each character counts as a single pixel. |
| 1418 | |||
| 1414 | For graphical terminals, note that on \"multi-monitor\" setups this | 1419 | For graphical terminals, note that on \"multi-monitor\" setups this |
| 1415 | refers to the pixel width for all physical monitors associated | 1420 | refers to the pixel width for all physical monitors associated |
| 1416 | with DISPLAY. To get information for each physical monitor, use | 1421 | with DISPLAY. To get information for each physical monitor, use |
| 1417 | `display-monitor-attributes-list'. | 1422 | `display-monitor-attributes-list'." |
| 1418 | If 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. |
| 1428 | The dimensions will be used for `display-mm-height' and | 1432 | The functions `display-mm-height' and `display-mm-width' consult |
| 1429 | `display-mm-width' if defined for the respective display. | 1433 | this list before asking the system. |
| 1430 | 1434 | ||
| 1431 | Each element of the alist has the form (display . (width . height)), | 1435 | Each element has the form (DISPLAY . (WIDTH . HEIGHT)), e.g. |
| 1432 | e.g. (\":0.0\" . (287 . 215)). | 1436 | \(\":0.0\" . (287 . 215)). |
| 1433 | 1437 | ||
| 1434 | If `display' equals t, it specifies dimensions for all graphical | 1438 | If `display' is t, it specifies dimensions for all graphical displays |
| 1435 | displays not explicitly specified." | 1439 | not 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. |
| 1448 | System values can be overridden by `display-mm-dimensions-alist'. | 1452 | If the information is unavailable, this function returns nil. |
| 1449 | If the information is unavailable, value is nil. | 1453 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. |
| 1454 | |||
| 1455 | You can override what the system thinks the result should be by | ||
| 1456 | adding an entry to `display-mm-dimensions-alist'. | ||
| 1457 | |||
| 1450 | For graphical terminals, note that on \"multi-monitor\" setups this | 1458 | For graphical terminals, note that on \"multi-monitor\" setups this |
| 1451 | refers to the height in millimeters for all physical monitors | 1459 | refers to the height in millimeters for all physical monitors |
| 1452 | associated with DISPLAY. To get information for each physical | 1460 | associated with DISPLAY. To get information for each physical |
| 1453 | monitor, use `display-monitor-attributes-list'. | 1461 | monitor, use `display-monitor-attributes-list'." |
| 1454 | If 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. |
| 1465 | System values can be overridden by `display-mm-dimensions-alist'. | 1472 | If the information is unavailable, this function returns nil. |
| 1466 | If the information is unavailable, value is nil. | 1473 | If DISPLAY is omitted or nil, it defaults to the selected frame's display. |
| 1474 | |||
| 1475 | You can override what the system thinks the result should be by | ||
| 1476 | adding an entry to `display-mm-dimensions-alist'. | ||
| 1477 | |||
| 1467 | For graphical terminals, note that on \"multi-monitor\" setups this | 1478 | For graphical terminals, note that on \"multi-monitor\" setups this |
| 1468 | refers to the width in millimeters for all physical monitors | 1479 | refers to the width in millimeters for all physical monitors |
| 1469 | associated with DISPLAY. To get information for each physical | 1480 | associated with DISPLAY. To get information for each physical |
| 1470 | monitor, use `display-monitor-attributes-list'. | 1481 | monitor, use `display-monitor-attributes-list'." |
| 1471 | If 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)) |