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#47198: [External] : Re: bug#47198: 27.1; Why bind some commands by default if they're not defined? Date: Tue, 16 Mar 2021 19:35:39 +0000 Message-ID: References: <83a6r3djsi.fsf@gnu.org> 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="10863"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "47198@debbugs.gnu.org" <47198@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 16 21:18:24 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 1lMG91-0002it-6P for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Mar 2021 21:18:23 +0100 Original-Received: from localhost ([::1]:59714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMG90-0001u2-7m for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Mar 2021 16:18:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMFU2-0004wg-EU for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2021 15:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMFU2-0007UR-2R for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2021 15:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMFU1-0001Si-Ud for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2021 15:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Mar 2021 19:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47198 X-GNU-PR-Package: emacs Original-Received: via spool by 47198-submit@debbugs.gnu.org id=B47198.16159233515601 (code B ref 47198); Tue, 16 Mar 2021 19:36:01 +0000 Original-Received: (at 47198) by debbugs.gnu.org; 16 Mar 2021 19:35:51 +0000 Original-Received: from localhost ([127.0.0.1]:41092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMFTq-0001SH-Od for submit@debbugs.gnu.org; Tue, 16 Mar 2021 15:35:50 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:50726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMFTn-0001S1-EE for 47198@debbugs.gnu.org; Tue, 16 Mar 2021 15:35:48 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12GJZbg6102293; Tue, 16 Mar 2021 19:35:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=1NRIg7CGbMt/thruD5eKl0123erMr7VPcfaQuBgzfcQ=; b=Xu0WR4h5FQHFUTEXAkcEPzGtElMaJO4EzxlB4Mb2SiIaQ/Vt8EuAcbuVDlpx3khekKlU yviSimlPd/YPu1n4btGCPuTlqjalpd+tvTQaWiPohEi+DJGM86JuTo1DBa7jDBewiWqP UzjkskGuatSC12aEc2h60CJ6hmuRgsWG7Hky7q8CZcppuAw2+zO3ubuIRTnh4EBLA+gS bcS2TOFSG/O5f+MDTSW5IaHJeosS1wPUMncGNZrXq0GUmCvJinh1RQWYEuv5b03Oyq0O pn9+KUcHf6jlxuOcy/OntYGaO0VFrGWm3zW6NABh+AUw9LHhBjppVba2I3UHtX2Ua59d cA== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 378p1nsr2d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Mar 2021 19:35:41 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12GJTsvC178487; Tue, 16 Mar 2021 19:35:41 GMT Original-Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2104.outbound.protection.outlook.com [104.47.58.104]) by userp3030.oracle.com with ESMTP id 3797b0hha8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Mar 2021 19:35:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WzlFHMjzDIK+yNlDFLdhBvIrKrATlzFM9BlAAc6yNF8W1bSYwN9hlgY/D/cRrzRPgth0uTud6YgjidprkWXeEEGW/Lc6G/Ib8DTaLm3fRz3F/T5/vuKMpuCQiFG3HbWhPyznvtyKWItWmOD08xZcNhwAkGrbvRPQXnK3zN1ONq8xy494s7cdqKMiQtWFIaAln1zge6FCe9K5yFwItdeg9Gwv1GxhkC42nMzAvTR7/+VouVh0fhMuBNGWtP+p/VTdGwMtw1tZfVptOP4DnAkEvZTVPB3vc8HlFp7qwW6DIwKh4FEH72nmJ6za9qP44g1UtwOu8tXyz8nAOeRiNmjQ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1NRIg7CGbMt/thruD5eKl0123erMr7VPcfaQuBgzfcQ=; b=BQwrhtWPaQ6VOgblq9QXO8gfFZfY+P+sM03NqQtinev2gm1mw0+dGQpVueCSq0MirgFyul4DeSX3qubpz6f03F9/9g9qrWZCjqpQ5g+2FfmglE81YDLuJwMTLwjCkYhOCZNqeMZ3LTWYzmGTFSQXyWkft8r1kZASsukZJZNjGivBUWVRjzA32oAXCfRxxfGWXWo/r+WuhV+7+guOnLEUA2Z+v94KHHSmDp+tXT5t8EI4Z69rCH12wlHHQQvJMoJLyjuwk3Wu4G+41Q7ek8u+oDzkQQ7ALgCvNGG6a4PSpe7XiFll1EbgUop8rAtvKU0rOrRf/mv896BTnAnqGRlLzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1NRIg7CGbMt/thruD5eKl0123erMr7VPcfaQuBgzfcQ=; b=qxByuBFI+uh3qng8oLhE0Dc141W9Czyw0fRxOsi+hm0SwbWOpkOD5P9FtByXWc24LPS6lfBiY2HybAtecD6c88XImgTAgZES2oM1mwCkSd8SWC6Z/d52mtfzgTYmYMGOpjK/T36WPj0Du8+yk21Hjc4bDCMozgVevHFWFxAikPI= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4569.namprd10.prod.outlook.com (2603:10b6:806:111::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Tue, 16 Mar 2021 19:35:39 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315%5]) with mapi id 15.20.3933.032; Tue, 16 Mar 2021 19:35:39 +0000 Thread-Topic: [External] : Re: bug#47198: 27.1; Why bind some commands by default if they're not defined? Thread-Index: AdcajdQT3b8pgXajRaaJg0nVAGWoOAABflD9AAGZ+oA= In-Reply-To: <83a6r3djsi.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8d4910da-28a8-4ffd-84e4-08d8e8b2add5 x-ms-traffictypediagnostic: SA2PR10MB4569: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DQq3ppE14xW5wV4xoQFl2fKHFcXBQWXxr/BAzf1aYBHSbCqxntbyyjiF7YYNBYA4IgkQGnrbz94K5gEYBiJvEXEoRB/NpBCpzrf41MtgCjoDOmmA7fia8jg0w1kSnPkP1T9V2HYZfz/jxDQvyQ2tJekW8dPrN15pAA8Q3E/RONisHDxGNGt8vPy94tlnSSe07uWsnnhjrqVUPLD3uvrr9JdK7N9sFFDjhu3bqy9vd5/cxEDUIVGHo7CgMglJCe2h96nw2gC5OguoFihvDTF8aFAwgi3+o0NHLYM2K0PpyTq1mBADXz3363jd9SYkI/TTy28+6JxXSOuW/6dWHS52Qm/2cWBrOIIFj3bSsTnClfyqy2pDVODjdtT6kEE7/Uzexcf3o1gXDOf0FcwBaRTfTu2ZbWGqN9sq4z4UbTkVV4aWDN4rNwoAgvudzFa4kbQ5HH+yYuwrr81rPocLRj4MYr3KQObAfeBo41Hum/A8m2QDy6mFgtfN1Bg4XXq0UAWNpfDy6e/fxH7VTH837tNsZVBFlc+kg7m3teoWhLcV097erhLYgDIg8duDpSzabtOt x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(136003)(376002)(366004)(346002)(39860400002)(8676002)(2906002)(64756008)(33656002)(71200400001)(5660300002)(52536014)(8936002)(76116006)(66446008)(66476007)(66556008)(66946007)(478600001)(6506007)(86362001)(83380400001)(186003)(26005)(9686003)(6916009)(55016002)(7696005)(44832011)(316002)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: h5+unMQtZ8Nhbr3LPt9RORQT6dyF5JmjAPRGYPxCy4oBx4/jNVCOX8N/VY8ZkzBkQRS/AvAZJSReNuhnfY+GlCPWD01p9UfShNdh2qky2I1Ew6JHCqqcfGJU3HqlBPST+ugwKRhGL+mCLEKpxBJKNsp+1Qc3dIqkxLeQ4OHJCSx0fjo1qg1q3QQCh0+zU6bvvgv/T3Vr68JwldZPEQCN8ZFhpe1of/UzShINF5C4afs6TZp6BC9snqaFTpVpHCo569OrK4E8kBM3EcLvfc6BdsZuQ0FB3SwgYZZhEIyN9aXhuAkRbbQyFF4lcRmmNV2QXJCnmynMENs6+BK9Ydai1mILHPF9CYh13tc0Bldxg7MVDnJP2Ksjl+aWmbj6Ad/qAPXOtMJZ8O9dppwYP3lhasJgBt02/1PKn3R0qBdbardXZqLVXqSr1GjZT74v2RMHSWpqv4r5fclrl6PVJ71Hwgq/L3DKiw2mhmeid+rTiyvpubiSl1grqGnOY6lMDrwe5nhvOEYSzALUuDp6SnhBgHmcbv6XogOByPy+5wmZRQeyZefHB28Y72pTA+UmVLJk5MllP9SENSRe83HeMBz4KsncrEuTRpAsT7a1vNSYycUuZceuMIjgzhEBaysGREU2Au1baW4OiLC7CPmmdlsugSall0f4hzI526HN7nFSy+IQwieEUvqeKAucTcWx/rtGl4tu5xjthul2iwFJ6KmSbhgnObHLjCOuIG4f8KP8K19xYx+f3u/wnFTQ31eI GtY7KOCaBNXBPR871UJ+uGcQhSjTjjMZKxUAz6oAuTgSF/XJFw8WJXKKbl7CDJzw3vcMo4/+ovTl3D0fE1+ekJsNk7IO9CPYW5 x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d4910da-28a8-4ffd-84e4-08d8e8b2add5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Mar 2021 19:35:39.0303 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ylJ8u2mQAfV50eQZCYrEZr1+EQ/RzshJycRflPVj6Tonc0tYdIpTPuFa13yB/pydJ5m+ABg7RYQ2xihPA/BHVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4569 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9925 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103160121 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9925 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 adultscore=0 spamscore=0 clxscore=1011 phishscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103160122 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:202489 Archived-At: > > M-s h f hi-lock-find-patterns > > > > This is apparently because file `bindings.el' adds the key binding: > > > > (define-key search-map "hf" 'hi-lock-find-patterns) > > > > Is it a good idea that we do this even though the > > command is not yet defined? > > > > Seems like such a binding should be in hi-lock.el, > > and be created only after the command is created, no? >=20 > If the command is in hi-lock.el, how do you cause hi-lock > to autoload when first invoked? I didn't say anything about autoloading anything. `search-map' will always be defined in Emacs. `hi-lock.el' can itself create that binding. But yes, autoloading based on the command isn't the same thing as binding a key that will, by invoking the (undefined) command, cause its definition to be loaded. Feel free to fix this some other way. We're binding a key to a command that doesn't (yet) exist. Is it important that that key be available at the outset as a way to autoload that library? At least in my use, I see only that command and `vc-ignore' that are listed in `C-h b' but without the commands having links. What's so special about them? Put differently, how have we succeeded in solving the same problem for other commands in files not loaded by default?