From: Vincent Belaïche Date: Thu, 2 Jun 2016 18:57:32 +0000 (+0200) Subject: Make ses-jump with completing input. X-Git-Tag: emacs-26.0.90~1844 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=88c10f2e0faf81cc9b622715158b7cfd44efc42f;p=emacs.git Make ses-jump with completing input. * lisp/ses.el (ses-jump): Make symbol input completing against list of named cells. --- diff --git a/lisp/ses.el b/lisp/ses.el index b2fd2bbe9a5..305027c73bb 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*)