branch: externals/queue commit b392dfb70e821a0d227939b5189f4ee29390441f Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
* queue.el: Use `cl-lib` (make-queue): Don't autoload, since `queue-create` is not autoloaded anyway --- queue.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/queue.el b/queue.el index 4e173b3..06fa065 100644 --- a/queue.el +++ b/queue.el @@ -1,11 +1,12 @@ ;;; queue.el --- Queue data structure -*- lexical-binding: t; -*- -;; Copyright (C) 1991-1995, 2008-2009, 2012, 2017 Free Software Foundation, Inc +;; Copyright (C) 1991-1995, 2008-2009, 2012, 2017, 2021 Free Software Foundation, Inc ;; Author: Inge Wallin <i...@lysator.liu.se> ;; Toby Cubitt <toby-predict...@dr-qubit.org> ;; Maintainer: Toby Cubitt <toby-predict...@dr-qubit.org> ;; Version: 0.2 +;; Package-Requires: ((cl-lib 0.5)) ;; Keywords: extensions, data structures, queue ;; URL: http://www.dr-qubit.org/emacs.php ;; Repository: http://www.dr-qubit.org/git/predictive.git @@ -44,7 +45,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (defmacro queue--when-generators (then) "Evaluate THEN if `generator' library is available." @@ -52,18 +53,17 @@ (if (require 'generator nil 'noerror) then)) -(defstruct (queue - ;; A tagged list is the pre-defstruct representation. - ;; (:type list) - :named - (:constructor nil) - (:constructor queue-create ()) - (:copier nil)) +(cl-defstruct (queue + ;; A tagged list is the pre-defstruct representation. + ;; (:type list) + :named + (:constructor nil) + (:constructor queue-create ()) + (:copier nil)) head tail) -;;;###autoload -(defalias 'make-queue 'queue-create +(defalias 'make-queue #'queue-create "Create an empty queue data structure.") @@ -75,7 +75,7 @@ (setf (queue-head queue) (setf (queue-tail queue) (cons element nil))))) -(defalias 'queue-append 'queue-enqueue) +(defalias 'queue-append #'queue-enqueue) (defun queue-prepend (queue element)