[slime-devel] Fix for missing find-coding-system

James McIlree ovrskeek at mac.com
Sun Apr 3 06:08:28 UTC 2005


> Nathan Froyd <froydnj <at> cs.rice.edu> writes:
>
> > I'm running XEmacs 21.4.15 on OS X 10.3.8.  I just updated my Slime
> > to the newest, shiniest CVS version (from 1.0 or so), only to find 
> out
> > that it won't work with my XEmacs.  Near as I can tell, it's because
> > my XEmacs isn't MULE-ized ({make,find}-coding-system do not exist) 
> and
> > Slime really wants MULE or some semblance thereof to operate.  I
> > assume then that Slime does not support non-MULE emacsen...is this a
> > correct assumption?
>
> The assumption is correct, but it's not much work to remove any
> dependency on those functions.  It should suffice, to provide dummy
> functions for find-coding-system and check-coding-system which return
> true for 'binary, and maybe a (if (fboundp 'set-process-coding-system))
> in slime-open-stream-to-lisp.
>
> I can't try a non-mule version myself, because the Debian "nomule"
> versions still have find-coding-system.  Also, if I configure CVS
> XEmacs with --disable-mule, I still get find-coding-system as a
> built-in function.
>
> Helmut.


	I ran exactly the same problem yesterday.

	After some experimentation, I found that xemacs 21.4.17 (latest stable)
also does not define find-coding-system. When I built 21.4.17 with mule
enabled, something in the font system became confused, making that an
unpleasant fix.

	Xemacs 21.5.20 (beta) does define find-coding-system by default. To
build on OS X, you need to specify --without-ldap to configure.

	I decided to stick with 21.4, and hacked the suggested diffs into
slime.el. I'm a novice lisp coder, and a total novice to SLIME coding,
so please feel free to change as needed to conform to good coding and
style standards!

	I've tested with ACL & SBCL on OS X 10.3.8, and things started up
and minimally worked without trouble.

	James McIlree

diff -r1.478 slime.el
1491a1492,1507
 > (if (not (fboundp 'find-coding-system))
 >     (defun find-coding-system (coding-system)
 >       (if (eq coding-system 'binary)
 >           coding-system
 >         nil)))
 >
 > (if (not (fboundp 'check-coding-system))
 >     (defun check-coding-system (coding-system)
 >       (if (eq coding-system 'binary)
 >           coding-system
 >         nil)))
 >
 > (if (not (fboundp 'process-coding-system))
 >     (defun process-coding-system (unused-and-ignored)
 >       '(binary . binary)))
 >
2481,2483c2497,2500
<     (set-process-coding-system stream
<                                slime-net-coding-system
<                                slime-net-coding-system)
---
 >     (when (fboundp 'set-process-coding-system)
 >       (set-process-coding-system stream
 >                                  slime-net-coding-system
 >                                  slime-net-coding-system))




More information about the slime-devel mailing list