emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0bb9aed: * lisp/emacs-lisp/eieio.el (eieio pcase macro): Remove u


From: Stefan Monnier
Subject: master 0bb9aed: * lisp/emacs-lisp/eieio.el (eieio pcase macro): Remove unused var `is`
Date: Sun, 10 May 2020 13:51:57 -0400 (EDT)

branch: master
commit 0bb9aeddd6ac713c751b3b6586d62d2dcc8465c0
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/emacs-lisp/eieio.el (eieio pcase macro): Remove unused var `is`
---
 lisp/emacs-lisp/eieio.el | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 999d75f..6482c4d 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -351,21 +351,20 @@ Elements of FIELDS can be of the form (NAME PAT) in which 
case the
 contents of field NAME is matched against PAT, or they can be of
  the form NAME which is a shorthand for (NAME NAME)."
   (declare (debug (&rest [&or (sexp pcase-PAT) sexp])))
-  (let ((is (make-symbol "table")))
-    ;; FIXME: This generates a horrendous mess of redundant let bindings.
-    ;; `pcase' needs to be improved somehow to introduce let-bindings more
-    ;; sparingly, or the byte-compiler needs to be taught to optimize
-    ;; them away.
-    ;; FIXME: `pcase' does not do a good job here of sharing tests&code among
-    ;; various branches.
-    `(and (pred eieio-object-p)
+  ;; FIXME: This generates a horrendous mess of redundant let bindings.
+  ;; `pcase' needs to be improved somehow to introduce let-bindings more
+  ;; sparingly, or the byte-compiler needs to be taught to optimize
+  ;; them away.
+  ;; FIXME: `pcase' does not do a good job here of sharing tests&code among
+  ;; various branches.
+  `(and (pred eieio-object-p)
         ,@(mapcar (lambda (field)
                     (pcase-exhaustive field
                       (`(,name ,pat)
-                        `(app (pcase--flip eieio-oref ',name) ,pat))
+                       `(app (pcase--flip eieio-oref ',name) ,pat))
                       ((pred symbolp)
                        `(app (pcase--flip eieio-oref ',field) ,field))))
-                  fields))))
+                  field-s)))
 
 ;;; Simple generators, and query functions.  None of these would do
 ;;  well embedded into an object.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]