emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs 21 Calc mode


From: Eli Zaretskii
Subject: Re: Emacs 21 Calc mode
Date: Mon, 13 Nov 2000 21:18:48 +0200

> Date: Mon, 13 Nov 2000 07:38:30 -0500 (EST)
> From: "Robert J. Chassell" <address@hidden>
> 
>    The problem I corrected was that code which deletes text from the
>    minibuffer needs to be rewritten because the minibuffer prompt is
>    now read-only.
> 
> Eli, your fix has not propagated, or if it did, I lost your patch. 

That's my bad: I never sent it to anyone.  (I was curious to know how
many people use Calc and will bump into the bug; sorry about that
prank.)

> In the short run, please post your patch.

Attached below.  Note that my Calc version is 2.02e, as I never
bothered to upgrade.

2000-10-16  Eli Zaretskii  <address@hidden>

        * calc/calc-aent.el (calcAlg-enter): Use minibuffer-prompt, to
        avoid the attempt to delete text that is read-only in Emacs 21.

*** calc/calc-aent.e~0  Sun Apr  3 00:26:26 1994
--- calc/calc-aent.el   Thu Aug 17 16:06:30 2000
***************
*** 393,406 ****
  
  (defun calcAlg-enter ()
    (interactive)
!   (let* ((str (buffer-string))
         (exp (and (> (length str) 0)
                   (save-excursion
                     (set-buffer calc-buffer)
                     (math-read-exprs str)))))
      (if (eq (car-safe exp) 'error)
        (progn
!         (goto-char (point-min))
          (forward-char (nth 1 exp))
          (beep)
          (calc-temp-minibuffer-message
--- 393,408 ----
  
  (defun calcAlg-enter ()
    (interactive)
!   (let* ((prompt (minibuffer-prompt))
!        (prompt-len (if prompt (length prompt) (point-min)))
!        (str (buffer-substring prompt-len (point-max)))
         (exp (and (> (length str) 0)
                   (save-excursion
                     (set-buffer calc-buffer)
                     (math-read-exprs str)))))
      (if (eq (car-safe exp) 'error)
        (progn
!         (goto-char prompt-len)
          (forward-char (nth 1 exp))
          (beep)
          (calc-temp-minibuffer-message



reply via email to

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