From: Eli Zaretskii <eliz@gnu.org>
To: john muhl <jm@pub.pink>
Cc: 74235@debbugs.gnu.org
Subject: bug#74235: [PATCH] ; Remove 'nil' from some 'lua-ts-mode' options
Date: Thu, 07 Nov 2024 07:58:42 +0200 [thread overview]
Message-ID: <86y11vr3e5.fsf@gnu.org> (raw)
In-Reply-To: <87ses4vyzp.fsf@pub.pink> (message from john muhl on Wed, 06 Nov 2024 15:22:34 -0600)
> From: john muhl <jm@pub.pink>
> Date: Wed, 06 Nov 2024 15:22:34 -0600
>
> * lisp/progmodes/lua-ts-mode.el (lua-ts-luacheck-program):
> (lua-ts-inferior-program): Remove 'nil' as it is never a valid
> choice. (Bug#74235)
IMO, the use of these options in the code is not clean: if these
programs are not installed, the commands which reference these options
will signal errors whose diagnostic might not clearly indicate the
root cause. I would like to see a cleaner handling of such
contingencies by this mode. Does this make sense, and if so, would
you like to suggest changes to that effect?
> (defcustom lua-ts-luacheck-program "luacheck"
> "Location of the Luacheck program."
> - :type '(choice (const :tag "None" nil) string)
> + :type 'string
> :version "30.1")
I think if we require this to be the name of a program, 'file' is a
better value for :type, because it allows completion if the user types
an absolute file name.
> (defcustom lua-ts-inferior-buffer "*Lua*"
> @@ -83,7 +83,7 @@ lua-ts-inferior-buffer
>
> (defcustom lua-ts-inferior-program "lua"
> "Program to run in the inferior Lua process."
> - :type '(choice (const :tag "None" nil) string)
> + :type 'string
> :version "30.1")
>
> (defcustom lua-ts-inferior-options '("-i")
> --
> 2.47.0
>
> john muhl <jm@pub.pink> writes:
>
> > Tags: patch
> >
> > For some silly reason the lua-ts-{inferior,luacheck}-program
> > options ended up with an option for “None”. Obviously setting your
> > Lua interpreter or linter program to nil is not going to work.
> >
> > Any chance it could make it into emacs-30?
lua-ts-mode is new in Emacs 30, so we can install these changes on the
release branch, as a stopgap. But I'd like to see a cleaner solution
installed later, even if we decide to install that on master due to
its complexity.
Thanks.
next prev parent reply other threads:[~2024-11-07 5:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 21:19 bug#74235: [PATCH] ; Remove 'nil' from some 'lua-ts-mode' options john muhl
2024-11-06 21:22 ` john muhl
2024-11-07 5:58 ` Eli Zaretskii [this message]
2024-11-07 15:04 ` john muhl
2024-11-08 14:57 ` john muhl
2024-11-08 15:24 ` Eli Zaretskii
2024-11-09 20:54 ` john muhl
2024-11-10 5:43 ` Eli Zaretskii
2024-11-10 14:48 ` john muhl
2024-11-14 8:26 ` Eli Zaretskii
2024-11-15 3:54 ` john muhl
2024-11-10 5:45 ` Philip Kaludercic
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y11vr3e5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74235@debbugs.gnu.org \
--cc=jm@pub.pink \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.