From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Add a separate mode for .dir-locals.el Date: Thu, 17 Oct 2019 22:45:20 +0700 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: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="237421"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Emacs developers To: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 17 18:36:58 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 1iL8lm-000zen-3j for ged-emacs-devel@m.gmane.org; Thu, 17 Oct 2019 18:36:58 +0200 Original-Received: from localhost ([::1]:52784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL8lk-0002Qt-Mw for ged-emacs-devel@m.gmane.org; Thu, 17 Oct 2019 12:36:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60240) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL7yB-00070o-3H for emacs-devel@gnu.org; Thu, 17 Oct 2019 11:45:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL7y9-0006Yu-Ve for emacs-devel@gnu.org; Thu, 17 Oct 2019 11:45:42 -0400 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:46548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL7y3-0006XJ-0J; Thu, 17 Oct 2019 11:45:36 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id r18so2102233eds.13; Thu, 17 Oct 2019 08:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SZ+zgqe0JOPzzBEL/WFfLcsBDQJvO5eUtJFl/79Ne1g=; b=O2IjBGsnLBQ3/sgF1Wr5wo0Dwo6aDUc1Imb+/YIwdRBj+PK2O/fJVtQmg1JG693OTf pTpRMNZyuztDM6kYVDyNfHw5O0C08CBMYr4yJd4k+u8mHIHgF7SJUjXp+27ZbAx4GYHm uCw+a+QbnxglgDlFpOrsGRssVeUf1m2NFD28UGCrMDCmeqh/LMAbNdqJW3eTkQm2NGS+ v1wSa8bAwkBr9HIRDlTCNezI6fM+It53OdqwkecPYbvlkzgh/YmJBpub4oAo6DkxQI4D GhunUNMajIolZxYGl7Vh9HqvWPMk5yJME1GDp9GConP9LxQ2RZBFoPHiOxZNcWMqjBl/ F5Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SZ+zgqe0JOPzzBEL/WFfLcsBDQJvO5eUtJFl/79Ne1g=; b=K9Cov8e0xe/C63HV2ooiV8F+aeHdrQ2C4SHwCRSx105zbqfnH0RNlIyuD19oZWTMYV 8aJkonfFxEBIgYsDutrq3JF/3VCABU42CfMm1B3NmHJPE+OjaMQePScdzF2W0KD66fDT cd2VJEJ8IWafgny3wYGp0CvbMY+7WUQUX5XBRPqeosL8vMsDW7Jo+Hvrm+QYl2A65aES Q+aja3buUY0DjSmzxTRV6dPO33e/zH7vDpvTQXiZAObBc0ZuTqs+MnsaYa8rN8ZShTgw ea4+gScW24cQAjCgmHqjzp5POV0E+7yReqTGo/EKe+A+B5QYGgrAktT8WqDGxPkDjayR AtYg== X-Gm-Message-State: APjAAAWNiV/zOgrSYGo/WjymHyNuX7ue2NzjgHBb3bWgiZn/uQrNrNAg V+lyVy1UlilP7grA0/uHWlOxVrt0CQybDUsRudU= X-Google-Smtp-Source: APXvYqyIpa5AWZ8Rc9HfDK8IZL4XjhWohV32m/hD3vzZaAxPLhwovOo4Z3PHOrOLyPQzJkD9h3/IAF8a+06eTDypwcQ= X-Received: by 2002:a17:906:1b0c:: with SMTP id o12mr4114874ejg.312.1571327132697; Thu, 17 Oct 2019 08:45:32 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::532 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:241149 Archived-At: On Thu, 17 Oct 2019 at 21:57, Cl=C3=A9ment Pit-Claudel wrote: > Flymake in ELisp mode is configured from emacs-lisp-mode, by adding two c= heckers 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 ar= en't proper Emacs Lisp files. .dir-locals.el is not the only kind of an .el file that is not proper Emacs Lisp code. Many modes store persistent data in the user=E2=80=99s .emacs.d, in files ending in .el. Only some of those (e.g. recentf) take extra steps to make that data valid code. Most just dump a data structure and call it a day. Maybe there should be a base major mode for S-expression files, and emacs-lisp-mode, along with every other lisp-like mode, deriving from that? (There is a similar issue with Javascript vs JSON files, where the former are code and the latter are data. Out-of-the-box, Emacs treats them the same, with js-mode, though only some Javascript-related things make sense in a JSON file, and certainly checks for data files would be different.)