-;;; ring.el --- handle rings of items
+;;; ring.el --- handle rings of items -*- lexical-binding: t; -*-
;; Copyright (C) 1992, 2001-2016 Free Software Foundation, Inc.
(size (ring-size ring))
(vect (cddr ring))
lst)
- (dotimes (var (cadr ring) lst)
- (push (aref vect (mod (+ start var) size)) lst))))
+ (dotimes (var (cadr ring))
+ (push (aref vect (mod (+ start var) size)) lst))
+ lst))
(defun ring-member (ring item)
"Return index of ITEM if on RING, else nil.
Comparison is done via `equal'. The index is 0-based."
(catch 'found
- (dotimes (ind (ring-length ring) nil)
+ (dotimes (ind (ring-length ring))
(when (equal item (ring-ref ring ind))
(throw 'found ind)))))
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
+;; This file is part of GNU Emacs.
+
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or