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#43617: 27.1; Define-minor-mode keybindings not get precedence over global keymap Date: Sat, 26 Sep 2020 09:04:47 -0700 (PDT) Message-ID: References: <53faa17bc88194ba2a67440eb1ddd139ea1188c3.camel@gmail.com> <87eemoljlj.fsf@gnus.org> <878scwljdp.fsf@gnus.org> <59b95abb-1c57-4a94-b6e0-7f4bdeef72ee@default> <87h7rk1rkt.fsf@igel.home> 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="25271"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43617@debbugs.gnu.org, Lars Ingebrigtsen , dalanicolai@gmail.com To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 26 18:07:09 2020 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 1kMCj7-0006TI-9V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Sep 2020 18:07:09 +0200 Original-Received: from localhost ([::1]:56430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMCj4-00055h-CV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Sep 2020 12:07:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMCh6-0003MO-3N for bug-gnu-emacs@gnu.org; Sat, 26 Sep 2020 12:05:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMCh4-0004bc-GW for bug-gnu-emacs@gnu.org; Sat, 26 Sep 2020 12:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kMCh4-000838-Be for bug-gnu-emacs@gnu.org; Sat, 26 Sep 2020 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Sep 2020 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43617 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 43617-submit@debbugs.gnu.org id=B43617.160113630130927 (code B ref 43617); Sat, 26 Sep 2020 16:05:02 +0000 Original-Received: (at 43617) by debbugs.gnu.org; 26 Sep 2020 16:05:01 +0000 Original-Received: from localhost ([127.0.0.1]:47634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMCh3-00082j-43 for submit@debbugs.gnu.org; Sat, 26 Sep 2020 12:05:01 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:53986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMCgy-00082R-Ay for 43617@debbugs.gnu.org; Sat, 26 Sep 2020 12:04:59 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08QG03OF095674; Sat, 26 Sep 2020 16:04:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=N/v0egq5EjeJ91r3bKnQdv+2r7G9I6jBL5Z4LNL9Kdw=; b=WA0JKlvrEpJTVBCxsIY1oPOTKrnzCplqBy9KGcikCKce7/l4X+8JqotO6LwviMqPgi3h KRtLFRPz/5JwNiofQtChT7cNxRPgp515SHFbYeljrQGF9HCchh3C8Wry/oflvd0wtWCA mngLpCTrcqBycV6o9/fLL+KJ7jUaw/eF8QWqnuWJHp2JsHzbX93XlxgWZ6nLSIQd2Cfz YYhYbCI5Rx372VmoOx4Em3/yvY5heCxY99j/eUJRpJaO8iA4pkHzbpz/lBDYv8m73HOh eklNagHFpxdwFHWOJT/kZ4cZBP7yjwhDDSdyMB4yGNUHoOpRbKAIWZHWsYZ+mBdJuV61 nQ== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 33swkkgu4y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 26 Sep 2020 16:04:50 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08QG4e8j026787; Sat, 26 Sep 2020 16:04:50 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33sup8k2at-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 26 Sep 2020 16:04:50 +0000 Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08QG4mmw030164; Sat, 26 Sep 2020 16:04:48 GMT In-Reply-To: <87h7rk1rkt.fsf@igel.home> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9756 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 spamscore=0 adultscore=0 mlxscore=0 phishscore=0 suspectscore=0 mlxlogscore=948 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009260147 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9756 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 phishscore=0 suspectscore=0 mlxlogscore=968 clxscore=1015 priorityscore=1501 impostorscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009260146 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:189049 Archived-At: > > The cons ((kbd "C-n") . 'foo) is exactly such a > > (KEY . BINDING) pair - both KEY and BINDING are > > suitable arguments for `define-key'. >=20 > Is it? >=20 > ELISP> (define-key global-map '(kbd "C-n") ''foo) > *** Eval error *** Wrong type argument: arrayp, (kbd "C-n") I get your point. I guess maybe there are two ways to read the doc string. The most _useful_ behavior for users, IMO, is for `define-minor-mode' to allow expressions in arg KEYMAP (when it's such a list) that correspond to what a user writes in `(define-key ...)'. Is that particular list form of KEYMAP intended mostly for programmatically supplying such a list, or for users to write such a list? If the former, why is it needed/helpful at all, since code can just as easily create a keymap arg. If the latter, it gives users an easy way to write key bindings directly for `define-minor-mode'. I hadn't even paid attention to the existence of such a form for the KEYMAP arg. But it looks like it could be handy for users to write - IF the sexp to write is simple and straightforward. If users instead need to use backquote syntax or jump through other hoops to write such a KEYMAP sexp, then what's the point - what's the use case? Maybe there _is_ a programmatic use case. If so, what is it?