# HG changeset patch
# User Kim F. Storm <storm@cua.dk>
# Date 1146872338 0
# Node ID b021bec005d58fb32216ab23ac2caf34e5077b81
# Parent  84417eaa098c0a36ed3e1f69c76b1c564b342676
(xscheme-insert-expression): Use add-to-history.

diff -r 84417eaa098c -r b021bec005d5 lisp/progmodes/xscheme.el
--- a/lisp/progmodes/xscheme.el	Fri May 05 23:38:31 2006 +0000
+++ b/lisp/progmodes/xscheme.el	Fri May 05 23:38:58 2006 +0000
@@ -580,12 +580,9 @@
 ;;;; 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."