emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/calc/calc-yank.el


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc-yank.el
Date: Sun, 02 Jan 2005 12:16:40 -0500

Index: emacs/lisp/calc/calc-yank.el
diff -c emacs/lisp/calc/calc-yank.el:1.14 emacs/lisp/calc/calc-yank.el:1.15
*** emacs/lisp/calc/calc-yank.el:1.14   Sun Jan  2 07:39:20 2005
--- emacs/lisp/calc/calc-yank.el        Sun Jan  2 17:04:37 2005
***************
*** 430,435 ****
--- 430,436 ----
  (defvar calc-edit-handler)
  (defvar calc-restore-trail)
  (defvar calc-allow-ret)
+ (defvar calc-edit-top)
  
  (defun calc-edit-mode (&optional handler allow-ret title)
    "Calculator editing mode.  Press RET, LFD, or C-c C-c to finish.
***************
*** 470,476 ****
                "Press `C-c C-c'"
                (if allow-ret "" " or RET")
                " to finish, `C-x k RET' to cancel.\n\n")
!              'font-lock-face 'italic))))
  (put 'calc-edit-mode 'mode-class 'special)
  
  (defun calc-show-edit-buffer ()
--- 471,479 ----
                "Press `C-c C-c'"
                (if allow-ret "" " or RET")
                " to finish, `C-x k RET' to cancel.\n\n")
!              'font-lock-face 'italic 'read-only t 'rear-nonsticky t 
'front-sticky t))
!     (make-local-variable 'calc-edit-top)
!     (setq calc-edit-top (point))))
  (put 'calc-edit-mode 'mode-class 'special)
  
  (defun calc-show-edit-buffer ()
***************
*** 487,494 ****
          (if win
              (delete-window win))))
      (set-buffer-modified-p nil)
!     (goto-char (point-min))
!     (forward-line 2)))
  
  (defun calc-edit-return ()
    (interactive)
--- 490,496 ----
          (if win
              (delete-window win))))
      (set-buffer-modified-p nil)
!     (goto-char calc-edit-top)))
  
  (defun calc-edit-return ()
    (interactive)
***************
*** 522,532 ****
                  (set-buffer original)
                  (not (eq major-mode 'calc-mode))))
        (error "Original calculator buffer has been corrupted")))
!     (goto-char (point-min))
!     (when (looking-at "Calc Edit\\|Editing ")
!       (forward-line 1))
!     (if (looking-at "^ *$")
!         (forward-line 1))
      (if (buffer-modified-p)
        (eval calc-edit-handler))
      (if one-window
--- 524,530 ----
                  (set-buffer original)
                  (not (eq major-mode 'calc-mode))))
        (error "Original calculator buffer has been corrupted")))
!     (goto-char calc-edit-top)
      (if (buffer-modified-p)
        (eval calc-edit-handler))
      (if one-window
***************
*** 551,557 ****
  
  (defun calc-finish-stack-edit (num)
    (let ((buf (current-buffer))
!       (str (buffer-substring (point) (point-max)))
        (start (point))
        pos)
      (if (and (integerp num) (> num 1))
--- 549,555 ----
  
  (defun calc-finish-stack-edit (num)
    (let ((buf (current-buffer))
!       (str (buffer-substring calc-edit-top (point-max)))
        (start (point))
        pos)
      (if (and (integerp num) (> num 1))




reply via email to

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