Emacs d-mode cannot handle backquoted backslashe

Russel Winder via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 12 15:53:10 PDT 2014


On Mon, 2014-08-04 at 12:25 +0000, Atila Neves via Digitalmars-d-learn
wrote:
> I took a look and I don't really know if it's possible without 
> using the Emacs > 24 only suggestion in the Stack Overflow 
> comment to your question.
> 
> As far as I can see, before that Emacs syntax tables have a 
> notion of what a string is and what an escape character is. The 
> d-mode code adds the backtick as an alternative to double and 
> single quotes but can't do anything about the backslash. Unless 
> it disables backslash as an escape character everywhere.
> 
> I tried setting backtick to a function that returns "\"" instead 
> of the value to see if I could then tailor the function to depend 
> on whether not the point was in a backtick string but that didn't 
> work since `modify-syntax-entry` checks to see if the argument is 
> a string.
> 
> BTW, python-mode has the same problem, I checked with r"\".

Per Nordlöw has offered a putative fix via a pull request. I'll check
out the claim and if it seems to be true (and I fully expect it to be
so) I'll accept the pull request. People using MELPA should see the new
package quite quickly.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140812/a88689af/attachment.sig>


More information about the Digitalmars-d-learn mailing list