[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 20aea42 2/2: Rename obarray-foreach to obarray-map
From: |
Nicolas Petton |
Subject: |
[Emacs-diffs] master 20aea42 2/2: Rename obarray-foreach to obarray-map |
Date: |
Wed, 11 Nov 2015 16:56:03 +0000 |
branch: master
commit 20aea4293439281570c5c05d3f54bc5b261a4d0f
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>
Rename obarray-foreach to obarray-map
* lisp/obarray.el (obarray-map): New name.
* test/automated/obarray-tests.el: Update the corresponding tests.
---
lisp/obarray.el | 2 +-
test/automated/obarray-tests.el | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/obarray.el b/lisp/obarray.el
index fb7a333..0e57381 100644
--- a/lisp/obarray.el
+++ b/lisp/obarray.el
@@ -57,7 +57,7 @@ Creates and adds the symbol if doesn't exist."
Return t on success, nil otherwise."
(unintern name obarray))
-(defun obarray-foreach (fn obarray)
+(defun obarray-map (fn obarray)
"Call function FN on every symbol in OBARRAY and return nil."
(mapatoms fn obarray))
diff --git a/test/automated/obarray-tests.el b/test/automated/obarray-tests.el
index 16ed694..97df3b3 100644
--- a/test/automated/obarray-tests.el
+++ b/test/automated/obarray-tests.el
@@ -73,17 +73,17 @@
(should (obarray-remove table "aoeu"))
(should-not (obarray-get table "aoeu"))))
-(ert-deftest obarray-foreach-test ()
+(ert-deftest obarray-map-test ()
"Should execute function on all elements of obarray."
(let* ((table (obarray-make 3))
(syms '())
(collect-names (lambda (sym) (push (symbol-name sym) syms))))
- (obarray-foreach collect-names table)
+ (obarray-map collect-names table)
(should (null syms))
(obarray-put table "a")
(obarray-put table "b")
(obarray-put table "c")
- (obarray-foreach collect-names table)
+ (obarray-map collect-names table)
(should (equal (sort syms #'string<) '("a" "b" "c")))))
(provide 'obarray-tests)