help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing perl array face [cperl-mode]


From: John Mastro
Subject: Re: Customizing perl array face [cperl-mode]
Date: Mon, 10 Apr 2017 10:21:48 -0700

To:
Subject:
From: John Mastro <jbm@jbm.io>
--text follows this line--

khalil zakaria Zemmoura <zemmoura.khalil@gmail.com> wrote:
> I would like to get rid of the array highlight of the array in Cperl mode,
> Since i am a begginer in lisp i give you the code that customize the array
> face and what i did to solve my problème tomporeraly:

[snip]

> when using the easy customization interface here what was added to my
> init.el
>
> (custom-set-faces
>  '(cperl-array-face ((t (:foreground "yellow" :weight bold)))))
>
> when i copy this (cperl-array-face ((t (:foreground "yellow" :weight
> bold)))) in my custominit.org and erase that cusom-set -face part, it don't
> work.
> I was wondering why this code works only under (custom-set-face)?

`custom-set-faces' is a function that applies a list of face specs. And
this:

    (cperl-array-face ((t (:foreground "yellow" :weight bold))))

is a face spec, where `cperl-array-face' is the name of the face and the
rest specifies how that face will look. The face spec is data (a list),
it doesn't do anything on its own. That's why it's quoted.

> Witout using the easy customization interface, I ended setting the
> cperl-dark-background to nil that way:
> (cperl-dark-background nil)

That doesn't seem right. The expression (cperl-dark-background nil) by
itself would call a function `cperl-dark-background' with the argument
nil, which won't work as there is no such function
`cperl-dark-background'. It's a variable, so you would use something
like (custom-set-variables '(cperl-dark-background nil)) or
(setq cperl-dark-foreground nil).

        John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]