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.help Subject: RE: [External] : Re: Setting up abbrev Date: Mon, 1 Aug 2022 19:20:20 +0000 Message-ID: References: <87k07sfywz.fsf@dataswamp.org> <87tu6wchw5.fsf@dataswamp.org> <87zggoatct.fsf@dataswamp.org> <87mtcnbykf.fsf@dataswamp.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="29595"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 21:23:25 2022 Return-path: Envelope-to: geh-help-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 1oIb0e-0007XR-KA for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 21:23:25 +0200 Original-Received: from localhost ([::1]:57424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIb0d-0005Ey-97 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 15:23:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIaxw-0005D3-DN for help-gnu-emacs@gnu.org; Mon, 01 Aug 2022 15:20:41 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:4544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIaxr-0003in-NS for help-gnu-emacs@gnu.org; Mon, 01 Aug 2022 15:20:35 -0400 Original-Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 271Hs6fi007241; Mon, 1 Aug 2022 19:20:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=3wJp57tUaOntKtZ1MeyyaG+ZDEidg1WnA91ZZHXh3MA=; b=oOOyQq+pYcFgbEKglNpoN1PNSUl87nfgpo8rFACTnfD15fI5TPrSdxKHYv2Pzy7CWXJF MtDGAmdqDtof6tDFh9OYAfC44hP7mOQWZX33FVkzyzDm8HIbfanYnYjM3nkMLkw300Xm oARBPqvneLMWfvj42BGQpJpzHAD/6mwUELT7oF60GH0jRjdHVz3tVOFyaweuTG99ttMI Xgh7fcyGy0c1mpbTsNIdRik36OqMrUcGLGgDOhcaNTW2wFOOeZx1kIL13zRXqdGpqu8g rFf99ZxUxOMMB6E95+rbxB5Kk+B2ppfoP4AWWAxLRhG9fMEQGOX6wJMxNlduuxGHKR3z qw== Original-Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hmu80vq9r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 01 Aug 2022 19:20:25 +0000 Original-Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 271I6WC5001038; Mon, 1 Aug 2022 19:20:24 GMT Original-Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2174.outbound.protection.outlook.com [104.47.56.174]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3hp57qggah-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 01 Aug 2022 19:20:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Exy8vLivd3PEPpU1oAp5XusEJ7xO1GsJskMtQ1ZEDyCZAXQ2jnPkKnk4oK59J0Qep9io3fxO46wofjEpYWxmT77LebMeFmQBzpfDMFX4eiu1D80ccgIqwTRJs1gx2i44lAwckpixIZh7TxspWhYVOAU3oOBdVNU98SwJB7c0pkSs9izptl238T5wAlvQTDaUAhZAPFtxRDP/f3bXLeHhH/+PmoIsZNpn1UhpanVgItY4oojQIuR/20jzM74a0PjYXHJ1AWd/TXT20v9qQBm4Mo0kf30jJIu1q7dHuj2PWHS6AACiaNuiA9l3GH25esvvFyGUoM9N3RCP8JF+bROvAA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3wJp57tUaOntKtZ1MeyyaG+ZDEidg1WnA91ZZHXh3MA=; b=KPVMxUWbt8brlsR4Tdv6wMa3xtgOYv9rX5iYW4+mAt+UGW3lf/j8O3miD0BME6mxEtk1pD4Tya/f+0SoarOrpkOGntRp9IsFBjYkPLEUW88ek7tT5bdyf8HZCFOndW5EsuZAPwVIhYZCleeXgt3s3ODMiwu4VX+IB7tX0fg939GDDcbHJBKGVFtWBVPgF0FdXCIQSrxPnMPxeamIfVZ6fzxBqx3Kvcy/NdtX253xuQOMLGg8/e1zPQhrjgzhSUMohSfTx9oxEJ6Moz03/mXmCpOExzjnVjLwcnJH0de9MW5LjEU1AJmx3Ixj83SYectHECD93xXhbp2DMRhx2IztDg== 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=3wJp57tUaOntKtZ1MeyyaG+ZDEidg1WnA91ZZHXh3MA=; b=RldlpdJNg4mQZ0QISTckIqH4Tqw/K6GIj9DPprP0k94mfhvBeh9TFa97dClarmLYGUHJNmwnC/o7RqBjLGG+hq63xgGzbPhZfqpcFHRydBdXpbvwymxHnEFdX5tYEscFb9HPgRwIgZ324tVMAfciqZKfIguJuY5gohAZV+kOLk8= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BN6PR1001MB2065.namprd10.prod.outlook.com (2603:10b6:405:32::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.16; Mon, 1 Aug 2022 19:20:21 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::8d65:31e6:cd0e:e95]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::8d65:31e6:cd0e:e95%5]) with mapi id 15.20.5482.016; Mon, 1 Aug 2022 19:20:20 +0000 Thread-Topic: [External] : Re: Setting up abbrev Thread-Index: AQHYpdW/xh5t/N2vpkGaDm98+APpTa2aai9Q In-Reply-To: <87mtcnbykf.fsf@dataswamp.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dc8477e3-f234-4249-4000-08da73f2e052 x-ms-traffictypediagnostic: BN6PR1001MB2065:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: odNyBxrruSBRY7H2plfsT3wCkmk1dH+ueBMsOu2NWecy5U/sE37TmFbhY7InmAwMQWhjpLqXNRXAScENgdU0mIUAAgDRldOUOAlPmTmUM0LIahYxELgq99D2ieAfq8Z+ssWq9aTCBaMf2Bh8zuydRRIBIQMCpklGe52L0rCawhCgLHAJOACnaJB4Q8mxvAjjOeUFT96BMT///YRp4N1uQmMA55q4MpJXFAoM4YV3MaTI8VhwuvhxE64xI6DErq9omF+XVlWRLTgWCi+DJ+7QJfo9qu8M30gCiSfHFwHPwWFbU5MaU2h/bgp0UimWhBx6Gp6wXKGEnDUbteDveTczFWVHIObdE7qCuJ9l7QN058P2JMamx5O9VR/t5z6ZaFHoqc/ZWPE8e+b9fZhwKlfpjsTSMBWuqopC8gEVhwA3I5AUYvr23SZ+n3EtuzlhjiXBiTHCL+CoIOnRzaU7b953BNYzwHuDHHpLvErebIOxCMQS7ScsUl0bhxqUnILIpZ+fFf+Z+PNDHMtxFHb0VOdFBjEAeOs9TiU98+vqB7NzwuYdYAVosPUiaSmGC/RPFkXYzhCqmDHTDLC1MHfLN8N40+63Ll2Wxqdm5clFYt7mZEjavAECecrQMYS5lUuQFP3LW8yRWdEfvSg5JQSo3GDofiPx0Tz7H1NgkuOSGEWNtpNVJJAknmAZvaKzFsKzYHhiLMdpt83VMmOfyXkVQugVHlFSpd61iJwOTmVxN7iwJX0pOnrq97OuVbsprVfH+ czmAtSh0CrsMofixYEf841SAMDqzWhI9Gt4bRrVCYnKSV36X7Ca53Ojm1Q4J4zGiyTT x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(366004)(136003)(346002)(376002)(396003)(6506007)(7696005)(9686003)(86362001)(2906002)(26005)(38070700005)(8936002)(5660300002)(52536014)(478600001)(41300700001)(33656002)(44832011)(122000001)(55016003)(186003)(38100700002)(71200400001)(83380400001)(316002)(110136005)(66556008)(66446008)(66476007)(66946007)(8676002)(64756008)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KVoo+R/Oe90ONMQQREzAsejh/9FHAHqX8iHVR5cT5O7gjzzrMgKT4d5vGfYv?= =?us-ascii?Q?knZzbF4z+60rUhUC41+2Mm/5kuZiUAUBCz32iEP4t4GHTQvdZI+28q3cucq4?= =?us-ascii?Q?VUF69/QhVFY510pxnVosjTpuTRB9xg6m9LFp8Kssy5nUP2fF2pIFmE9zm0cA?= =?us-ascii?Q?BJHGFjT000oQvhWq4rBM/9L38BFY92raM9L6U62wZEzzJn8X+zT3bvWQSqdM?= =?us-ascii?Q?iWdqls54mudp3B1l6pQGm/kHlIKGfhzyOvuk7l+3ICHxY7Yq7xg4ue/6Il+o?= =?us-ascii?Q?snMLzLodssKl2t6g36SphxOWuDuNUBsSwAZwW8U97C+LpXUrPeaCY2d4DHjo?= =?us-ascii?Q?vgUjK7g2G2rmlUC1BtVcCB3fz6a6XfkWB2FYrr6ttrTTM1AeD8mSOwXOv2K7?= =?us-ascii?Q?zbG5KQ3wp8Jiqo1BN+8CllkK5E/H2yyChxviu+I/uzOOVreyd5tpNocTuqRs?= =?us-ascii?Q?IIHvjpGfuIbjPP4PV9RERo0Tk/4FID9bAJT6PjwgPzJEfLgqCUMGyMZQ2MoB?= =?us-ascii?Q?jJJ9kWNRnWw7FBS35nlRk+hYI0p9JxfaMKYaraHW+jy610JvF8mSUcVnlRao?= =?us-ascii?Q?iaa/B1E6JY3RelO5DYeI63RzNWMh83k9xqdW7H0GU6zxxZwtyU8JL3P+/ddM?= =?us-ascii?Q?Ui X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc8477e3-f234-4249-4000-08da73f2e052 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2022 19:20:20.8800 (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: FEUVcpg7DvA+1HWhxcz2nqGt9t/BBNvODigi2ReYQTrpal4kr8toNbqX3BfW5HbPfGm5oTpqrXFchI3qyAH6Cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1001MB2065 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-01_08,2022-08-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=836 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2208010096 X-Proofpoint-ORIG-GUID: merLLOeAI7ml1FFR1ITrFK1H3D_zXpma X-Proofpoint-GUID: merLLOeAI7ml1FFR1ITrFK1H3D_zXpma Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138733 Archived-At: > > You can use a dotted list in these cases: > > > > 1. You want to save conses (not create so many), in > > a context where you're not going to be needing to use the > > cons as a list (mapping etc.), or a context where you > > know you'll only ever want an atom cdr. > > > > 2. You want/need, in effect, to have a backwards key-value > > pair, (list-value . atom-key). You have a list to use for > > most purposes (ignoring the last cdr), and you have an > > atom (the cdr) for a few rare purposes, as a kind of > > label for the list. > > > > #2 is usually the result of trying to adapt to legacy code > > that expects to treat just a list (and doesn't need to > > follow it to its end). IOW, #2 is typically an ugly hack. > > For new code you'd instead just put the atom first: > > (atom-key . list-value). >=20 > Why? What data can (a . b) hold that (list a b) cannot? Please reread what I wrote. I never said that (a . b) can hold data that (a b) cannot. Nothing like that. I said: 1. (a . b) uses one less cons than (a b). 2. If you need to support legacy code that expects to use a list (a b c), but you also want to label such a list with an atom, you can sometimes use (a b c . d) to get away with doing both. That's all. If the performance (space or access time) of (a b) isn't a problem for your app, then #1 probably doesn't apply. If you don't need to cover legacy cases such as #2 describes, then #2 probably doesn't apply. Those are two use cases that come to (my) mind.