retitle 972885 Lexical binding causes regression for gnus-summary-highlight thanks
The problem appears to be due to the (presumably recent) use of lexical binding in /usr/share/emacs/27.1/lisp/gnus/gnus-sum.el.gz (cf. lexical-binding:t on the first line). It is triggered by this piece of configuration from my .gnus.el: (eval-after-load "gnus-sum" '(add-to-list 'gnus-summary-highlight '((memq article gnus-newsgroup-processable) . flo-gnus-summary-processable-face))) This code nicely highlights lines in the *Summary* buffer corresponding to articles that have the process mark set. It has worked perfectly for years until the aforementioned Emacs upgrade. The problem can be solved either by me not using the above configuration bit anymore (which is of course a regression), or by making the `article' variable use dynamic binding before the failing `funcall' in `gnus-summary-highlight-line' (see the attached patch; the change could probably be done earlier in the function, along with the other similar defvar's, but I've only tested the attached patch). Regards -- Florent
--- patch/gnus-sum.el.orig 2020-10-26 02:19:24.938566201 +0100 +++ patch/gnus-sum.el 2020-10-26 02:20:18.062310644 +0100 @@ -12834,6 +12834,7 @@ (uncached (and gnus-summary-use-undownloaded-faces (memq article gnus-newsgroup-undownloaded) (not (memq article gnus-newsgroup-cached))))) + (defvar article) (let ((face (funcall (gnus-summary-highlight-line-0)))) (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face)) (gnus-put-text-property-excluding-characters-with-faces