Add a new documentation group for overlays
authorDaniel Martín <mardani29@yahoo.es>
Sun, 30 May 2021 04:41:52 +0000 (06:41 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 30 May 2021 04:41:52 +0000 (06:41 +0200)
* lisp/emacs-lisp/shortdoc.el (overlay): Add documentation group for
buffer overlays(bug#48730).

lisp/emacs-lisp/shortdoc.el

index c9484dcb6863c7837fb806bd47da3b108f0f30a5..16e8307476413708b41d03ad25daa8d2bd557305 100644 (file)
@@ -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"))