unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Ola Nilsson <ola.nilsson@gmail.com>
Cc: 36317@debbugs.gnu.org, ola.nilsson@gmail.com
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	[thread overview]
Message-ID: <E1heXOf-0007hm-NX@fencepost.gnu.org> (raw)
In-Reply-To: <20190620230122.22553-1-ola.nilsson@gmail.com> (message from Ola Nilsson on Fri, 21 Jun 2019 01:01:22 +0200)

[[[ 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)







  reply	other threads:[~2019-06-22  4:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 23:01 bug#36317: [PATCH] Correct the name part of defun-prompt-regex in sh-script-mode Ola Nilsson
2019-06-22  4:13 ` Richard Stallman [this message]
2019-06-24 20:23   ` Ola Nilsson
2019-06-23 21:00 ` bug#36317: [PATCH v2] Allow underscore in defun-prompt-regex names for sh-script Ola Nilsson
2019-06-25 14:01   ` Noam Postavsky
2019-06-26 20:58     ` Ola Nilsson
2019-06-28  0:15       ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1heXOf-0007hm-NX@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=36317@debbugs.gnu.org \
    --cc=ola.nilsson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).