emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 88c10f2 1/5: Make ses-jump with completing input.


From: Vincent Belaïche
Subject: [Emacs-diffs] master 88c10f2 1/5: Make ses-jump with completing input.
Date: Thu, 28 Jul 2016 16:13:03 +0000 (UTC)

branch: master
commit 88c10f2e0faf81cc9b622715158b7cfd44efc42f
Author: Vincent Belaïche <address@hidden>
Commit: Vincent Belaïche <address@hidden>

    Make ses-jump with completing input.
    
    * lisp/ses.el (ses-jump): Make symbol input completing against list of
      named cells.
---
 lisp/ses.el |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lisp/ses.el b/lisp/ses.el
index b2fd2bb..305027c 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -2201,7 +2201,17 @@ Based on the current set of columns and `window-hscroll' 
position."
 
 (defun ses-jump (sym)
   "Move point to cell SYM."
-  (interactive "SJump to cell: ")
+  (interactive (let* (names
+                     (s (completing-read
+                         "Jump to cell: "
+                         (and ses--named-cell-hashmap
+                              (progn (maphash (lambda (key val) (push 
(symbol-name key) names))
+                                              ses--named-cell-hashmap)
+                                     names)))))
+                (if
+                    (string= s "")
+                    (error "Invalid cell name")
+                  (list (intern s)))))
   (let ((rowcol (ses-sym-rowcol sym)))
     (or rowcol (error "Invalid cell name"))
     (if (eq (symbol-value sym) '*skip*)



reply via email to

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