From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: bug#36317: [PATCH] Correct the name part of defun-prompt-regex in sh-script-mode Date: Sat, 22 Jun 2019 00:13:01 -0400 Message-ID: References: <20190620230122.22553-1-ola.nilsson@gmail.com> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="95004"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36317@debbugs.gnu.org, ola.nilsson@gmail.com To: Ola Nilsson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 22 06:14:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1heXPm-000OVH-8y for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Jun 2019 06:14:10 +0200 Original-Received: from localhost ([::1]:38902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heXPl-0008Fc-6w for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Jun 2019 00:14:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37307) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heXPg-0008FW-19 for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 00:14:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1heXPe-0004JA-RS for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 00:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37315) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1heXPe-0004J0-OB for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 00:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1heXPe-0004lN-HV for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 00:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jun 2019 04:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36317 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36317-submit@debbugs.gnu.org id=B36317.156117679118214 (code B ref 36317); Sat, 22 Jun 2019 04:14:02 +0000 Original-Received: (at 36317) by debbugs.gnu.org; 22 Jun 2019 04:13:11 +0000 Original-Received: from localhost ([127.0.0.1]:50859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1heXOo-0004jh-QA for submit@debbugs.gnu.org; Sat, 22 Jun 2019 00:13:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1heXOm-0004jS-KE for 36317@debbugs.gnu.org; Sat, 22 Jun 2019 00:13:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1heXOh-0003BI-BI; Sat, 22 Jun 2019 00:13:03 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1heXOf-0007hm-NX; Sat, 22 Jun 2019 00:13:01 -0400 In-Reply-To: <20190620230122.22553-1-ola.nilsson@gmail.com> (message from Ola Nilsson on Fri, 21 Jun 2019 01:01:22 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160962 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > POSIX.1-2017 defines that functions should have a name that > 'consisting solely of underscores, digits, and alphabetics from the > portable character set'. Ok. Make sure the name part of > defun-prompt-regexp starts with a letter and allows underscores. It should try to recognize anything that POSIX says is valid. However, rejecting something just because POSIX says it is invalid is a non-goal. If the names that POSIX does not like actually work in some shells, that is an _extension_. Maybe some users use that extension. If they do use it, Emacs should highlight their code right. Maybe shells don't support such function names. If so, maybe the change not to highlight them is good -- maybe. Highlighting erroneous function names might be helpful for the user. When person runs the script, and gets an error, person will change the name. Until then, highlighting the name during editing might still be helpful. The point is, do not leap straight from "POSIX says this is invalid" to "Emacs should not recognize it." That is not the right way to think about questions like this. In the GNU Project, we treat standards as guides, not authorities. We follow standards when and as that serves users; we do not "obey" them. See the GNU Coding Standards, section Non-GNU Standards. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)