From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Hook doesn't run as expected, if buffer mode is set from major-mode Date: Fri, 8 Jan 2016 13:20:54 -0800 (PST) Message-ID: <842b6bc4-5c24-462c-ac00-dce675f40cef@default> References: <87h9in4zee.fsf@linux-qg7d.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1452288088 11688 80.91.229.3 (8 Jan 2016 21:21:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jan 2016 21:21:28 +0000 (UTC) To: Rolf Ade , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 08 22:21:16 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aHeTD-0007nw-0i for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jan 2016 22:21:15 +0100 Original-Received: from localhost ([::1]:38155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHeTC-00007l-8G for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jan 2016 16:21:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHeT1-00007c-ON for help-gnu-emacs@gnu.org; Fri, 08 Jan 2016 16:21:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHeSy-0000LX-GK for help-gnu-emacs@gnu.org; Fri, 08 Jan 2016 16:21:03 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:22562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHeSy-0000LS-9U for help-gnu-emacs@gnu.org; Fri, 08 Jan 2016 16:21:00 -0500 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u08LKvRT024070 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 8 Jan 2016 21:20:57 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u08LKtmg021149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 8 Jan 2016 21:20:56 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u08LKtdq018125; Fri, 8 Jan 2016 21:20:55 GMT In-Reply-To: <87h9in4zee.fsf@linux-qg7d.fritz.box> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108661 Archived-At: > If the major mode of a new buffer is determined by the variable > major-mode (nothing from auto-mode-alist et. al matches), then the hooks > of that major mode doesn't run, as I expect. `major-mode' is a buffer-local variable. It is set by the newly current major mode. IOW, you cannot use it to set the mode, as the mode sets it.