unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "James N. V. Cash" <james.nvc@gmail.com>, 45879@debbugs.gnu.org
Subject: bug#45879: 28.0.50; [PATCH] missing defvar for keymap-name-history
Date: Thu, 14 Jan 2021 18:31:49 -0800 (PST)	[thread overview]
Message-ID: <82d9d68b-dac2-4cd8-84fe-2b7c81036e20@default> (raw)
In-Reply-To: <87r1mn6nw1.fsf@gmail.com>

> It seems that the new describe-keymaps function in help-fns.el is
> missing a defvar for keymap-name-history. This results in an error
> when using, e.g. Helm as the completing-read function.
> 
> The attached patch adds the defvar to help-fns.el.

FWIW, I don't think it's required for the HIST arg
of `completing-read' (or `read-from-minibuffer') to
be predefined.  It can be any symbol, which is taken
as a variable - no need for a defvar.

Now maybe it can be considered good style to provide
a defvar, especially to provide a doc string.
That's another story.

But it sounds (just a guess) like it's Helm that has
a bug here.  Again though, it's good to provide a
defvar anyway.

E.g. in `emacs -Q':

 (completing-read "aaa: " obarray nil nil nil 'toto)

No error occurs, and `toto' gets populated correctly
as a variable, starting with an initial value of nil,
and regardless of input.

(And the byte-compiler issues no warning either.)

I thought this "feature" was documented, but I don't
find it now in the Elisp manual or doc strings.
Perhaps it's there somewhere.  (Not very important
anyway.)





  reply	other threads:[~2021-01-15  2:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15  0:32 bug#45879: 28.0.50; [PATCH] missing defvar for keymap-name-history James N. V. Cash
2021-01-15  2:31 ` Drew Adams [this message]
2021-01-15 15:08   ` James N. V. Cash
2021-01-19  6:09 ` Lars Ingebrigtsen
2021-01-19 15:11   ` James N. V. Cash
2021-01-19 15:23     ` Lars Ingebrigtsen

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=82d9d68b-dac2-4cd8-84fe-2b7c81036e20@default \
    --to=drew.adams@oracle.com \
    --cc=45879@debbugs.gnu.org \
    --cc=james.nvc@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).