[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-bu
From: |
Chong Yidong |
Subject: |
Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-buffer))" error. |
Date: |
Fri, 10 Apr 2009 13:38:19 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
MON KEY <address@hidden> writes:
>> If you need to detect (and not just suppress) longlines-mode without
>> having to load it, you can do bound-and-true-p 'longlines-mode)
This should be (bound-and-true-p longlines-mode), because the
bound-and-true-p macro treats its VAR argument like setq; it is a macro,
not an ordinary Lisp function. Its docstring needs to be
corrected---I'll do this once I when I get the chance.
> Which leads me to suspect that I went down this route at some point in
> the past found there were 'issues' with qouting around longlines-mode
> with regards symbol vs. variable state and _might_ explain my funky
> quoting.
It sounds like you have some confusions about the difference between a
symbol and a variable. I suggest reading the first few chapters of the
Emacs Lisp reference manual, which explains this topic carefully.
> What prob. will work is to test if symbol both symbol _and_ var are
> available:
>
> (and (boundp 'longlines-mode) (bound-and-true-p longlines-mode))
It's not necessary to use bound-and-true-p here.
(bound-and-true-p longlines-mode)
is _exactly_ the same as
(and (boundp 'longlines-mode) longlines-mode)
(That's simply how the bound-and-true-p macro is defined.)