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

verilog-mode specific faces? #1323

Closed
veripoolbot opened this issue Jul 8, 2018 · 1 comment
Closed

verilog-mode specific faces? #1323

veripoolbot opened this issue Jul 8, 2018 · 1 comment

Comments

@veripoolbot
Copy link
Collaborator


Author Name: David Rogoff
Original Redmine Issue: 1323 from https://www.veripool.org


Hi.

I was wondering if it would be difficult to add verilog-mode specific faces so that I could have different color/theme for those buffers. I see there's a few of these for verilog only things like p1800 keywords but most, like comment face, always use the standard comment face. I looked at verilog-mode.el but the face stuff is a bit beyond my understanding. If you could give me a simple example of one, e.g. verilog-mode-comment-face, I could extend it to the other faces.

I could just use this locally or submit it for the main trunk if you like. I'd think they would all default to just inheriting the common version of the face so that they work like they do now if not customized.

Thanks,

David

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-07-12T11:10:58Z


You mean you want e.g. a different comment face inside Verilog versus comments in other non-Verilog buffers? This isn't verilog-mode specific, it can be done without any verilog-mode changes. See https://emacs.stackexchange.com/questions/7281/how-to-modify-face-for-a-specific-buffer

To determine how to get the right face settings, in a verilog buffer, use M-x customize then Faces then whatever. Change it to what you want, then at top "apply and save". This will make a global change. Now go to your ~/.emacs or rc/.emacs and find something like this

(custom-set-faces
'(comment ((t (:foreground "magenta")))))

Change it to something like this

(add-hook 'verilog-mode-hook
       '(lambda ()
          (make-variable-buffer-local `face-remapping-alist)
          (face-remap-add-relative 'comment '(:foreground "magenta"))

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

No branches or pull requests

1 participant