diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2021-05-28 11:43:24 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2021-05-29 09:18:00 +0200 |
commit | 93162efd7901ada02995103797237beb2d49a04e (patch) | |
tree | 601fcc881efa6a61abf1ffbb7281c84f8e7f2535 /lisp/emacs-lisp | |
parent | 0eb0fe987b62540f892954d0eb09bb9e44cc6b08 (diff) | |
download | emacs-93162efd7901ada02995103797237beb2d49a04e.tar.gz emacs-93162efd7901ada02995103797237beb2d49a04e.tar.bz2 emacs-93162efd7901ada02995103797237beb2d49a04e.zip |
Fix shortdoc examples
Make sure that each example in shortdoc actually contains the function
it illustrates, and add a test for it.
* lisp/emacs-lisp/shortdoc.el (string, list, buffer, number):
Use the right functions in examples for string-version-lessp,
lax-plist-put, point-min and ffloor.
* test/lisp/emacs-lisp/shortdoc-tests.el: New test file.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 652806ea280..38d8ad6cc12 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -221,7 +221,7 @@ There can be any number of :example/:result elements." (string-greaterp :eval (string-greaterp "foo" "bar")) (string-version-lessp - :eval (string-lessp "foo32.png" "bar4.png")) + :eval (string-version-lessp "pic4.png" "pic32.png")) (string-prefix-p :eval (string-prefix-p "foo" "foobar")) (string-suffix-p @@ -613,7 +613,7 @@ There can be any number of :example/:result elements." (lax-plist-get :eval (lax-plist-get '("a" 1 "b" 2 "c" 3) "b")) (lax-plist-put - :no-eval (setq plist (plist-put plist "d" 4)) + :no-eval (setq plist (lax-plist-put plist "d" 4)) :eq-result '("a" 1 "b" 2 "c" 3 "d" 4)) (plist-member :eval (plist-member '(a 1 b 2 c 3) 'b)) @@ -838,7 +838,7 @@ There can be any number of :example/:result elements." (point :eval (point)) (point-min - :eval (point-max)) + :eval (point-min)) (point-max :eval (point-max)) (line-beginning-position @@ -1056,7 +1056,7 @@ There can be any number of :example/:result elements." (logb :eval (logb 10.5)) (ffloor - :eval (floor 1.2)) + :eval (ffloor 1.2)) (fceiling :eval (fceiling 1.2)) (ftruncate |