emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e247b4b 2/2: Add a new documentation group for overlays


From: Lars Ingebrigtsen
Subject: master e247b4b 2/2: Add a new documentation group for overlays
Date: Sun, 30 May 2021 00:42:25 -0400 (EDT)

branch: master
commit e247b4b69129d50e5c03814f42547059f16d4bbb
Author: Daniel Martín <mardani29@yahoo.es>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Add a new documentation group for overlays
    
    * lisp/emacs-lisp/shortdoc.el (overlay): Add documentation group for
    buffer overlays(bug#48730).
---
 lisp/emacs-lisp/shortdoc.el | 46 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index c9484dc..16e8307 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -889,6 +889,52 @@ There can be any number of :example/:result elements."
   (unlock-buffer
    :no-value (lock-buffer)))
 
+(define-short-documentation-group overlay
+  "Predicates"
+  (overlayp
+   :no-eval (overlayp some-overlay)
+   :eg-result t)
+  "Creation and Deletion"
+  (make-overlay
+   :args (beg end &optional buffer)
+   :no-eval (make-overlay 1 10)
+   :eg-result-string "#<overlay from 1 to 10 in *foo*>")
+  (delete-overlay
+   :no-eval (delete-overlay foo)
+   :eg-result t)
+  "Searching Overlays"
+  (overlays-at
+   :no-eval (overlays-at 15)
+   :eg-result-string "(#<overlay from 1 to 10 in *foo*>)")
+  (overlays-in
+   :no-eval (overlays-in 1 30)
+   :eg-result-string "(#<overlay from 1 to 10 in *foo*>)")
+  (next-overlay-change
+   :no-eval (next-overlay-change 1)
+   :eg-result 20)
+  (previous-overlay-change
+   :no-eval (previous-overlay-change 30)
+   :eg-result 20)
+  "Overlay Properties"
+  (overlay-start
+   :no-eval (overlay-start foo)
+   :eg-result 1)
+  (overlay-end
+   :no-eval (overlay-end foo)
+   :eg-result 10)
+  (overlay-put
+   :no-eval (overlay-put foo 'happy t)
+   :eg-result t)
+  (overlay-get
+   :no-eval (overlay-get foo 'happy)
+   :eg-result t)
+  (overlay-buffer
+   :no-eval (overlay-buffer foo))
+  "Moving Overlays"
+  (move-overlay
+   :no-eval (move-overlay foo 5 20)
+   :eg-result-string "#<overlay from 5 to 20 in *foo*>"))
+
 (define-short-documentation-group process
   (make-process
    :no-eval (make-process :name "foo" :command '("cat" "/tmp/foo"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]