[slime-devel] meta-. off by several lines on SLIME/ACL/Emacs/Windows, anyone seen this?
acelent at gmail.com
Fri Oct 28 02:33:53 PDT 2011
2011/10/27 Mark H. David:
> Yes, that worked. Thanks.
> Any thoughts on a real solution?
> I should add that I'm also using Swank to talk to ACL in a different process.
> Maybe that's always how you do SLIME with ACL, I'm kinda new at this.
> But anyhow, I don't usually use Swank with the other Lisps (SBCL, CCL), so I guess that's another difference.
A solution that allows you to work with several implementations
simultaneously can go through inspecting which is the implementation
of the current connection. I have advised `slime-eol-conversion-fixup'
in Emacs to do this, it does the job:
(defadvice slime-eol-conversion-fixup (around sc-eol-fixup-acl>=8.1 activate)
(if (and (not (boundp 'notes)) ; compilation notes
(string-equal "allegro" (slime-lisp-implementation-name))
(>= (string-to-number (slime-lisp-implementation-version)) 8.1))
(setq ad-return-value 0)
However, I don't like the idea of having implementation-specific code
in Slime (Emacs side), directly or indirectly. Moreover, there's that
(boundp 'notes) hack (it's actually just a normal bound variable
somewhere up the stack...), because somehow compiler notes still count
CRLF ends-of-line as 2 instead of 1.
A real solution could be aiding the fixup with Swank, such as
appending a value to the xref result(s), compiler notes and everywhere
else with a file reference, indicating if CRLF files should count
ends-of-line as 2. For instance, ACL >= 8.1 would say CRLF
ends-of-line are 1 when returning xref's but it would say EOL's are 2
when returning compiler notes.
More information about the slime-devel