diff options
| author | Eli Zaretskii | 2024-06-28 14:52:05 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-06-28 14:52:05 +0300 |
| commit | df0eb5be1eac7763236a99ffeb6e2b3561955bd9 (patch) | |
| tree | 7330e91577cc22651834c8118ad957408e07313f | |
| parent | 73c1252bb6b7cc61d9f992818568d3c57de4ff67 (diff) | |
| download | emacs-df0eb5be1eac7763236a99ffeb6e2b3561955bd9.tar.gz emacs-df0eb5be1eac7763236a99ffeb6e2b3561955bd9.zip | |
Improve documentation of 'remove-overlays' in ELisp manual
* doc/lispref/display.texi (Managing Overlays): Update
documentation of 'remove-overlays'. (Bug#57534) (Bug#13648)
| -rw-r--r-- | doc/lispref/display.texi | 50 |
1 files changed, 41 insertions, 9 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 34096196df4..55885b7438d 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1659,15 +1659,47 @@ overlay. | |||
| 1659 | @end defun | 1659 | @end defun |
| 1660 | 1660 | ||
| 1661 | @defun remove-overlays &optional start end name value | 1661 | @defun remove-overlays &optional start end name value |
| 1662 | This function removes all the overlays between @var{start} and | 1662 | This function clears the text in the region between @var{start} and |
| 1663 | @var{end} whose property @var{name} has the specified @var{value}. It | 1663 | @var{end} of any overlays whose property named @var{name} has the |
| 1664 | can move the endpoints of the overlays in the region, or split them. | 1664 | specified @var{value}, such that no such overlay will affect the text in |
| 1665 | 1665 | the region. To do this, the function can remove overlays in the region, | |
| 1666 | If @var{name} is omitted or @code{nil}, it means to delete all overlays in | 1666 | or move their endpoints, or split them, or do some combination of these. |
| 1667 | the specified region. If @var{start} and/or @var{end} are omitted or | 1667 | Specifically: |
| 1668 | @code{nil}, that means the beginning and end of the buffer respectively. | 1668 | |
| 1669 | Therefore, @code{(remove-overlays)} removes all the overlays in the | 1669 | @itemize @bullet |
| 1670 | current buffer. | 1670 | @item |
| 1671 | Overlays that start at or after @var{start} and end before @var{end} | ||
| 1672 | will be removed completely. | ||
| 1673 | |||
| 1674 | @item | ||
| 1675 | Overlays that start before @var{start} and end after @var{start}, but | ||
| 1676 | before @var{end}, will be altered so that they end at @var{start}. | ||
| 1677 | |||
| 1678 | @item | ||
| 1679 | Overlays that start at or after @var{start} and end after @var{end} will | ||
| 1680 | be altered so that they start at @var{end}. | ||
| 1681 | |||
| 1682 | @item | ||
| 1683 | Overlays that start before @var{start} and end after @var{end} will be | ||
| 1684 | split into two overlays: one that ends at @var{start} and the other that | ||
| 1685 | begins at @var{end}. | ||
| 1686 | @end itemize | ||
| 1687 | |||
| 1688 | If @var{name} is omitted or @code{nil}, it means to delete/modify all | ||
| 1689 | overlays that affect text in the specified region. If @var{start} | ||
| 1690 | and/or @var{end} are omitted or @code{nil}, they default to the | ||
| 1691 | beginning and end of the buffer, respectively. Therefore, | ||
| 1692 | @code{(remove-overlays)} removes all the overlays in the current buffer. | ||
| 1693 | |||
| 1694 | Values of the named overlay property are compared using @code{eq}, which | ||
| 1695 | is important if the values are anything but symbols or fixnums | ||
| 1696 | (@pxref{Equality Predicates}). It means the values passed to the | ||
| 1697 | function must be the same values used to set the overlay property, not | ||
| 1698 | their copies; objects which are different will not compare equal even if | ||
| 1699 | they have identical contents. | ||
| 1700 | |||
| 1701 | The optional arguments @var{name} and @var{value} should either both be | ||
| 1702 | passed and non-@code{nil}, or both omitted or @code{nil}. | ||
| 1671 | @end defun | 1703 | @end defun |
| 1672 | 1704 | ||
| 1673 | @defun copy-overlay overlay | 1705 | @defun copy-overlay overlay |