There's an issue with slime-search-property and xemacs. In xemacs, next-single-char-property-change returns nil if the property is not found instead of the end of the object as in emacs. This problem shows up when you're using M-p/M-n to find the next compiler note/warning in the source code. We get an error about (goto-char nil) when the last note is found.
Here is small patch to slime-search-property so that it works with xemacs. I was not sure what the best approach would be for this, so I'm sending the patch.
Ray
--- slime.el 04 Feb 2011 09:26:36 -0500 1.1355 +++ slime.el 08 Feb 2011 22:46:17 -0500 @@ -4834,9 +4834,17 @@ Return the value of PROP. If BACKWARD is non-nil, search backward. If PROP-VALUE-FN is non-nil use it to extract PROP's value." - (let ((next-candidate (if backward + (let ((next-candidate (if (featurep 'xemacs) + (if backward + #'(lambda (pos prop) + (or (previous-single-char-property-change pos prop) + (point-max))) + #'(lambda (pos prop) + (or (next-single-char-property-change pos prop) + (point-max)))) + (if backward #'previous-single-char-property-change - #'next-single-char-property-change)) + #'next-single-char-property-change))) (prop-value-fn (or prop-value-fn (lambda () (get-text-property (point) prop))))
* Raymond Toy [2011-02-09 03:57] writes:
There's an issue with slime-search-property and xemacs. In xemacs, next-single-char-property-change returns nil if the property is not found instead of the end of the object as in emacs. This problem shows up when you're using M-p/M-n to find the next compiler note/warning in the source code. We get an error about (goto-char nil) when the last note is found.
I can't reproduce this in Xemacs 21.4 (patch 22). I see some oddness not reliably and never (goto-char nil). Do you have an example?
Helmut
On 2/9/11 1:28 PM, Helmut Eller wrote:
- Raymond Toy [2011-02-09 03:57] writes:
There's an issue with slime-search-property and xemacs. In xemacs, next-single-char-property-change returns nil if the property is not found instead of the end of the object as in emacs. This problem shows up when you're using M-p/M-n to find the next compiler note/warning in the source code. We get an error about (goto-char nil) when the last note is found.
I can't reproduce this in Xemacs 21.4 (patch 22). I see some oddness not reliably and never (goto-char nil). Do you have an example?
Hmm. I'm using 21.5b39. Perhaps it's a bug/difference between 21.4 and 21.5? I'll investigate this a bit more and if it's not a bug in 21.5, I'll see if I can get an example for you.
Ray
On 2/9/11 1:28 PM, Helmut Eller wrote:
- Raymond Toy [2011-02-09 03:57] writes:
There's an issue with slime-search-property and xemacs. In xemacs, next-single-char-property-change returns nil if the property is not found instead of the end of the object as in emacs. This problem shows up when you're using M-p/M-n to find the next compiler note/warning in the source code. We get an error about (goto-char nil) when the last note is found.
I can't reproduce this in Xemacs 21.4 (patch 22). I see some oddness not reliably and never (goto-char nil). Do you have an example?
Found the reason. XEmacs 21.4 doesn't have next-single-char-property-change, so slime defines it's own version. XEmacs 21.5 has this, so slime uses the XEmacs version.
I will have to ask the xemacs guys if this is a bug in 21.5.
Ray
On 2/10/11 10:01 AM, Raymond Toy wrote:
I will have to ask the xemacs guys if this is a bug in 21.5.
No conclusion. The difference was not intentional, but now that I've raised the question, there is some discussion on why it should return the end of the object if there are no more changes. This also raised the issue of what the right thing would be for both emacs and xemacs for next-single-char-property-change.
So, as far as I'm concerned, this issue is dead until the emacs and xemacs figure out what to do. I will continue to use my hack because I can't live without slime. (Or just use the definition already included in slime for xemacs 21.4.)
Ray