[slime-cvs] CVS slime

heller heller at common-lisp.net
Thu Aug 23 13:02:32 UTC 2007


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

Modified Files:
	slime.el ChangeLog 
Log Message:
Display a "Please upgrade" style message when C-c M-i is pressed.


--- /project/slime/cvsroot/slime/slime.el	2007/08/23 12:58:51	1.800
+++ /project/slime/cvsroot/slime/slime.el	2007/08/23 13:02:32	1.801
@@ -11119,6 +11119,48 @@
   (if (local-variable-p hook (current-buffer))
       (remove-hook hook function t)))
 
+;;; Some "nice" backward compatiblity bindings for lusers.
+
+(unless (lookup-key slime-mode-map "\C-c\M-i")
+  (define-key slime-mode-map "\C-c\M-i" 'slime-fuzzy-upgrade-notice)
+  (define-key slime-repl-mode-map "\C-c\M-i" 'slime-fuzzy-upgrade-notice))
+
+(defun slime-fuzzy-upgrade-notice ()
+  (interactive)
+  (slime-timebomb "slime-fuzzy-complete-symbol is not loaded.
+
+Fuzzy completion has been moved to contrib.
+Please consult the README file in the contrib directory for details.
+
+To fetch the contrib directoy use:  cvs update -d contrib"
+                  15))
+
+;;;; ... with gratuitous bloat
+
+(defun slime-timebomb (message timeout)
+  (with-current-buffer (generate-new-buffer "*warning*")
+    (insert message "\n\n")
+    (slime-timebomb-progress (point-marker) timeout)
+    (goto-char (point-min))
+    (pop-to-buffer (current-buffer))))
+
+(defun slime-timebomb-progress (mark timeout)
+  (let ((buffer (marker-buffer mark)))
+    (cond ((not (buffer-live-p buffer)))
+	  ((zerop timeout) (kill-buffer buffer))
+	  (t (with-current-buffer buffer
+               (save-excursion
+                 (delete-region mark (point-max))
+                 (goto-char mark)
+                 (slime-timebomb-message timeout))
+	       (run-with-timer 1 nil 
+                               'slime-timebomb-progress mark (1- timeout)))))))
+
+(defun slime-timebomb-message (timeout)
+  (slime-insert-propertized
+   (list 'face (if (zerop (mod timeout 2)) 'highlight 'default))
+   (format "This message will destroy itself in %d seconds." timeout)))
+
 
 ;;;; Finishing up
 
--- /project/slime/cvsroot/slime/ChangeLog	2007/08/23 12:58:51	1.1146
+++ /project/slime/cvsroot/slime/ChangeLog	2007/08/23 13:02:32	1.1147
@@ -1,3 +1,8 @@
+2007-08-23  Helmut Eller  <heller at common-lisp.net>
+
+	* slime.el (slime-fuzzy-upgrade-notice): New function.  Bound to
+	the key where slime-fuzzy-complete-symbol used to be.
+
 2007-08-22  Tobias C. Rittweiler <tcr at freebits.de>
 
 	* slime.el (slime-close-all-parens-in-sexp): Fix interplay with




More information about the slime-cvs mailing list