From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-buffer))" error. Date: Thu, 16 Apr 2009 14:29:02 -0700 (PDT) Message-ID: <34120.128.165.123.18.1239917342.squirrel@webmail.lanl.gov> 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> <87ocv4flys.fsf@cyd.mit.edu> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1239917382 26177 80.91.229.12 (16 Apr 2009 21:29:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Apr 2009 21:29:42 +0000 (UTC) Cc: Chong Yidong , MON KEY , emacs-devel@gnu.org To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 16 23:31:01 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 1LuZAR-0004JJ-JP for ged-emacs-devel@m.gmane.org; Thu, 16 Apr 2009 23:30:43 +0200 Original-Received: from localhost ([127.0.0.1]:34506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuZ92-0004rd-SS for ged-emacs-devel@m.gmane.org; Thu, 16 Apr 2009 17:29:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuZ8y-0004rY-2d for emacs-devel@gnu.org; Thu, 16 Apr 2009 17:29:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuZ8s-0004rH-AI for emacs-devel@gnu.org; Thu, 16 Apr 2009 17:29:10 -0400 Original-Received: from [199.232.76.173] (port=49680 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuZ8s-0004rE-56 for emacs-devel@gnu.org; Thu, 16 Apr 2009 17:29:06 -0400 Original-Received: from proofpoint2.lanl.gov ([204.121.3.26]:35262) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LuZ8r-0004D0-N9 for emacs-devel@gnu.org; Thu, 16 Apr 2009 17:29:05 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id n3GLT2Ls008963; Thu, 16 Apr 2009 15:29:02 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 4F24E15041E; Thu, 16 Apr 2009 15:29:02 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 3ACE915041A; Thu, 16 Apr 2009 15:29:02 -0600 (MDT) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id 36D081518033; Thu, 16 Apr 2009 15:29:02 -0600 (MDT) Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Thu, 16 Apr 2009 14:29:02 -0700 (PDT) In-Reply-To: User-Agent: SquirrelMail/1.4.8-5.3.lanl2 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.7400:2.4.4, 1.2.40, 4.0.166 definitions=2009-04-16_08:2009-04-15, 2009-04-16, 2009-04-16 signatures=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:110314 Archived-At: >> 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.