From 3119e5925210b28cd25bad50dc9a1482a1265435 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 17 Dec 2021 12:45:01 -0500 Subject: [PATCH] lisp/emacs-lisp/oclosure.el: Rename `oclosure-make` to `oclosure-lambda` * lisp/emacs-lisp/oclosure.el (oclosure-lambda): Rename from `oclosure-make`. * lisp/emacs-lisp/cl-generic.el (cl-generic-call-method): * test/lisp/emacs-lisp/oclosure-tests.el (oclosure-tests): * lisp/kmacro.el (kmacro-lambda-form): Adjust accordingly. --- lisp/emacs-lisp/cl-generic.el | 2 +- lisp/emacs-lisp/oclosure.el | 2 +- lisp/kmacro.el | 4 ++-- test/lisp/emacs-lisp/oclosure-tests.el | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 1407b3fffae..ba154707516 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -742,7 +742,7 @@ FUN is the function that should be called when METHOD calls (if fun (lambda (&rest cnm-args) (apply fun (or cnm-args args))) - (oclosure-make cl--generic-nnm () (&rest cnm-args) + (oclosure-lambda cl--generic-nnm () (&rest cnm-args) (apply #'cl-no-next-method generic method (or cnm-args args)))) args))))) diff --git a/lisp/emacs-lisp/oclosure.el b/lisp/emacs-lisp/oclosure.el index 9c05f1752c8..6015e32b917 100644 --- a/lisp/emacs-lisp/oclosure.el +++ b/lisp/emacs-lisp/oclosure.el @@ -186,7 +186,7 @@ (defalias predname pred) (put name 'cl-deftype-handler (lambda () type)))) -(defmacro oclosure-make (type fields args &rest body) +(defmacro oclosure-lambda (type fields args &rest body) (declare (indent 3) (debug (sexp (&rest (sexp form)) sexp def-body))) ;; FIXME: Provide the fields in the order specified by `type'. (let* ((class (cl--find-class type)) diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 0fd693950ef..93a93a461ba 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -823,8 +823,8 @@ If kbd macro currently being defined end it before activating it." ;; or only `mac' is provided, as a list (MAC COUNTER FORMAT). ;; The first is used from `insert-kbd-macro' and `edmacro-finish-edit', ;; while the second is used from within this file. - (oclosure-make kmacro-function ((mac (if counter (list mac counter format) mac))) - (&optional arg) + (oclosure-lambda kmacro-function ((mac (if counter (list mac counter format) mac))) + (&optional arg) (interactive "p") (kmacro-exec-ring-item mac arg))) diff --git a/test/lisp/emacs-lisp/oclosure-tests.el b/test/lisp/emacs-lisp/oclosure-tests.el index b5436e5ea20..04b214b9ea5 100644 --- a/test/lisp/emacs-lisp/oclosure-tests.el +++ b/test/lisp/emacs-lisp/oclosure-tests.el @@ -41,12 +41,12 @@ (ert-deftest oclosure-tests () (let* ((i 42) - (ocl1 (oclosure-make oclosure-test ((fst 1) (snd 2) (name "hi")) - () - (list fst snd i))) - (ocl2 (oclosure-make oclosure-test ((name (cl-incf i)) (fst (cl-incf i))) - () - (list fst snd 152 i)))) + (ocl1 (oclosure-lambda oclosure-test ((fst 1) (snd 2) (name "hi")) + () + (list fst snd i))) + (ocl2 (oclosure-lambda oclosure-test ((name (cl-incf i)) (fst (cl-incf i))) + () + (list fst snd 152 i)))) (message "hello-1") (should (equal (list (oclosure-test--fst ocl1) (oclosure-test--snd ocl1) -- 2.39.5