When writing a muse file it always annoyed me when I have written (for example) a-really-long-variable
somewhere else in the file and then when I type =a-rea
and press M-/
it fails to expand.
The way to fix this behaviour is by setting dabbrev-abbrev-skip-leading-regexp
(setq dabbrev-abbrev-skip-leading-regexp "[=*]")
(Edit: fixed the first regex per Billy’s comment below. Thanks)
Okay, you think, this doesn’t affect me – I don’t use muse (why not?) How about if you’re writing some html/xml.
(setq dabbrev-abbrev-skip-leading-regexp "[^ ]*[<>=*]")
Now <strong>long-word-
completes as you would expect.
There is also dabbrev-abbrev-char-regexp
if you want even more control over what should be considered a match.
Also, I’m no longer using autocomplete as I find vanilla dabbrev nicer to use.