From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-buffer))" error. Date: Fri, 10 Apr 2009 13:38:19 -0400 Message-ID: <87ocv4flys.fsf@cyd.mit.edu> References: <50950.128.165.123.18.1239229924.squirrel@webmail.lanl.gov> <33049.128.165.123.18.1239290817.squirrel@webmail.lanl.gov> <33849.128.165.123.18.1239316978.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1239385013 11767 80.91.229.12 (10 Apr 2009 17:36:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Apr 2009 17:36:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: MON KEY Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 10 19:38:12 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LsKg7-0000bB-Uc for ged-emacs-devel@m.gmane.org; Fri, 10 Apr 2009 19:38:12 +0200 Original-Received: from localhost ([127.0.0.1]:52819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsKej-0008RU-FG for ged-emacs-devel@m.gmane.org; Fri, 10 Apr 2009 13:36:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsKef-0008QL-ML for emacs-devel@gnu.org; Fri, 10 Apr 2009 13:36:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsKeb-0008Fo-1E for emacs-devel@gnu.org; Fri, 10 Apr 2009 13:36:41 -0400 Original-Received: from [199.232.76.173] (port=35846 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsKea-0008Fe-Ue for emacs-devel@gnu.org; Fri, 10 Apr 2009 13:36:36 -0400 Original-Received: from cyd.mit.edu ([18.115.2.24]:54017) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsKea-00085d-OG for emacs-devel@gnu.org; Fri, 10 Apr 2009 13:36:36 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id B879457E255; Fri, 10 Apr 2009 13:38:19 -0400 (EDT) In-Reply-To: (MON KEY's message of "Fri, 10 Apr 2009 12:53:02 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110188 Archived-At: MON KEY 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.)