[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-b
From: |
Davis Herring |
Subject: |
Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-buffer))" error. |
Date: |
Thu, 16 Apr 2009 14:29:02 -0700 (PDT) |
User-agent: |
SquirrelMail/1.4.8-5.3.lanl2 |
>> 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.
>
> It's too bad: it should have been a function, but it's a bit late to fix
> it now.
My apologies for, in a message meant to educate about the vagaries of
quoting, not noticing that it was a macro. On the subject of having it be
a function, it wouldn't be too horrible to provide a function also: I
would suggest the name `symbol-value-safe' (in line with `car-safe'). I
have this function defined as
(defun symbol-value-safe (symbol &optional def)
"Return SYMBOL's value, or DEF if that is void."
(if (boundp symbol) (symbol-value symbol) def))
One use of the default is for cross-version compatibility:
(symbol-value-safe 'eval-expression-print-length 12) ; for Emacs 20
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
- Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-buffer))" error., (continued)