From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#45879: 28.0.50; [PATCH] missing defvar for keymap-name-history Date: Thu, 14 Jan 2021 18:31:49 -0800 (PST) Message-ID: <82d9d68b-dac2-4cd8-84fe-2b7c81036e20@default> References: <87r1mn6nw1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35234"; mail-complaints-to="usenet@ciao.gmane.io" To: "James N. V. Cash" , 45879@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 15 03:33:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0EvM-000922-Eg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Jan 2021 03:33:16 +0100 Original-Received: from localhost ([::1]:34044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0EvL-0006lq-24 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 21:33:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Ev8-0006lT-RC for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 21:33:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Ev8-0007KO-GJ for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 21:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0Ev8-0006QO-Ce for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 21:33:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87r1mn6nw1.fsf@gmail.com> Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Jan 2021 02:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45879 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45879-submit@debbugs.gnu.org id=B45879.161067792224620 (code B ref 45879); Fri, 15 Jan 2021 02:33:02 +0000 Original-Received: (at 45879) by debbugs.gnu.org; 15 Jan 2021 02:32:02 +0000 Original-Received: from localhost ([127.0.0.1]:39723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Eu9-0006Oq-AW for submit@debbugs.gnu.org; Thu, 14 Jan 2021 21:32:02 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:35256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0Eu5-0006OY-VV for 45879@debbugs.gnu.org; Thu, 14 Jan 2021 21:32:00 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10F2U5Zc166775; Fri, 15 Jan 2021 02:31:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=YGhINbfOvFmQ9MewwuJnhbgagyfk22kJO5ia1HqCM1o=; b=dbTMHoV4/oDq6ENZA+p+YiK5f7BsbOeVHt3y8MCN8RLF/+Xwsb6P4LEAwx9sEOkeCl2Y T8ydvvYTup1uxUGq8+HdOqL2b0egfQBVNdx9xuZE5bCHeYwrRpWvWw23SV04IeQ2nD8Y /Eph8scMGrS0M4GGg1IaEJ0wcCfUHbHtmN11tz48HT5o/1IFvPpB4Sh29M4N5fkeuvSI ME5e9eXNNySoLtnOchf62og1delvtXDAn7mZu134AgijfOsDlJ+OWlUFnaoF8jz0YHwo cevHlBHo2/Zz4/BJqm050xbX3aKKqFTsrjtXtX9UuGjY10KXAzmcpQxv6EA9CUp4YMVH rg== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 360kvkb0c3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jan 2021 02:31:52 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10F2UexQ054073; Fri, 15 Jan 2021 02:31:51 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 360kfae9mv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jan 2021 02:31:51 +0000 Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 10F2VoSx005055; Fri, 15 Jan 2021 02:31:50 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9864 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101150010 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9864 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 clxscore=1011 impostorscore=0 spamscore=0 mlxscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101150010 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197970 Archived-At: > 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. >=20 > 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.)