emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/geiser e3dd43e247 1/7: Define ring-member immediately if n


From: ELPA Syncer
Subject: [nongnu] elpa/geiser e3dd43e247 1/7: Define ring-member immediately if necessary
Date: Sat, 6 Jul 2024 18:59:50 -0400 (EDT)

branch: elpa/geiser
commit e3dd43e247591e588f530ed15867766aa9cc9482
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Define ring-member immediately if necessary
    
    Right above the changed lines we require `ring'.  It is therefore not
    necessary to delay evaluation until `ring' has been loaded; we know it
    has already been loaded.
---
 elisp/geiser-base.el | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el
index 54362243b2..61008985ad 100644
--- a/elisp/geiser-base.el
+++ b/elisp/geiser-base.el
@@ -16,15 +16,14 @@
 
 (require 'ring)
 
-(eval-after-load "ring"
-  '(when (not (fboundp 'ring-member))
-     (defun ring-member (ring item)
-       (catch 'found
-         (dotimes (ind (ring-length ring))
-           (when (equal item (ring-ref ring ind))
-             (throw 'found ind)))))))
-
-(when (not (fboundp 'looking-at-p))
+(unless (fboundp 'ring-member)
+  (defun ring-member (ring item)
+    (catch 'found
+      (dotimes (ind (ring-length ring))
+        (when (equal item (ring-ref ring ind))
+          (throw 'found ind))))))
+
+(unless (fboundp 'looking-at-p)
   (defsubst looking-at-p (regexp)
     (with-no-warnings
       (let ((inhibit-changing-match-data t))



reply via email to

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