all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: me@eshelyaron.com, 60379-done@debbugs.gnu.org
Subject: bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input
Date: Sat, 14 Jan 2023 10:16:03 +0200	[thread overview]
Message-ID: <83edrx8rb0.fsf@gnu.org> (raw)
In-Reply-To: <878ri8t5p0.fsf@gmail.com> (message from João Távora on Thu, 12 Jan 2023 10:20:27 +0000)

> From: João Távora <joaotavora@gmail.com>
> Cc: Eshel Yaron <me@eshelyaron.com>,  60379@debbugs.gnu.org
> Date: Thu, 12 Jan 2023 10:20:27 +0000
> 
> The idea looks sane, but I think 'format-prompt' can't be used if Eglot
> is to continue supporting Emacs 26 and 27.  Also I'd prefer if the patch
> is slightly less disruptive to whitespace, like this:
> 
> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> index 15cb1b6fad..eb3b51ed8b 100644
> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -991,6 +991,7 @@ eglot--guess-contact
>  non-nil, maybe prompt user, else error as soon as something can't
>  be guessed."
>    (let* ((guessed-mode (if buffer-file-name major-mode))
> +         (guessed-mode-name (and guessed-mode (symbol-name guessed-mode)))
>           (main-mode
>            (cond
>             ((and interactive
> @@ -1000,7 +1001,7 @@ eglot--guess-contact
>               (completing-read
>                "[eglot] Start a server to manage buffers of what major mode? "
>                (mapcar #'symbol-name (eglot--all-major-modes)) nil t
> -              (symbol-name guessed-mode) nil (symbol-name guessed-mode) nil)))
> +              guessed-mode-name nil guessed-mode-name nil)))
>             ((not guessed-mode)
>              (eglot--error "Can't guess mode to manage for `%s'" (current-buffer)))
>             (t guessed-mode)))
> 
> Other than that, it's fine to commit.

OK, done, and closing the bug.

Yaron, this change was small enough to accept without copyright
assignment, but if you intend to continue contributing to Emacs (and
we hope you do), I recommend to start your copyright assignment
paperwork rolling at this time.  If you agree, I will send you the
form to fill and the instructions to email it.

Thanks.





  reply	other threads:[~2023-01-14  8:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 12:22 bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-12  9:31 ` Eli Zaretskii
2023-01-12 10:20   ` João Távora
2023-01-14  8:16     ` Eli Zaretskii [this message]
2023-01-14  9:33       ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-14 10:52         ` Eli Zaretskii

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=83edrx8rb0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60379-done@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=me@eshelyaron.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 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.