From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: exposing the effective mode in a multi-mode Date: Tue, 19 Sep 2017 22:18:28 -0600 Message-ID: <87lgla9f57.fsf@tromey.com> References: <874ls0c40s.fsf@tromey.com> <7db25c04-9899-605a-e349-016b2a78d92e@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505881175 2093 195.159.176.226 (20 Sep 2017 04:19:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Sep 2017 04:19:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Tom Tromey , Emacs discussions To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 20 06:19:29 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duWTw-0000G1-Rt for ged-emacs-devel@m.gmane.org; Wed, 20 Sep 2017 06:19:29 +0200 Original-Received: from localhost ([::1]:46594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duWU4-0000uO-9C for ged-emacs-devel@m.gmane.org; Wed, 20 Sep 2017 00:19:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duWTU-0000u9-F5 for emacs-devel@gnu.org; Wed, 20 Sep 2017 00:19:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duWTR-0004VV-8y for emacs-devel@gnu.org; Wed, 20 Sep 2017 00:19:00 -0400 Original-Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:46454) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duWTQ-000364-VR for emacs-devel@gnu.org; Wed, 20 Sep 2017 00:18:57 -0400 Original-Received: from cmgw4 (unknown [10.0.90.85]) by gproxy9.mail.unifiedlayer.com (Postfix) with ESMTP id 1B8551E074C for ; Tue, 19 Sep 2017 22:18:34 -0600 (MDT) Original-Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id BgJW1w01m2f2jeq01gJZvA; Tue, 19 Sep 2017 22:18:34 -0600 X-Authority-Analysis: v=2.2 cv=OZLoNlbY c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=2JCJgTwv5E4A:10 a=vaJtXVxTAAAA:8 a=cdo92qZq5Q3mz8abb_sA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nBnnmvf/mw3xJkCDBv/q1QB57gQUc6CroPIh1kle3BM=; b=CPn7Alsh5LnUSEPYA9p8WeG5AY 4Nbndx9Q7JYEM87xYa6RDwKiwXpr50DOg0BDtkCvioLu0WUzmnMdS7ZZSeb/4gFlMbmAX09dZ2eI0 mPOyu3QNkex8EB1qYUD1cVHw8; Original-Received: from 75-166-76-94.hlrn.qwest.net ([75.166.76.94]:34654 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1duWT0-0042KQ-9G; Tue, 19 Sep 2017 22:18:30 -0600 X-Attribution: Tom In-Reply-To: <7db25c04-9899-605a-e349-016b2a78d92e@yandex.ru> (Dmitry Gutov's message of "Mon, 18 Sep 2017 12:01:09 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.76.94 X-Exim-ID: 1duWT0-0042KQ-9G X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-76-94.hlrn.qwest.net (bapiya) [75.166.76.94]:34654 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 69.89.20.122 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218563 Archived-At: >>>>> "Dmitry" == Dmitry Gutov writes: Dmitry> So I thought it might be useful to return the name of the language Dmitry> instead of the mode. The default implementation could look like this: Are there modes that can adapt to multiple different major modes for language, but without knowing the details of the major mode? I don't know but it seems iffy to me. Dmitry> Can it return nil? When? Copy-paste bug, I've fixed the comment. Thanks. Tom