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#35925: perl-mode wrecks formats Date: Sat, 30 Sep 2023 19:17:01 -0700 Message-ID: References: <87lfysujo6.8.fsf@jidanni.org> <08ea891e-55fc-145d-17fd-efd7c779f1d8@gmail.com> 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="20594"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson , 35925-done@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 01 04:18:09 2023 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 1qmm24-0004v7-L2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Oct 2023 04:18:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qmm1l-0001Ae-9S; Sat, 30 Sep 2023 22:17:49 -0400 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 1qmm1j-0001A8-28 for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2023 22:17:47 -0400 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 1qmm1i-0007MW-QR for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2023 22:17:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qmm1y-0005VG-Fa for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2023 22:18:02 -0400 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Oct 2023 02:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 35925 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 35925@debbugs.gnu.org, stefankangas@gmail.com, jidanni@jidanni.org Original-Received: via spool by 35925-done@debbugs.gnu.org id=D35925.169612664621099 (code D ref 35925); Sun, 01 Oct 2023 02:18:02 +0000 Original-Received: (at 35925-done) by debbugs.gnu.org; 1 Oct 2023 02:17:26 +0000 Original-Received: from localhost ([127.0.0.1]:60237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmm1O-0005UD-FL for submit@debbugs.gnu.org; Sat, 30 Sep 2023 22:17:26 -0400 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:44305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmm1L-0005Tw-TC for 35925-done@debbugs.gnu.org; Sat, 30 Sep 2023 22:17:25 -0400 Original-Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5046bf37ec1so14560733e87.1 for <35925-done@debbugs.gnu.org>; Sat, 30 Sep 2023 19:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696126622; x=1696731422; 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=Ggypw4Ic55hx0P0RV+6OmZEQGRi9Bfyq0lFFTbuLayQ=; b=cNHj7JkjKxVYEoYQ9LZOGBjh8TsroBZifJWIZDyUZ9HSEjMhHT0qqRt22T92v+N/AO 99Yo2byfzCJo+f0bA3s8N3Ga6OpOkh8APv5nC4Be4UA0NkuY/Msb0G/1qPZdl2Yxrpp7 k8ULzqOcJUENxsbnF/HVoGbh2XZO1og5zW7GHxhaCl2enoBam3xHhjSg4h5SOAHkYJzS cqx8oxk0EYxObhWrPC6eIKraISc/Bi5tLqsBoRqugW0uPkoejIkzZvlxBC+EZ6nTxopD lBl1NAnPi172xeLvfAwnryjx1dp6qjRGer3wzJ4cNSCJWRGiDkppBzGUcvmqFnEUMjDW UrTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696126622; x=1696731422; 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=Ggypw4Ic55hx0P0RV+6OmZEQGRi9Bfyq0lFFTbuLayQ=; b=er6JG3B9qL7nWgy9KxaP0fXK3+lBbYSVscYbqAmjM8xlr1eg/5ASNC9R0WN3g29tbp dRdOlg71I5+I4T6t6wpwWuysnToh5QTqX108Bb8zt9wmOviBXnA/FbefGy0D7FK2hw62 zXiv2EMw83h9ROs/reqVBU1ptR+yZoa6lXpcxypPU49ubbFJMUQKSbsWuH+bpbXEIvAe ZtNV8ELiFAjHQUpu+GwTUH+lL/gvaQcDRSoeQq8+iFNQa8wFti0BMl5PcdJPoFwWD8Bm yk03LJav3nf4uw10fAOgURmX0IoEHCGZ8rbiWUSEXV0Q8pW984ciIYyb/gHSio8bBGAA f86A== X-Gm-Message-State: AOJu0Yx+Hfk523ftYQa5ZnEoZNARRVGWJnUE/gOxTjD/CPsui+46MW0w DGDUff2+ajzGx3JRnU/DRZyaWpiu7Nf08aORL5Y= X-Google-Smtp-Source: AGHT+IEFWUL39LpQTE7Rw3OhCrMyUT9/+kvW3M1ZaEpQURMd+8+32IbBqj42LzwQCAGawgUGqOpCFmqmvzbpg3CvHKA= X-Received: by 2002:a05:6512:3d8a:b0:503:183c:1223 with SMTP id k10-20020a0565123d8a00b00503183c1223mr8468211lfv.7.1696126621830; Sat, 30 Sep 2023 19:17:01 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 30 Sep 2023 19:17:01 -0700 In-Reply-To: <08ea891e-55fc-145d-17fd-efd7c779f1d8@gmail.com> (Mauro Aranda's message of "Sat, 16 Sep 2023 20:03:14 -0300") 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:271584 Archived-At: Version: 30.1 Mauro Aranda writes: > =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > >> In perl-mode, >> >> format FH =3D >> @<< @# @<< @### @<<<<< @# @<<<< @# >> (split)[0..5, 7..8] >> . >> write FH; >> >> becomes >> >> format FH =3D >>=C2=A0=C2=A0=C2=A0=C2=A0 @<< @# @<< @### @<<<<< @# @<<<< @# >>=C2=A0=C2=A0=C2=A0=C2=A0 (split)[0..5, 7..8] >>=C2=A0=C2=A0=C2=A0=C2=A0 . >>=C2=A0=C2=A0=C2=A0=C2=A0 write FH; >> >> wrecking output indentation and even introducing a syntax error on the "= ." > line. >> >> (See man perlform.) >> >> Seen with C-x h TAB, emacs-version "26.1". > > AFAICS, perl-mode doesn't recognize a format declaration when indenting. > I attach a patch that adds a check, plus some tests. Thanks, installed on master. [1: 7caa3f5499b]: 2023-10-01 04:13:17 +0200 Fix indentation in perl-mode (Bug#35925) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D7caa3f5499b1ca4b= 6d66c1655a4e0d6903755679