summaryrefslogtreecommitdiff
path: root/lisp/progmodes/xscheme.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-05-05 23:38:58 +0000
committerKim F. Storm <storm@cua.dk>2006-05-05 23:38:58 +0000
commit662705b1c3727a20cfd067ad53fbfee21f9cf13f (patch)
treee935c7bc683f193ace430bdb28cd28882904357f /lisp/progmodes/xscheme.el
parent7cd80673b1ae580cb71e19e3b7dadc7e69066806 (diff)
downloademacs-662705b1c3727a20cfd067ad53fbfee21f9cf13f.tar.gz
(xscheme-insert-expression): Use add-to-history.
Diffstat (limited to 'lisp/progmodes/xscheme.el')
-rw-r--r--lisp/progmodes/xscheme.el9
1 files 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."