(add-hook 'completion-at-point-functions
#'elisp-completion-at-point nil t)
(run-hooks 'eval-expression-minibuffer-setup-hook))
- (read-from-minibuffer "Edit: " (cons (buffer-substring beg end) pos) read--expression-map nil))))
+ (read-from-minibuffer "Edit: " (cons (buffer-substring beg end) pos) read--expression-map))))
(replace-region-contents beg end (lambda () str))
(user-error "No expression at point")))
+(defun el-insert-sexp (&optional initial)
+ (interactive)
+ (insert (read-from-minibuffer "Insert: " initial read--expression-map)))
+
(defun el-code-pos-p (&optional pos) (null (nth 8 (syntax-ppss pos))))
(defun el-jump ()
(down-list)
(el-last))
+(defun el-insert-space ()
+ (interactive)
+ (insert " "))
+
(defvar-keymap el-mode-map
:suppress t
"r" #'raise-sexp
"y" #'yank
"(" #'insert-pair
")" #'up-list
+ "n" #'up-list
"\"" #'insert-pair
"/" #'undo
"c" #'el-insert-function-call
"j" #'el-jump
"m" #'mark-sexp
"." #'xref-find-definitions
- "," #'xref-go-back)
+ "," #'xref-go-back
+ "SPC" #'el-insert-space)
;;;###autoload
(define-derived-mode el-mode prog-mode "EL"