Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Adjusting emacs color themes for cperl-mode

by Perlbotics (Archbishop)
on Sep 22, 2015 at 18:06 UTC ( [id://1142745]=note: print w/replies, xml ) Need Help??


in reply to Adjusting emacs color themes for cperl-mode

I had the same problem and used this snipped in my Emacs' config (you'll need to fine-tune the colours to meet your taste, though):

(eval-after-load 'cperl-mode '(progn ;;-- @LanX - not related to your question, but perhaps useful? ;; (define-key cperl-mode-map (kbd "RET") 'reindent-then-newline +-and-indent) ;; (define-key cperl-mode-map (kbd "C-M-h") 'backward-kill-word) ;; (define-key 'help-command "P" 'cperl-perldoc-at-point) ;; experiment: ;; (setq cperl-dark-background "gray14") (set-face-attribute 'cperl-array-face nil :foreground "#ffff88" ;; "yello +w3" "#ffff88" :background 'unspecified :weight 'normal :slant 'normal ) (set-face-attribute 'cperl-hash-face nil :foreground "#e08020" ;; "DarkO +range3" "#e080202 :background 'unspecified :weight 'normal :slant 'normal ) ))

The snipped above is an excerpt from my $HOME/.emacs.d/config/210-setup-cperl.el file that is part of my private Emacs configuration git repository.

It is based on the fine stuff, I've found here: https://github.com/targzeta/emacs-modular-configuration and here: http://whattheemacsd.com

Replies are listed 'Best First'.
Re^2: Adjusting emacs color themes for cperl-mode
by LanX (Saint) on Sep 24, 2015 at 11:01 UTC
    Thanks!

    But my problem was rather that I wanted to have a generic solution which works with all themes which forgot to define the cperl-hash and array face. (some do)

    ATM I'm using M-x customize-face ² to derive array and hash face from the normal variable face.

    Customize face (default `all faces'): cperl-array-face

    Operate on all settings in this buffer: [Revert]... [Apply] [Apply and Save] Hide Cperl Array Face:[sample] State : EDITED, shown value does not take effect until you set or +save it. Font Lock mode face used to highlight array names. INS DEL Display: all [X] Weight: bold [X] Slant: italic [X] Inherit: [INS] [DEL] Face: font-lock-variable-name-face Show All Attributes INS
    (Note: Display:All is important)

    after hitting "Apply and Save" this will be executed at the end of all my configs.

    Seems to work well ATM and I don't need to fiddle with elisp... ;-)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

    ²) or click Options -> Customize Emacs -> Specific Face

    update

    that's the generated lisp code which "customize" wrote into my init.el

    (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:family "Courier New" :foundry "outline" :slant normal + :weight bold :height 113 :width normal)))) '(cperl-array-face ((t (:inherit font-lock-variable-name-face :slant +italic :weight bold)))) '(cperl-hash-face ((t (:inherit font-lock-variable-name-face :slant i +talic :weight bold)))))

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1142745]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-25 20:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found