[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's wrong with value?

From: David Kastrup
Subject: Re: What's wrong with value?
Date: 06 Feb 2003 19:28:27 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Jesper Harder <> writes:

> Pascal Bourguignon <> writes:
> > What's happening with this symbol:
> >
> > (setq value :toto) ;; C-x C-e, :toto appears in Mini-buffer.
> > (show value)       ;; But value has not been assigned!
> > ==> nil
> >
> > Note that  while 'value is a  method defined with eieio
> I don't think eieio is the culprit.
> Try it with a clean 'emacs -q --no-site-file' -- the same thing happens.
> Very mysterious!

(defun eval-last-sexp (eval-last-sexp-arg-internal)
  "Evaluate sexp before point; print value in minibuffer.
Interactively, with prefix argument, print output into current buffer."
  (interactive "P")
  (if (null eval-expression-debug-on-error)
      (eval-last-sexp-1 eval-last-sexp-arg-internal)
    (let ((old-value (make-symbol "t")) new-value value)
      (let ((debug-on-error old-value))
        (setq value (eval-last-sexp-1 eval-last-sexp-arg-internal))
        (setq new-value debug-on-error))
      (unless (eq old-value new-value)
        (setq debug-on-error new-value))

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]