Emacs d-mode cannot handle backquoted backslashe

Russel Winder via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 31 02:20:07 PDT 2014


On Thu, 2014-07-31 at 08:40 +0000, "Nordlöw" via Digitalmars-d-learn
wrote:
> Currently Emacs d-mode cannot correctly highlight
> 
> `\`
> 
> because it doesn't understand that single backslashes are 
> self-contained in back-quoted strings.
> 
> I believe this extract from d-mode.el
> 
> (defvar d-mode-syntax-table nil
>    "Syntax table used in d-mode buffers.")
> (or d-mode-syntax-table
>      (setq d-mode-syntax-table
> 	 (let ((table (funcall (c-lang-const c-make-mode-syntax-table 
> d))))
> 	   ;; Make it recognize D `backquote strings`
> 	   (modify-syntax-entry ?` "\"" table)
> 
> 	   ;; Make it recognize D's nested /+ +/ comments
> 	   (modify-syntax-entry ?+  ". 23n"   table)
> 	   table)))
> 
> is highly related to this problem but I don't understand the 
> comment
> 
> 	   ;; Make it recognize D `backquote strings`

I think it is trying to convert ` to " internally since "…" is the
string form for font-lock. Just at first sight I don't fully understand
what is going on… :-( 

> Ideas on how to fix this anyone?

Not just at the moment I'm afraid. I'll try and take a look at it
tomorrow.

-- 
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/20140731/e18fd78f/attachment.sig>


More information about the Digitalmars-d-learn mailing list