changeset 34443:599c8d8e833a

(kill-new): Don't try to setcar kill-ring if it is nil.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 11 Dec 2000 15:33:34 +0000
parents 57d320641b64
children ffd94915c70a
files lisp/simple.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Mon Dec 11 15:21:46 2000 +0000
+++ b/lisp/simple.el	Mon Dec 11 15:33:34 2000 +0000
@@ -1668,7 +1668,7 @@
 the front of the kill ring, rather than being added to the list."
   (and (fboundp 'menu-bar-update-yank-menu)
        (menu-bar-update-yank-menu string (and replace (car kill-ring))))
-  (if replace
+  (if (and replace kill-ring)
       (setcar kill-ring string)
     (setq kill-ring (cons string kill-ring))
     (if (> (length kill-ring) kill-ring-max)