From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Add a separate mode for .dir-locals.el Date: Thu, 17 Oct 2019 09:51:45 -0400 Message-ID: References: <2058328b-aee5-8cb1-2659-a793e1354517@mit.edu> <87wod4m7sr.fsf@gnus.org> <835zkndcz4.fsf@gnu.org> <83ftjrbjhm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="28297"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 17 16:56:36 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iL7Ce-00075R-93 for ged-emacs-devel@m.gmane.org; Thu, 17 Oct 2019 16:56:36 +0200 Original-Received: from localhost ([::1]:49952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL7Cc-0004Ch-Ki for ged-emacs-devel@m.gmane.org; Thu, 17 Oct 2019 10:56:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40432) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL6Bx-000816-CI for emacs-devel@gnu.org; Thu, 17 Oct 2019 09:51:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL6Bw-0003NG-CI for emacs-devel@gnu.org; Thu, 17 Oct 2019 09:51:49 -0400 Original-Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:43430) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL6Bw-0003Mx-6c; Thu, 17 Oct 2019 09:51:48 -0400 Original-Received: by mail-qt1-x82a.google.com with SMTP id t20so3617617qtr.10; Thu, 17 Oct 2019 06:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=MHDFwpKgFD6ZLgQCRhoDS2REHv1QYfqyDlVss2ZoeaQ=; b=cQG11szAOdYzjOaAigctPQpYK6qAicecNjseOv9dCOdSQ6z76NCXY4jvxpWUAjADrj LAt5pbs0QVp3VLM3SCEcErMnsDk0vYkMu0b6637yukkjGgGK1bkeG+/FLwFWOsOdtrI3 k4CGKjQnLeB6z7mH/+UbJAbNB/u3W/zNnohEKIf3KkJ5R28Ah6nSbAwxVdlGcoPvdrok l8jGQnEgCeBt0FhcA0SSL1HDM+EwXshavNMCkGb23S2afb9xfQ+L0zfripU1mrd2YXsU ReNa0lK8f/ebpembTEWJiFSv6LCiMC5VA7SOreKg7V654oDEDKQmfaBytLk3uWFcWBzK Wjig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MHDFwpKgFD6ZLgQCRhoDS2REHv1QYfqyDlVss2ZoeaQ=; b=uHle29fBhtD0E9xjLzzTiGaHXR14IXssJjULdFuqglkrEZQhkkcJrWnhZs9V5dS5My SMlvezeWb2ivWm3ldHohSKxJ2czWA1il4qnQ8OXWLZnvuI8e8fVweTeTTVOgj8XXjlYa vq+PY7JbQLt0/3OQPF5H73xuLTnxKJ07+LudgPz2kmtMno9tpIPWh3mAQ601BYtoWEh/ W7WCSGcCxctXuNi1SYSVmGERPhEQicbKCymrWUeP8jCYvpG87VjvINcVZ78EhD9zWhQ1 gQmVG/P5ayBJUsmbzkOs2GzlsMTsfZX88GnSIWFszZWTQw3mQcmwfjIuh8EsOZ9/S3v7 HXTw== X-Gm-Message-State: APjAAAXWjThx3al/R+8M6ROFIwNBkuAn2b/J+lX5EnWeOZt2uEY28Geb dYNImHtsn6cANG0dGqqs9XCUJWd8 X-Google-Smtp-Source: APXvYqz31c2+x2O583OFYKDxu35wY21eyeqX66p5sfi2CAUnTWK9ZpyUp21rm9zn295bs36xOZpC/A== X-Received: by 2002:a05:6214:851:: with SMTP id dg17mr3840518qvb.249.1571320307407; Thu, 17 Oct 2019 06:51:47 -0700 (PDT) Original-Received: from [128.30.9.205] (30-9-205.wireless.csail.mit.edu. [128.30.9.205]) by smtp.googlemail.com with ESMTPSA id v12sm2329928qtb.5.2019.10.17.06.51.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Oct 2019 06:51:46 -0700 (PDT) In-Reply-To: <83ftjrbjhm.fsf@gnu.org> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:241139 Archived-At: On 2019-10-17 09:16, Eli Zaretskii wrote: >> From: João Távora >> Date: Thu, 17 Oct 2019 13:21:37 +0100 >> Cc: emacs-devel@gnu.org >> >> I don't know who proposed it, or what it meant exactly, but solving this >> in Flymake directly sounds like hack. > > Why is that a hack? Flymake in ELisp mode is configured from emacs-lisp-mode, by adding two checkers to flymake-diagnostic-functions. We could change that code to only add the hooks if the file name is not .dir-locals.el, but that seems less clean than creating a separate mode for .dir-locals.el files, since they aren't proper Emacs Lisp files. > Shouldn't Flymake "understand" the file it is > working on, including its syntax etc.? In general, at least in Flycheck, we try to restrict that understanding to looking at which major-mode we are currently in (there are a few exceptions, like in sh-mode, where we look at the dialect using sh-shell, for example).