[slime-cvs] CVS slime/contrib

heller heller at common-lisp.net
Mon Sep 10 21:45:18 UTC 2007


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

Modified Files:
	slime-parse.el 
Log Message:
* slime.el (slime-cl-symbol-name, slime-cl-symbol-package): Move to
contrib/slime-parse.el.



--- /project/slime/cvsroot/slime/contrib/slime-parse.el	2007/09/10 00:43:18	1.4
+++ /project/slime/cvsroot/slime/contrib/slime-parse.el	2007/09/10 21:45:18	1.5
@@ -34,6 +34,21 @@
     (and (string-match ":" name)
          (not (string-match "::" name)))))
 
+(defun slime-cl-symbol-name (symbol)
+  (let ((n (if (stringp symbol) symbol (symbol-name symbol))))
+    (if (string-match ":\\([^:]*\\)$" n)
+	(let ((symbol-part (match-string 1 n)))
+          (if (string-match "^|\\(.*\\)|$" symbol-part)
+              (match-string 1 symbol-part)
+              symbol-part))
+      n)))
+
+(defun slime-cl-symbol-package (symbol &optional default)
+  (let ((n (if (stringp symbol) symbol (symbol-name symbol))))
+    (if (string-match "^\\([^:]*\\):" n)
+	(match-string 1 n)
+      default)))
+
 ;; XXX: unused function
 (defun slime-qualify-cl-symbol (symbol-or-name)
   "Like `slime-qualify-cl-symbol-name', but interns the result."




More information about the slime-cvs mailing list