[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117492: New user commands, similar to what is avail
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] trunk r117492: New user commands, similar to what is available in ESS |
Date: |
Tue, 08 Jul 2014 15:35:31 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117492
revision-id: address@hidden
parent: address@hidden
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Tue 2014-07-08 11:35:29 -0400
message:
New user commands, similar to what is available in ESS
* lisp/progmodes/inf-lisp.el (lisp-eval-paragraph, lisp-eval-form-and-next):
New user commands.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/inf-lisp.el inflisp.el-20091113204419-o5vbwnq5f7feedwu-235
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-07-08 08:49:18 +0000
+++ b/lisp/ChangeLog 2014-07-08 15:35:29 +0000
@@ -1,3 +1,8 @@
+2014-07-08 Sam Steingold <address@hidden>
+
+ * progmodes/inf-lisp.el (lisp-eval-paragraph, lisp-eval-form-and-next):
+ New user commands.
+
2014-07-08 Juri Linkov <address@hidden>
* vc/vc-annotate.el (vc-annotate-background-mode): New defcustom.
=== modified file 'lisp/progmodes/inf-lisp.el'
--- a/lisp/progmodes/inf-lisp.el 2014-01-01 07:43:34 +0000
+++ b/lisp/progmodes/inf-lisp.el 2014-07-08 15:35:29 +0000
@@ -112,6 +112,8 @@
(define-key lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) ; Gnu convention
(define-key lisp-mode-map "\C-c\C-e" 'lisp-eval-defun)
(define-key lisp-mode-map "\C-c\C-r" 'lisp-eval-region)
+(define-key lisp-mode-map "\C-c\C-n" 'lisp-eval-form-and-next)
+(define-key lisp-mode-map "\C-c\C-p" 'lisp-eval-paragraph)
(define-key lisp-mode-map "\C-c\C-c" 'lisp-compile-defun)
(define-key lisp-mode-map "\C-c\C-z" 'switch-to-lisp)
(define-key lisp-mode-map "\C-c\C-l" 'lisp-load-file)
@@ -311,6 +313,14 @@
;;;###autoload
(defalias 'run-lisp 'inferior-lisp)
+(defun lisp-eval-paragraph (&optional and-go)
+ "Send the current paragraph to the inferior Lisp process.
+Prefix argument means switch to the Lisp buffer afterwards."
+ (interactive "P")
+ (save-excursion
+ (mark-paragraph)
+ (lisp-eval-region (point) (mark) and-go)))
+
(defun lisp-eval-region (start end &optional and-go)
"Send the current region to the inferior Lisp process.
Prefix argument means switch to the Lisp buffer afterwards."
@@ -361,6 +371,14 @@
(interactive "P")
(lisp-eval-region (save-excursion (backward-sexp) (point)) (point) and-go))
+(defun lisp-eval-form-and-next ()
+ "Send the previous sexp to the inferior Lisp process and move to the next
one."
+ (interactive "")
+ (while (not (zerop (car (syntax-ppss))))
+ (up-list))
+ (lisp-eval-last-sexp)
+ (forward-sexp))
+
(defun lisp-compile-region (start end &optional and-go)
"Compile the current region in the inferior Lisp process.
Prefix argument means switch to the Lisp buffer afterwards."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117492: New user commands, similar to what is available in ESS,
Sam Steingold <=