From 662705b1c3727a20cfd067ad53fbfee21f9cf13f Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 5 May 2006 23:38:58 +0000 Subject: [PATCH] (xscheme-insert-expression): Use add-to-history. --- lisp/progmodes/xscheme.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 4f1cd37a9f7..0f55c71ac70 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -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." -- 2.39.2