Subject: bug#358: dabbrev-abbrev-char-regexp

From: Glenn Morris <[email-masked]>
Date: Wed, 22 Oct 2008 21:28:31 -0400

After looking at this again, there's still no difference between nil
and \\sw\\|\\s- AFAICS, but now dabbrev--abbrev-at-point makes little
sense to me:

emacs -Q --eval '(setq dabbrev-abbrev-char-regexp "\\sw")'

in scratch:

yes-or-no---

followed by M-/ gives

"No dynamic expansion for `no---' found". Obviously, "---" are not
word constituents, yet they are included in the abbrev, in flat
contradiction to the doc-string of dabbrev-abbrev-char-regexp:

    if you set this variable to "\\sw", then expanding `yes-or-no-'
    signals an error because `-' is not part of a word

This is caused by dabbrev--abbrev-at-point's:

    ;; If we aren't right after an abbreviation,
    ;; move point back to just after one.
    ;; This is so the user can get successive words
    ;; by typing the punctuation followed by M-/.