[slime-cvs] CVS slime
mbaringer
mbaringer at common-lisp.net
Thu Oct 26 08:52:48 UTC 2006
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv14275
Modified Files:
slime.el
Log Message:
(slime-global-variable-name-p): Use a custom 'parser'
instead of string-match to avoid regexp overflow errors on very
long strings.
--- /project/slime/cvsroot/slime/slime.el 2006/10/21 10:31:50 1.674
+++ /project/slime/cvsroot/slime/slime.el 2006/10/26 08:52:47 1.675
@@ -5632,7 +5632,20 @@
(defun slime-global-variable-name-p (name)
"Is NAME a global variable?
Globals are recognised purely by *this-naming-convention*."
- (string-match "^\\(.*::?\\)?[*+].*[*+]$" name))
+ (when (<= (length name) 2)
+ (return-from slime-global-variable-name-p nil))
+ (when (char-equal ?\: (aref name 0))
+ (return-from slime-global-variable-name-p nil))
+ (let ((package-prefix-end (cond
+ ((search "::" name)
+ (+ 2 (search "::" name)))
+ ((search ":" name)
+ (+ 1 (search ":" name)))
+ (t
+ 0))))
+ (let ((first-char-in-name (aref name package-prefix-end)))
+ (and (member first-char-in-name '(?\* ?\+))
+ (char-equal first-char-in-name (aref name (1- (length name))))))))
(defun slime-get-cached-autodoc (symbol-name)
"Return the cached autodoc documentation for SYMBOL-NAME, or nil."
More information about the slime-cvs
mailing list