]> git.eshelyaron.com Git - emacs.git/commitdiff
(xscheme-insert-expression): Use add-to-history.
authorKim F. Storm <storm@cua.dk>
Fri, 5 May 2006 23:38:58 +0000 (23:38 +0000)
committerKim F. Storm <storm@cua.dk>
Fri, 5 May 2006 23:38:58 +0000 (23:38 +0000)
lisp/progmodes/xscheme.el

index 4f1cd37a9f7d6edb61c08fee63cc29b9892ca1a6..0f55c71ac705be05fa2bf5aba4a2f6495093cfc4 100644 (file)
@@ -580,12 +580,9 @@ The strings are concatenated and terminated by a newline."
 ;;;; Scheme expressions ring
 
 (defun xscheme-insert-expression (string)
-  (setq xscheme-expressions-ring (cons string xscheme-expressions-ring))
-  (if (> (length xscheme-expressions-ring) xscheme-expressions-ring-max)
-      (setcdr (nthcdr (1- xscheme-expressions-ring-max)
-                     xscheme-expressions-ring)
-             nil))
-  (setq xscheme-expressions-ring-yank-pointer xscheme-expressions-ring))
+  (setq xscheme-expressions-ring-yank-pointer
+       (add-to-history 'xscheme-expressions-ring string
+                       xscheme-expressions-ring-max)))
 
 (defun xscheme-rotate-yank-pointer (arg)
   "Rotate the yanking point in the kill ring."