On Sun, Feb 6, 2011 at 7:05 PM, Drew Adams
<drew.adams@oracle.com> wrote:
> (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'.