From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' Date: Fri, 5 Jan 2024 12:18:36 -0800 Message-ID: References: <87r0iyz1cu.fsf@oook.m.uunet.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21991"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen To: Harald =?UTF-8?Q?J=C3=B6rg?= , 17948@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 05 21:19:13 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rLqev-0005L7-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jan 2024 21:19:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLqen-0000g0-Bx; Fri, 05 Jan 2024 15:19:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLqef-0000fY-SR for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2024 15:18:58 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLqef-00014P-Js for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2024 15:18:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLqek-0006Pm-1u for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2024 15:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jan 2024 20:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17948 X-GNU-PR-Package: emacs Original-Received: via spool by 17948-submit@debbugs.gnu.org id=B17948.170448593224640 (code B ref 17948); Fri, 05 Jan 2024 20:19:02 +0000 Original-Received: (at 17948) by debbugs.gnu.org; 5 Jan 2024 20:18:52 +0000 Original-Received: from localhost ([127.0.0.1]:58008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLqeZ-0006PL-Vi for submit@debbugs.gnu.org; Fri, 05 Jan 2024 15:18:52 -0500 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:50503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLqeW-0006P6-30 for 17948@debbugs.gnu.org; Fri, 05 Jan 2024 15:18:50 -0500 Original-Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2cd1a1c5addso24178761fa.1 for <17948@debbugs.gnu.org>; Fri, 05 Jan 2024 12:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704485917; x=1705090717; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ft8QsPofPPoa9SECWXatM8c0vNJCxaE8Oo1DRreaXIs=; b=gHi2yXLp0Fx5IhIlxgbx5VkDdP3rnK5fQ3age5bNWbm1RHAbn2d1gKxxzqJUYNpMm1 soYw7sSN+0XfqC0Ni24MwR7/MfAYebrXt9HPU3TbEQk2LpwUk23qT5l11QpFmVQWsQLY /8I+uDIzbm/9ASyMNGLuLcqxzVhicNA+/nuTnJM5jcQOnyGkp4bM/xMYuVSKEn7FDoVp 0oTGHUIC6TtQbWR9OSVF4HzB217XB8arIGmr/0yWQmfpcrNTqNiNleuOUUTYwhzgIdJN 7VFktAvUALS62IBkraKLucvkcsNeTUpQnVSCwjB/KVdzUCl+9O52ZsH4jyR2bQ+Ps64x MRqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704485917; x=1705090717; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Ft8QsPofPPoa9SECWXatM8c0vNJCxaE8Oo1DRreaXIs=; b=nyD6DD4swHe9MzdsVVxNfJJHRdTdFGIZTs/OLtye5uDGG3nm15b9y/Fq3wAg7w63Df TKVbEGl5gLI5icpu5Nth+BrGXjOas2uFvj2orIgrnnRvwMp96jkMiFb9DGVn4KYTZE1I 2zbvueIfQ+kgBkXKyjlt0lXOv30GzmXT19UJ33YpWVnAXK6ZaE28+40A+zfgzRfCCH7m UyOPILYn2GNQ3R5tvEW6STDsYO6ncNbTq+UWMCXXeFSP9ivRPaaa1NDOfAy4aHkLQ3AI x14zRZkAEDPgkyP7VDuhMZE8tbFsAhcE2usDVTU+auIDeAnqtfTmw7qBbWswIX1du2EY O42w== X-Gm-Message-State: AOJu0Yw5+SqqEx2ywqpyJM2CXlcvt+H1WxPwcz6O2cFyaWJQiFD5brge pT/kAHWjwsfiKnOfSwJ2gTFTXElgadd96RaKuDY= X-Google-Smtp-Source: AGHT+IG6dQJS1UFbCaZYoxi01XH3nX+mcoH31z0ZwEShYyN8aiOlirGEWhq8YQjgxNek9FK5eKryoFpCTWBFMG0mO/c= X-Received: by 2002:a2e:b166:0:b0:2cd:304c:d024 with SMTP id a6-20020a2eb166000000b002cd304cd024mr700775ljm.55.1704485917164; Fri, 05 Jan 2024 12:18:37 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 5 Jan 2024 12:18:36 -0800 In-Reply-To: <87r0iyz1cu.fsf@oook.m.uunet.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277413 Archived-At: Harald J=C3=B6rg writes: > I suggest the following solution: > > - A new command (proposed name: `cperl-file-style' in sync with the > option) sets the same set of variables as `cperl-set-style', but at > the same time makes them buffer-local. > > - The `cperl-mode' command will call this new function if > the option `cperl-file-style' is set to a non-nil value. > > - The command cperl-set-style is modified to set the > default-toplevel-value for each option. This command will also be > used by the :set function of customize. > > So, if `cperl-file-style' is at its default value of nil, all variables > stay global but can of course still individually appear in file or > directory variables. If `cperl-file-style' is set, it defines new > defaults for all options. > > This does not allow to have "PBP-style, but with an indent level of 3" > as a *customizable* default because cperl-file-style will override it, > but I'd expect it to work if both options are set in the correct order > in .dir-locals.el or file variables. > > Does that sound ok? I can prepare a patch ~ this weekend. Sounds good to me.