emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
613 stars 160 forks source link

Symbol value of `font-lock-reference-face is void #1254

Closed ralmond closed 11 months ago

ralmond commented 1 year ago

When I open an Rd file, I get this error message, and the font-lock mode only partially works.

Symbol value is void font-lock-reference-face

This face does not appear in the list of customizable faces.

The in-code reference appears in line 155 of the file lisp/ess-rd.el. I'm guessing that the code needs to check for a binding for that variable and provide one if it does not exist.

Emacs-verison:  30.0.50 
ess-version: 18.10.3snapshot [elpa: 20230302.2111] 
ralmond commented 1 year ago

Adding the following lines to my .emacs seems to fix the problem.

(defvar font-lock-reference-face 'font-lock-reference-face
  "Face for references in an Rd file.")
(defface font-lock-reference-face
  '((default :inherit font-lock-keyword-face)
    (((class color) (background dark))
     (:foreground "lime green"))
    (((class color)) (background light) (:foreground "dark green")))
  "Face for references in an Rd file."
  :version "0.0")
yantar92 commented 11 months ago

font-lock-reference-face has been removed in Emacs 29 (it was previously obsolete). ess should use font-lock-constant-face instead.

mmaechler commented 11 months ago

Thank you, @yantar92 ! -- indeed that's much a smaller change -- as @ralmond mentions (above), it appears only once, so I've committed and pushed the obvious fix.

yantar92 commented 11 months ago

@mmaechler I generally recommend going through the byte-compilation warnings thrown by just released Emacs 29. It will help avoiding such problems in future.

HinTak commented 7 months ago

Just got this issue - fedora 39 ships emacs 29, and I have left over of older emacs ess . Btw, when is a release due?

HinTak commented 7 months ago

It has been 18.10.3snapshot for a few years now.