From xemacs-m  Sat Feb 15 22:37:08 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id WAA18514
	for <xemacs-beta@xemacs.org>; Sat, 15 Feb 1997 22:37:05 -0600 (CST)
Received: by crystal.WonderWorks.COM 
	id QQcdcc00160; Sat, 15 Feb 1997 23:37:05 -0500 (EST)
Date: Sat, 15 Feb 1997 23:37:05 -0500 (EST)
Message-Id: <QQcdcc00160.199702160437@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: History of M-:
In-Reply-To: <kigybcp7cuh.fsf@jagor.srce.hr>
References: <kigybcp7cuh.fsf@jagor.srce.hr>

Hrvoje Niksic writes:
 > The behaviour of minibuffer history in `eval-expression' seems like a
 > major uncoolness.

Here's a patch that fixes it, I think.  This is against 20.0, not
20.1, although it probably will work on both.  minibuf.elc is
dumped, so you will have to redump your XEmacs after recompiling
minibuf.el.

*** 1.1 1997/02/16 03:58:00
--- lisp/prim/minibuf.el  1997/02/16 04:04:52
***************
*** 403,408 ****
--- 403,409 ----
                                    (if minibuffer-exit-hook
                                        (run-hooks 'minibuffer-exit-hook))
                                    (buffer-string)))
+                     (histval val)
                        (err nil))
                   (if readp
                       (condition-case e
***************
*** 424,435 ****
                     (let ((list (symbol-value minibuffer-history-variable)))
                       (or (eq list t)
                           (null val)
!                          (and list (equal val (car list)))
                           (and (stringp val)
                                minibuffer-history-minimum-string-length
                                (< (length val)
                                   minibuffer-history-minimum-string-length))
!                          (set minibuffer-history-variable (cons val list)))))
                   (if err (signal (car err) (cdr err)))
                   val))))
        ;; stupid display code requires this for some reason
--- 425,436 ----
                     (let ((list (symbol-value minibuffer-history-variable)))
                       (or (eq list t)
                           (null val)
!                          (and list (equal histval (car list)))
                           (and (stringp val)
                                minibuffer-history-minimum-string-length
                                (< (length val)
                                   minibuffer-history-minimum-string-length))
!                          (set minibuffer-history-variable (cons histval list)))))
                   (if err (signal (car err) (cdr err)))
                   val))))
        ;; stupid display code requires this for some reason

