bug#81638: 32.0.50; flyspell-prog-text-faces type and semantics
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
>> > And if all of the above is not enough, and you still insist, I could >> > agree to adding nil to the valid values (but then please suggest a >> > suitable :tag), >> BTW, there can be other good reasons to use a value not covered by the >> current `:type`, e.g. it can make a lot of sense to put `sh-heredoc` or >> `perl-heredoc` in there. > AFAIU, those are not normally human-readable text, so I'm not sure > what sense you are seeing in doing that. I'd be surprised if I'm the only one who has shell scripts where heredocs contain natural language text. I agree it might not be desirable to add those elements globally, but they do make sense file-locally. [ BTW, another face I've seen used in there is things like `font-lock-function-name-face` so as to spell check identifier names at the point where they're chosen but not when merely referring to a function defined elsewhere (where presumably the compiler will detect typos). ] >> >> But I wonder if we should, in addition, generalize >> >> `flyspell-generic-progmode-verify' so that members of >> >> `flyspell-prog-text-faces' are allowed to be functions (test >> >> predicates). >> > If you want to do that, it is better (and easier) to override >> > flyspell-generic-progmode-verify with your own function. >> You mean set `flyspell-generic-check-word-predicate`? > That's one way, yes. But if someone wants to use flyspell-prog-mode, > the variable is already set. `flyspell-prog-mode` doesn't do anything else than set `flyspell-generic-check-word-predicate`, so if you want a different predicate you're better off using `flyspell-mode`, indeed. === Stefan