[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 205223f: Solve ses-recalculate-cell updating only c
From: |
Vincent Belaïche |
Subject: |
[Emacs-diffs] master 205223f: Solve ses-recalculate-cell updating only current line bug. |
Date: |
Mon, 20 Mar 2017 17:43:13 -0400 (EDT) |
branch: master
commit 205223f4725864e1fb53df5cd12694d0bc89f7d0
Author: Vincent Belaïche <address@hidden>
Commit: Vincent Belaïche <address@hidden>
Solve ses-recalculate-cell updating only current line bug.
* lisp/ses.el (ses-recalculate-cell): Add optional argument
ses--curcell to avoid overwriting ses--curcell when function is
called from ses-recalculate-all. Update docstring accordingly.
(ses-recalculate-all): Call ses-recalculate-cell with argument
ses--curcell to avoid its overwriting.
---
lisp/ses.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/lisp/ses.el b/lisp/ses.el
index 76d4ca5..5050713 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1,4 +1,3 @@
-
;;; ses.el -- Simple Emacs Spreadsheet -*- lexical-binding:t -*-
;; Copyright (C) 2002-2017 Free Software Foundation, Inc.
@@ -2273,15 +2272,19 @@ print area if NONARROW is nil."
;; (defvar maxrow)
;; (defvar maxcol)
-(defun ses-recalculate-cell ()
+(defun ses-recalculate-cell (&optional ses--curcell)
"Recalculate and reprint the current cell or range.
+If SES--CURCELL is non nil use it as current cell or range
+without any check, otherwise fnuction (ses-check-curcell 'range)
+is called.
+
For an individual cell, shows the error if the formula or printer
signals one, or otherwise shows the cell's complete value. For a range, the
cells are recalculated in \"natural\" order, so cells that other cells refer
to are recalculated first."
(interactive "*")
- (ses-check-curcell 'range)
+ (or ses--curcell (ses-check-curcell 'range))
(ses-begin-change)
(ses-initialize-Dijkstra-attempt)
(let (sig cur-rowcol)
@@ -2334,7 +2337,7 @@ to are recalculated first."
(let ((startcell (ses--cell-at-pos (point)))
(ses--curcell (cons 'A1 (ses-cell-symbol (1- ses--numrows)
(1- ses--numcols)))))
- (ses-recalculate-cell)
+ (ses-recalculate-cell ses--curcell)
(ses-jump-safe startcell)))
(defun ses-truncate-cell ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 205223f: Solve ses-recalculate-cell updating only current line bug.,
Vincent Belaïche <=