GNU bug report logs -
#67390
28; shorthands-font-lock-shorthands assumes shorthand uses same separator
Previous Next
Full log
View this message in rfc822 format
Hello,
`shorthands-font-lock-shorthands' assumes that the shorthand uses the
same separator as the real symbol name, e.g., "s-" instead of "long-".
This causes an additional character to be highlighted when an
alternative separator is used, e.g., when using "s/" instead of "long-".
`shorthands--mismatch-from-end' returns the length of the common suffix,
of the shorthand and the long name.
(shorthands--mismatch-from-end "s-tail" "long-tail") => 5
"s-" is highlighted in this case.
Since `shorthands-font-lock-shorthands' also wants to highlight the
separator, "-" in this case, it corrects this off-by-one, but when
different separators are in use, this causes an additional character
to be highlighted
(shorthands--mismatch-from-end "s/tail" "long-tail") => 4
"s/t" is highlighted in this case.
Could we add support for using an alternative separator in shorthands?
IMO it is okay to use another separator for *shorthand* prefixes. They
won't show up in M-x completion candidates, for example. Shorthands are
confined to the file where they are being used, and I think authors
should be free to use whatever prefix they fancy.
Cheers,
Jonas
This bug report was last modified 1 year and 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.