[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nXML mode word separators
From: |
Robert Pluim |
Subject: |
Re: nXML mode word separators |
Date: |
Thu, 07 Feb 2019 16:23:12 +0100 |
Skip Montanaro <skip.montanaro@gmail.com> writes:
> I unfortunately have to work with handwritten XML which is used to
> define complex application configs. In that context, apostrophes are
> valid string delimiters, at least in whatever XML pseudo-dialect these
> files are written in. So, both of these snippets mean the same thing:
>
> <Env INST="2" />
> <Env INST='2' />
>
> I'm not in any sort of position to dictate any changes, so I need to
> adapt. So, forward-word currently skips over apostrophes (considering
> them word characters) and kill-word (even worse) deletes them. It has
> probably been a decade since I fiddled with syntax tables. How do I
> move apostrophes from word class to quotation(?) class in the relevant
> syntax table? FWIW, when editing XML files I seem to be in nxml-mode
> (nothing I enabled specifically, must just be the default mode).
>
(add-hook 'nxml-mode-hook
(lambda ()
(modify-syntax-entry ?' "\"")))
Robert