[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Emacs lisp question
From: |
Drew Adams |
Subject: |
RE: Emacs lisp question |
Date: |
Sun, 6 Feb 2011 17:05:31 -0800 |
> (setq-default cursor-type '(bar . bk-preferred-caret-width))
> bk-preferred-caret-width is a defcustom variable with a
> default value of 2.
>
> Unfortunately this does not have the desired effect.
> However, the following does work.
> (setq-default cursor-type '(bar . 2))
>
> Can anyone suggest how I might get this to work?
Change
'(bar . bk-preferred-caret-width) to
`(bar . ,bk-preferred-caret-width)
The latter is the same as
(cons 'bar bk-preferred-caret-width), which you can also use if you prefer.
Simply quoting the cons cell
(bar . bk-preferred-caret-width)
evaluates to that cons cell itself. And that cons cell has a car of `bar' and a
cdr that is the symbol `bk-preferred-caret-width'.