Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-function-call face does not inherit from font-lock-function-call-face #782

Open
bricka opened this issue Jun 19, 2024 · 2 comments
Open

Comments

@bricka
Copy link
Contributor

bricka commented Jun 19, 2024

https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html#index-font_002dlock_002dfunction_002dcall_002dface

As far as I can tell, this face was added in Emacs 29.1, so it's pretty new :).

In an Emacs version with this face, we get nicer highlighting :).

I'm happy to put up an MR, but I'm not sure how we go about supporting different versions of Emacs. If I just inherit from this, will it "Just Work" in older versions of Emacs? Or do I need to do something special here?

@zonuexe
Copy link
Member

zonuexe commented Jun 19, 2024

@bricka Thanks for the suggestion!

Please refer to the php-doc-annotation-tag face, but in older Emacs versions, that face inherits nil, so you can use when instead of if.

@zonuexe
Copy link
Member

zonuexe commented Jun 19, 2024

Sorry, this face doesn't have a corresponding variable, so this code doesn't make sense. Instead, check with the following expression:

(when (get 'font-lock-function-call-face 'face-defface-spec)
  ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants