[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Fri Feb 27 14:49:29 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv28424

Modified Files:
	slime.el ChangeLog 
Log Message:
	* slime.el (slime-defmacro-if-undefined): New. Analogous to
	`slime-defun-if-undefined'.
	([portablity]] with-selected-window) Use it.
	([portability] with-temo-buffer): Likewise.

	Patch by Theam Yong Chew.


--- /project/slime/cvsroot/slime/slime.el	2009/02/26 21:41:28	1.1131
+++ /project/slime/cvsroot/slime/slime.el	2009/02/27 14:49:28	1.1132
@@ -8271,6 +8271,13 @@
 
 (put 'slime-defun-if-undefined 'lisp-indent-function 2)
 
+(defmacro slime-defmacro-if-undefined (name &rest rest)
+  `(unless (fboundp ',name)
+     (defmacro ,name , at rest)))
+
+(put 'slime-defmacro-if-undefined 'lisp-indent-function 2)
+
+
 (defvar slime-accept-process-output-supports-floats 
   (ignore-errors (accept-process-output nil 0.0) t))
 
@@ -8555,20 +8562,19 @@
             (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
     "The directory for writing temporary files."))
 
-(unless (fboundp 'with-temp-message)
-  (defmacro with-temp-message (message &rest body)
-    (let ((current-message (make-symbol "current-message"))
-          (temp-message (make-symbol "with-temp-message")))
-      `(let ((,temp-message ,message)
-             (,current-message))
-         (unwind-protect
-             (progn
-               (when ,temp-message
-                 (setq ,current-message (current-message))
-                 (message "%s" ,temp-message))
-               , at body)
-           (and ,temp-message ,current-message
-                (message "%s" ,current-message)))))))
+(slime-defmacro-if-undefined with-temp-message (message &rest body)
+  (let ((current-message (make-symbol "current-message"))
+        (temp-message (make-symbol "with-temp-message")))
+    `(let ((,temp-message ,message)
+           (,current-message))
+       (unwind-protect
+            (progn
+              (when ,temp-message
+                (setq ,current-message (current-message))
+                (message "%s" ,temp-message))
+              , at body)
+         (and ,temp-message ,current-message
+              (message "%s" ,current-message))))))
 
 (defun slime-emacs-21-p ()
   (and (not (featurep 'xemacs))
@@ -8585,7 +8591,7 @@
   (when (get-text-property (point) 'point-entered)
     (funcall (get-text-property (point) 'point-entered))))
 
-(slime-defun-if-undefined with-selected-window (window &rest body)
+(slime-defmacro-if-undefined with-selected-window (window &rest body)
   `(save-selected-window
      (select-window ,window)
      , at body))
--- /project/slime/cvsroot/slime/ChangeLog	2009/02/26 23:41:41	1.1696
+++ /project/slime/cvsroot/slime/ChangeLog	2009/02/27 14:49:28	1.1697
@@ -1,5 +1,14 @@
 2009-02-27  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* slime.el (slime-defmacro-if-undefined): New. Analogous to
+	`slime-defun-if-undefined'.
+	([portablity]] with-selected-window) Use it.
+	([portability] with-temo-buffer): Likewise.
+
+	Patch by Theam Yong Chew.
+
+2009-02-27  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	C-c C-c on (defun foo () ,bar) did not result in a compiler note
 	overlay on SBCL.
 





More information about the slime-cvs mailing list