diff options
| author | Eli Zaretskii | 2016-09-23 11:27:18 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-09-23 11:27:18 +0300 |
| commit | 2c72c46af18b586137c3cebde56f451c1b0b7a9b (patch) | |
| tree | 4904056f078af099b3f3777395a639aa3b504e56 | |
| parent | f6fa160e91e264f0a3f797b56e8605dbdb32cb76 (diff) | |
| download | emacs-2c72c46af18b586137c3cebde56f451c1b0b7a9b.tar.gz emacs-2c72c46af18b586137c3cebde56f451c1b0b7a9b.zip | |
Improve documentation of overlay priorities
* doc/lispref/display.texi (Overlay Properties): Minor copyedits.
By popular demand, mention the '(PRIMNARY . SECONDARY)' form of
overlay properties used for the region. (Bug#20253)
| -rw-r--r-- | doc/lispref/display.texi | 23 | ||||
| -rw-r--r-- | lisp/dired.el | 8 |
2 files changed, 19 insertions, 12 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 0d0ec671f7c..d3e424853ad 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1553,10 +1553,8 @@ the buffer's undo list. | |||
| 1553 | 1553 | ||
| 1554 | Since more than one overlay can specify a property value for the | 1554 | Since more than one overlay can specify a property value for the |
| 1555 | same character, Emacs lets you specify a priority value of each | 1555 | same character, Emacs lets you specify a priority value of each |
| 1556 | overlay. In case two overlays have the same priority value, and one | 1556 | overlay. The priority value is used to decide which of the |
| 1557 | is nested in the other, then the inner one will have priority over the | 1557 | overlapping overlays will ``win''. |
| 1558 | outer one. If neither is nested in the other then you should not make | ||
| 1559 | assumptions about which overlay will prevail. | ||
| 1560 | 1558 | ||
| 1561 | These functions read and set the properties of an overlay: | 1559 | These functions read and set the properties of an overlay: |
| 1562 | 1560 | ||
| @@ -1593,17 +1591,26 @@ If you want to specify a priority value, use either @code{nil} | |||
| 1593 | 1591 | ||
| 1594 | The priority matters when two or more overlays cover the same | 1592 | The priority matters when two or more overlays cover the same |
| 1595 | character and both specify the same property; the one whose | 1593 | character and both specify the same property; the one whose |
| 1596 | @code{priority} value is larger overrides the other. For the | 1594 | @code{priority} value is larger overrides the other. (For the |
| 1597 | @code{face} property, the higher priority overlay's value does not | 1595 | @code{face} property, the higher priority overlay's value does not |
| 1598 | completely override the other value; instead, its face attributes | 1596 | completely override the other value; instead, its face attributes |
| 1599 | override the face attributes of the lower priority @code{face} | 1597 | override the face attributes of the lower priority @code{face} |
| 1600 | property. | 1598 | property.) If two overlays have the same priority value, and one is |
| 1599 | nested in the other, then the inner one will prevail over the outer | ||
| 1600 | one. If neither is nested in the other then you should not make | ||
| 1601 | assumptions about which overlay will prevail. | ||
| 1601 | 1602 | ||
| 1602 | Currently, all overlays take priority over text properties. | 1603 | Currently, all overlays take priority over text properties. |
| 1603 | 1604 | ||
| 1604 | Note that Emacs sometimes uses non-numeric priority values for some of | 1605 | Note that Emacs sometimes uses non-numeric priority values for some of |
| 1605 | its internal overlays, so do not try to do arithmetic on the | 1606 | its internal overlays, so do not try to do arithmetic on the priority |
| 1606 | priority of an overlay (unless it is one that you created). If you | 1607 | of an overlay (unless it is one that you created). In particular, the |
| 1608 | overlay used for showing the region uses a priority value of the form | ||
| 1609 | @w{@code{(@var{primary} . @var{secondary})}}, where the @var{primary} | ||
| 1610 | value is used as described above, and @var{secondary} is the fallback | ||
| 1611 | value used when @var{primary} and the nesting considerations fail to | ||
| 1612 | resolve the precedence between overlays. However, you are advised not | ||
| 1613 | to design Lisp programs based on this implementation detail; if you | ||
| 1607 | need to put overlays in priority order, use the @var{sorted} argument | 1614 | need to put overlays in priority order, use the @var{sorted} argument |
| 1608 | of @code{overlays-at}. @xref{Finding Overlays}. | 1615 | of @code{overlays-at}. @xref{Finding Overlays}. |
| 1609 | 1616 | ||
diff --git a/lisp/dired.el b/lisp/dired.el index 92aa65a9085..a4cb50533f2 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3919,7 +3919,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3919 | 3919 | ||
| 3920 | ;;; Start of automatically extracted autoloads. | 3920 | ;;; Start of automatically extracted autoloads. |
| 3921 | 3921 | ||
| 3922 | ;;;### (autoloads nil "dired-aux" "dired-aux.el" "c1ea036dd5d740f00b18a76bfb32f887") | 3922 | ;;;### (autoloads nil "dired-aux" "dired-aux.el" "daa0a32a5bdfcf4de80c31cf7833b26d") |
| 3923 | ;;; Generated autoloads from dired-aux.el | 3923 | ;;; Generated autoloads from dired-aux.el |
| 3924 | 3924 | ||
| 3925 | (autoload 'dired-diff "dired-aux" "\ | 3925 | (autoload 'dired-diff "dired-aux" "\ |
| @@ -4113,9 +4113,9 @@ command with a prefix argument (the value does not matter). | |||
| 4113 | 4113 | ||
| 4114 | (autoload 'dired-do-compress-to "dired-aux" "\ | 4114 | (autoload 'dired-do-compress-to "dired-aux" "\ |
| 4115 | Compress selected files and directories to an archive. | 4115 | Compress selected files and directories to an archive. |
| 4116 | You are prompted for the archive name. | 4116 | Prompt for the archive file name. |
| 4117 | The archiving command is chosen based on the archive name extension and | 4117 | Choose the archiving command based on the archive file-name extension |
| 4118 | `dired-compress-files-alist'. | 4118 | and `dired-compress-files-alist'. |
| 4119 | 4119 | ||
| 4120 | \(fn)" t nil) | 4120 | \(fn)" t nil) |
| 4121 | 4121 | ||