branch: elpa/macrostep
commit e28d0a028f702d2dbf9a33ab691c3459268ed35e
Author: Jeremy Bryant <[email protected]>
Commit: Jeremy Bryant <[email protected]>

    ; Replace macrostep-make-ring by ring-convert-sequence-to-ring.
    
    Observing
    (ring-convert-sequence-to-ring (list ...)) ≡ (macrostep-make-ring ...)
    
    * macrostep.el (macrostep-make-ring): Remove.
    (macrostep-gensym-faces): Call built-in ring-convert-sequence-to-ring.
---
 macrostep.el | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/macrostep.el b/macrostep.el
index f42b0cfca6..ca9683961c 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -362,17 +362,10 @@ buffer.")
   :type 'boolean
   :version "1.0")
 
-;; Need the following for making the ring of faces
-(defun macrostep-make-ring (&rest items)
-  "Make a ring containing all of ITEMS with no empty slots."
-  (let ((ring (make-ring (length items))))
-    (mapc (lambda (item) (ring-insert ring item)) (reverse items))
-    ring))
-
 (defvar macrostep-gensym-faces
-  (macrostep-make-ring
-   'macrostep-gensym-1 'macrostep-gensym-2 'macrostep-gensym-3
-   'macrostep-gensym-4 'macrostep-gensym-5)
+  (ring-convert-sequence-to-ring
+   (list 'macrostep-gensym-1 'macrostep-gensym-2 'macrostep-gensym-3
+        'macrostep-gensym-4 'macrostep-gensym-5))
   "Ring of all macrostepper faces for fontifying gensyms.")
 
 ;; Other modes can enable macrostep by redefining these functions to

Reply via email to