From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.devel Subject: Re: with a fresh emacs "(buffer-local-value fundamental-mode (current-buffer))" error. Date: Wed, 8 Apr 2009 22:22:28 -0400 Message-ID: References: <49DD2215.2050306@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1239243775 30832 80.91.229.12 (9 Apr 2009 02:22:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Apr 2009 02:22:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 09 04:24:13 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 1Lrjw2-0002QT-GP for ged-emacs-devel@m.gmane.org; Thu, 09 Apr 2009 04:24:10 +0200 Original-Received: from localhost ([127.0.0.1]:54623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lrjud-0007Jq-Ee for ged-emacs-devel@m.gmane.org; Wed, 08 Apr 2009 22:22:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrjuY-0007Jl-A9 for emacs-devel@gnu.org; Wed, 08 Apr 2009 22:22:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrjuS-0007JZ-Sr for emacs-devel@gnu.org; Wed, 08 Apr 2009 22:22:37 -0400 Original-Received: from [199.232.76.173] (port=44547 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrjuS-0007JW-Mo for emacs-devel@gnu.org; Wed, 08 Apr 2009 22:22:32 -0400 Original-Received: from mail-gx0-f208.google.com ([209.85.217.208]:49828) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrjuQ-000604-Ou; Wed, 08 Apr 2009 22:22:30 -0400 Original-Received: by gxk4 with SMTP id 4so1028370gxk.18 for ; Wed, 08 Apr 2009 19:22:29 -0700 (PDT) Original-Received: by 10.150.192.4 with SMTP id p4mr3663602ybf.44.1239243748952; Wed, 08 Apr 2009 19:22:28 -0700 (PDT) In-Reply-To: <49DD2215.2050306@gnu.org> X-Google-Sender-Auth: 3d7a979ca318f56a X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:110156 Archived-At: > > Not a bug, there is no variable by that name. > Why not? (local-variable-if-set-p 'major-mode) => t (eq major-mode 'fundamental-mode) => t (equal major-mode 'fundamental-mode) => t (symbol-value 'major-mode) => fundamental-mode (assoc-default 'major-mode (buffer-local-variables)) => fundamental-mode On Wed, Apr 8, 2009 at 6:15 PM, Jason Rumney wrote: > MON KEY wrote: >> >> Is this a bug, or am I missing something? >> >> (buffer-local-value fundamental-mode (current-buffer)) >> >> throws an error > > Not a bug, there is no variable by that name. > >> This behavior happens with minor and major modes. >> > > As you observed with longlines-mode, it does not happen with minor-mode > variables once they have been loaded and the variable is known to Emacs. > >