summaryrefslogtreecommitdiff
path: root/lisp/ses.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ses.el')
-rw-r--r--lisp/ses.el22
1 files changed, 12 insertions, 10 deletions
diff --git a/lisp/ses.el b/lisp/ses.el
index d1e3afbb5c3..e2abd7426f6 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1283,7 +1283,7 @@ printer signaled one (and \"%s\" is used as the default printer), else nil."
(and locprn
(ses--locprn-compiled locprn))))
printer)
- (or value "")))
+ value))
(if (stringp value)
value
(or (stringp (car-safe value))
@@ -3408,15 +3408,17 @@ highlighted range in the spreadsheet."
(setf (ses-cell--symbol cell) new-name)
(makunbound sym)
(and curcell (setq ses--curcell new-name))
- (let* ((pos (point))
- (inhibit-read-only t)
- (col (current-column))
- (end (save-excursion
- (move-to-column (1+ col))
- (if (eolp)
- (+ pos (ses-col-width col) 1)
- (point)))))
- (put-text-property pos end 'cursor-intangible new-name))
+ (save-excursion
+ (or curcell (ses-goto-print row col))
+ (let* ((pos (point))
+ (inhibit-read-only t)
+ (end (progn
+ (move-to-column (+ (current-column) (ses-col-width col)))
+ (if (eolp)
+ (+ pos (ses-col-width col) 1)
+ (forward-char)
+ (point)))))
+ (put-text-property pos end 'cursor-intangible new-name)))
;; Update the cell name in the mode-line.
(force-mode-line-update)))