Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1e3b6bec
Commit
1e3b6bec
authored
Jan 23, 2006
by
Stefan Monnier
Browse files
(ses-read-cell): Provide a default value.
parent
9dd28cae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/ses.el
lisp/ses.el
+13
-14
No files found.
lisp/ChangeLog
View file @
1e3b6bec
2006-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
* ses.el (ses-read-cell): Provide a default value.
2006-01-23 Juanma Barranquero <lekktu@gmail.com>
* term/w32-win.el (image-library-alist): Add additional names for
...
...
lisp/ses.el
View file @
1e3b6bec
;;; ses.el -- Simple Emacs Spreadsheet -*- coding: utf-8 -*-
;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Copyright (C) 2002, 2003, 2004, 2005
, 2006
Free Software Foundation, Inc.
;; Author: Jonathan Yavner <jyavner@member.fsf.org>
;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org>
...
...
@@ -148,8 +148,7 @@ Each function is called with ARG=1."
(
newmap
(
make-sparse-keymap
)))
(
set-keymap-parent
newmap
minibuffer-local-map
)
(
while
keys
(define-key newmap (car keys) (cadr keys))
(setq keys (cddr keys)))
(
define-key
newmap
(
pop
keys
)
(
pop
keys
)))
newmap
)
"Local keymap for SES minibuffer cell-editing."
)
...
...
@@ -1865,20 +1864,20 @@ cell formula was unsafe and user declined confirmation."
(
defun
ses-read-cell
(
row
col
newval
)
"Self-insert for initial character of cell function."
(
interactive
(let ((initial (this-command-keys))
(rowcol (progn (ses-check-curcell) (ses-sym-rowcol ses--curcell))))
(
let*
((
initial
(
this-command-keys
))
(
rowcol
(
progn
(
ses-check-curcell
)
(
ses-sym-rowcol
ses--curcell
)))
(
curval
(
ses-cell-formula
(
car
rowcol
)
(
cdr
rowcol
))))
(
barf-if-buffer-read-only
)
(if (string= initial "\"")
(setq initial "\"\"") ;Enter a string
(if (string= initial "(")
(setq initial "()"))) ;Enter a formula list
(
list
(
car
rowcol
)
(
cdr
rowcol
)
(read-from-minibuffer (format "Cell %s: " ses--curcell)
(cons initial 2)
ses-mode-edit-map
t ;Convert to Lisp object
'ses-read-cell-history))))
(
read-from-minibuffer
(
format
"Cell %s: "
ses--curcell
)
(
cons
(
if
(
equal
initial
"\""
)
"\"\""
(
if
(
equal
initial
"("
)
"()"
initial
))
2
)
ses-mode-edit-map
t
;Convert to Lisp object
'ses-read-cell-history
(
prin1-to-string
curval
)))))
(
when
(
ses-edit-cell
row
col
newval
)
(
ses-command-hook
)
;Update cell widths before movement
(
dolist
(
x
ses-after-entry-functions
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment