]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/queue/queue.el
Merge commit '7c14dedc79bf0c6eaad5bf50b80ea80dd721afdc' from company
[gnu-emacs-elpa] / packages / queue / queue.el
index 56cb234e1cd95136807bdaede86e3b211b613c0f..4c9c954f6630d1cefbaf3d1a4df512a565d058c7 100644 (file)
@@ -1,11 +1,11 @@
-;;; queue.el --- queue data structures
-
+;;; queue.el --- Queue data structure  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1991-1995, 2008-2009, 2012  Free Software Foundation, Inc
 
 ;; Author: Inge Wallin <inge@lysator.liu.se>
 ;;         Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.1
+;; Maintainer: Toby Cubitt <toby-predictive@dr-qubit.org>
+;; Version: 0.1.1
 ;; Keywords: extensions, data structures, queue
 ;; URL: http://www.dr-qubit.org/emacs.php
 ;; Repository: http://www.dr-qubit.org/git/predictive.git
 
 ;;; Commentary:
 ;;
-;; A queue can be used both as a first-in last-out (FILO) and as a first-in
-;; first-out (FIFO) stack, i.e. elements can be added to and removed from the
-;; front or back of the queue.
+;; These queues can be used both as a first-in last-out (FILO) and as a
+;; first-in first-out (FIFO) stack, i.e. elements can be added to the front or
+;; back of the queue, and can be removed from the front. (This type of data
+;; structure is sometimes called an "output-restricted deque".)
 ;;
 ;; You create a queue using `make-queue', add an element to the end of the
 ;; queue using `queue-enqueue', and push an element onto the front of the
@@ -41,7 +42,6 @@
 ;; package.
 
 
-
 ;;; Code:
 
 (eval-when-compile (require 'cl))
@@ -88,12 +88,12 @@ Returns nil if the queue is empty."
   (pop (queue-head queue)))
 
 
-(defmacro queue-empty (queue)
+(defun queue-empty (queue)
   "Return t if QUEUE is empty, otherwise return nil."
   (null (queue-head queue)))
 
 
-(defmacro queue-first (queue)
+(defun queue-first (queue)
   "Return the first element of QUEUE or nil if it is empty,
 without removing it from the QUEUE."
   (car (queue-head queue)))