From: Kim F. Storm Date: Fri, 5 May 2006 23:38:58 +0000 (+0000) Subject: (xscheme-insert-expression): Use add-to-history. X-Git-Tag: emacs-pretest-22.0.90~2774 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=662705b1c3727a20cfd067ad53fbfee21f9cf13f;p=emacs.git (xscheme-insert-expression): Use add-to-history. --- 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."