bug#81638: 32.0.50; flyspell-prog-text-faces type and semantics

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Hello,

when editing .tex files having nil in `flyspell-prog-text-faces' is
useful (even necessary) for flyspell-prog-mode doing its job.

But when using `setopt' (via file variable!) Emacs barfs about the type
not matching.  The type spec of the option is much too restrictive IMO:

#+begin_src emacs-lisp
(defcustom flyspell-prog-text-faces
  '(font-lock-string-face font-lock-comment-face font-lock-doc-face)
  "Faces corresponding to text in programming-mode buffers."
  :type '(set (const font-lock-string-face)
              (const font-lock-comment-face)
              (const font-lock-doc-face))
  :version "28.1")
#+end_src

It limits the value to a subset of three given hardcoded builtin faces.

At least we should allow any valid result of `get-text-property' that is
symbolp, including nil.

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).



Michael.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.