[slime-devel] match-string-no-properties missing?

Hi, I recently updated to the latest slime from CVS, and now every time I do a M-. I get an emacs message that says "Symbol's function definition is void: match-string-no-properties." My emacs is XEmacs 21.4 (patch 15) (x86_64-redhat-linux, Mule). All help appreciated! Thanks, Alberto Riva University of Florida

Alberto Riva <ariva@ufl.edu> writes:
Hi,
I recently updated to the latest slime from CVS, and now every time I do a M-. I get an emacs message that says "Symbol's function definition is void: match-string-no-properties."
My emacs is XEmacs 21.4 (patch 15) (x86_64-redhat-linux, Mule). All help appreciated! Thanks,
using "GNU Emacs 22.0.50.1 (powerpc-apple-darwin7.9.0) of 2006-08-13" i have the match-string-no-properties function. is this then an emacs only function? -- -Marco Ring the bells that still can ring. Forget your perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen

Marco Baringer wrote:
Alberto Riva <ariva@ufl.edu> writes:
Hi,
I recently updated to the latest slime from CVS, and now every time I do a M-. I get an emacs message that says "Symbol's function definition is void: match-string-no-properties."
My emacs is XEmacs 21.4 (patch 15) (x86_64-redhat-linux, Mule). All help appreciated! Thanks,
using "GNU Emacs 22.0.50.1 (powerpc-apple-darwin7.9.0) of 2006-08-13" i have the match-string-no-properties function. is this then an emacs only function?
XEmacs doesn't have that function, I solved it for the time being by adding the following snippet (or (fboundp 'match-string-no-properties) (defun match-string-no-properties (number) "Return string of text matched by last search." (buffer-substring-no-properties (match-beginning number) (match-end number)))) I found somewhere on the web. It works for me. I haven't dug any further to find out if it is actually a suitable replacement or whether there are more errors waiting to happen.

Nathan Bird wrote:
Marco Baringer wrote:
Alberto Riva <ariva@ufl.edu> writes:
Hi,
I recently updated to the latest slime from CVS, and now every time I do a M-. I get an emacs message that says "Symbol's function definition is void: match-string-no-properties."
My emacs is XEmacs 21.4 (patch 15) (x86_64-redhat-linux, Mule). All help appreciated! Thanks,
using "GNU Emacs 22.0.50.1 (powerpc-apple-darwin7.9.0) of 2006-08-13" i have the match-string-no-properties function. is this then an emacs only function?
XEmacs doesn't have that function
Yes, that seems to be the case. What I can't understand is why I never noticed this problem in XEmacs (I never use emacs) until I did a cvs update last week, and how can it still work on my laptop, where I have the same version of XEmacs and an older version of slime.el (that has the same call to match-string-no-properties). Anyway, thanks for the suggestion below.
I solved it for the time being by adding the following snippet
(or (fboundp 'match-string-no-properties) (defun match-string-no-properties (number) "Return string of text matched by last search." (buffer-substring-no-properties (match-beginning number) (match-end number))))
I found somewhere on the web. It works for me. I haven't dug any further to find out if it is actually a suitable replacement or whether there are more errors waiting to happen.

[ Cc'ing to xemacs-beta ] Nathan Bird <nathan@acceleration.net> wrote:
Marco Baringer wrote:
Alberto Riva <ariva@ufl.edu> writes:
Hi,
I recently updated to the latest slime from CVS, and now every time I do a M-. I get an emacs message that says "Symbol's function definition is void: match-string-no-properties."
My emacs is XEmacs 21.4 (patch 15) (x86_64-redhat-linux, Mule). All help appreciated! Thanks,
using "GNU Emacs 22.0.50.1 (powerpc-apple-darwin7.9.0) of 2006-08-13" i have the match-string-no-properties function. is this then an emacs only function?
XEmacs doesn't have that function, I solved it for the time being by adding the following snippet
XEmacs has this function in xml.el, from the net-utils package. It is actually defined as an alias on match-string. I'm not sure why it's there... maybe a better place would be directly in replace.el (or in fsf-compat, but do we really want to have to load that ?). -- Looking for a Christmas present idea? http://cdbaby.com/cd/didierverna Didier Verna EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85 94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22

Alberto Riva <ariva@ufl.edu> writes:
Hi,
I recently updated to the latest slime from CVS, and now every time I do a M-. I get an emacs message that says "Symbol's function definition is void: match-string-no-properties."
My emacs is XEmacs 21.4 (patch 15) (x86_64-redhat-linux, Mule). All help appreciated! Thanks,
does this patch help? -- -Marco Ring the bells that still can ring. Forget your perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen

Marco Baringer wrote:
Alberto Riva <ariva@ufl.edu> writes:
Hi,
I recently updated to the latest slime from CVS, and now every time I do a M-. I get an emacs message that says "Symbol's function definition is void: match-string-no-properties."
My emacs is XEmacs 21.4 (patch 15) (x86_64-redhat-linux, Mule). All help appreciated! Thanks,
does this patch help?
I haven't tested it yet, but I assume it would because it's equivalent to Nathan's suggestion, that works. Thanks! Alberto
------------------------------------------------------------------------
Index: slime.el =================================================================== RCS file: /project/slime/cvsroot/slime/slime.el,v retrieving revision 1.696 diff -u -r1.696 slime.el --- slime.el 5 Dec 2006 14:36:04 -0000 1.696 +++ slime.el 5 Dec 2006 21:37:26 -0000 @@ -2514,7 +2514,11 @@ (save-excursion (when (or (re-search-backward regexp nil t) (re-search-forward regexp nil t)) - (let ((string (match-string-no-properties 2))) + (let ((string (if (featurep 'xemacs) + (buffer-substring-no-properties + (match-beginning 2) + (match-end 2)) + (match-string-no-properties 2)))) (cond ((string-match "^\"" string) (ignore-errors (read string))) ((string-match "^#?:" string) (substring string (match-end 0))) (t string)))))))
------------------------------------------------------------------------
participants (4)
-
Alberto Riva
-
Didier Verna
-
Marco Baringer
-
Nathan Bird