summaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorKarthik Chikmagalur <karthikchikmagalur@gmail.com>2025-07-31 11:45:26 -0700
committerKarthik Chikmagalur <karthikchikmagalur@gmail.com>2025-07-31 11:45:26 -0700
commitf5bbedf20ad18289e629babf36382f44958366c2 (patch)
tree35e2cdca33132d28f56b9dcd1cb2082f7ba60ec3 /README.org
parent441734b52029707032bb0fac184ab687b687bcc8 (diff)
README: Update with new function descriptions
* README.org (To use this library:) * timeout.el: Fix usage in commentary
Diffstat (limited to 'README.org')
-rw-r--r--README.org13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.org b/README.org
index 3b664ae..b5b3dc0 100644
--- a/README.org
+++ b/README.org
@@ -32,3 +32,16 @@ By default a debounced function returns =nil= at call time. To change this, run
#+begin_src emacs-lisp
(timeout-debounce! 'func 0.5 'some-return-value)
#+end_src
+
+Instead of advising =func=, you can also create new throttled or debounced versions of it with =timeout-throttle= and =timeout-debounce=:
+
+#+begin_src emacs-lisp
+(timeout-throttle 'func 2.0)
+(timeout-debounce 'func 0.5)
+#+end_src
+
+These return anonymous functions which you can bind to a symbol with =defalias= or =fset=:
+#+begin_src emacs-lisp
+(defalias 'throttled-func (timeout-throttle 'func 2.0))
+(fset 'throttled-func (timeout-throttle 'func 2.0))
+#+end_src