[slime-cvs] CVS slime

jsnellman jsnellman at common-lisp.net
Sun Nov 26 18:03:12 UTC 2006


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv5900

Modified Files:
	ChangeLog slime.el 
Log Message:
	Restore the way M-n and M-p used to work in the REPL. (cherry-picked
	from a patch with other changes, sent by Attila Lendvai).

	* slime.el (slime-repl-previous-input-starting-with-current-input)
	(slime-repl-next-input-starting-with-current-input): New functions,
	work like the old slime-repl-previous-input / next-input.
	(slime-repl-matching-input-regexp): Restore old version.	
	(slime-repl-mode-map): Bind s-r-p-i-s-w-c-i and s-r-n-i-s-w-c-i
	to M-p and M-n respectively. slime-repl-previous-input and
	slime-repl-next-input are still accessible with C-up / C-down.


--- /project/slime/cvsroot/slime/ChangeLog	2006/11/24 23:34:58	1.1007
+++ /project/slime/cvsroot/slime/ChangeLog	2006/11/26 18:03:11	1.1008
@@ -1,3 +1,16 @@
+2006-11-26  Juho Snellman  <jsnell at iki.fi>
+
+	Restore the way M-n and M-p used to work in the REPL. (cherry-picked
+	from a patch with other changes, sent by Attila Lendvai).
+
+	* slime.el (slime-repl-previous-input-starting-with-current-input)
+	(slime-repl-next-input-starting-with-current-input): New functions,
+	work like the old slime-repl-previous-input / next-input.
+	(slime-repl-matching-input-regexp): Restore old version.	
+	(slime-repl-mode-map): Bind s-r-p-i-s-w-c-i and s-r-n-i-s-w-c-i
+	to M-p and M-n respectively. slime-repl-previous-input and
+	slime-repl-next-input are still accessible with C-up / C-down.
+	
 2006-11-25  Helmut Eller  <heller at common-lisp.net>
 
 	* slime.el (slime-repl-read-break): Use a :emacs-interrupt message
--- /project/slime/cvsroot/slime/slime.el	2006/11/24 23:33:52	1.692
+++ /project/slime/cvsroot/slime/slime.el	2006/11/26 18:03:11	1.693
@@ -4011,6 +4011,20 @@
   (interactive)
   (slime-repl-history-replace 'forward nil t))
 
+(defun slime-repl-matching-input-regexp ()
+  (if (memq last-command
+            '(slime-repl-previous-input-starting-with-current-input slime-repl-next-input-starting-with-current-input))
+      slime-repl-history-pattern
+    (concat "^" (regexp-quote (slime-repl-current-input)))))
+
+(defun slime-repl-previous-input-starting-with-current-input ()
+  (interactive)
+  (slime-repl-history-replace 'backward (slime-repl-matching-input-regexp) t))
+
+(defun slime-repl-next-input-starting-with-current-input ()
+  (interactive)
+  (slime-repl-history-replace 'forward (slime-repl-matching-input-regexp) t))
+
 (defun slime-repl-continue-search-with-last-pattern ()
   (interactive)
   (when slime-repl-history-pattern
@@ -4167,9 +4181,9 @@
   ("\C-a" 'slime-repl-bol)
   ([home] 'slime-repl-bol)
   ("\C-e" 'slime-repl-eol)
-  ("\M-p" 'slime-repl-previous-input)
+  ("\M-p" 'slime-repl-previous-input-starting-with-current-input)
   ((kbd "C-<up>") 'slime-repl-previous-input)
-  ("\M-n" 'slime-repl-next-input)
+  ("\M-n" 'slime-repl-next-input-starting-with-current-input)
   ((kbd "C-<down>") 'slime-repl-next-input)
   ("\M-r" 'slime-repl-previous-matching-input)
   ("\M-s" 'slime-repl-next-matching-input)
@@ -6797,8 +6811,8 @@
     (save-match-data
       (when (and (buffer-file-name)
                  (slime-background-activities-enabled-p))
-        (let ((filename (slime-to-lisp-filename (buffer-file-name))))
-          (slime-eval-async `(swank:buffer-first-change ,filename)))))))
+        (let ((filename (slime-to-lisp-filename (buffer-file-name))))          
+           (slime-eval-async `(swank:buffer-first-change ,filename)))))))
 
 (defun slime-setup-first-change-hook ()
   (add-hook (make-local-variable 'first-change-hook)




More information about the slime-cvs mailing list