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] : Does defvar-local has same effect as make-variable-buffer-local? Date: Sat, 15 May 2021 20:49:55 +0000 Message-ID: References: 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="23990"; mail-complaints-to="usenet@ciao.gmane.io" To: Jean Louis , Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 22:50:59 2021 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 1li1FT-000609-4u for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 22:50:59 +0200 Original-Received: from localhost ([::1]:46258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1li1FS-0000jO-89 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 16:50:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1li1Eb-0000LI-P7 for help-gnu-emacs@gnu.org; Sat, 15 May 2021 16:50:05 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:56618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1li1EX-0003VJ-BK for help-gnu-emacs@gnu.org; Sat, 15 May 2021 16:50:05 -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 14FKmu3u133977; Sat, 15 May 2021 20:49:57 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-2020-01-29; bh=tZZrB/X9PdoRJr84rgpr55j1nQqJ2LP9PSSpSYGLCHg=; b=BU/6w6ivOxFvpeUUTXSxRc4iAmM29Ygz4oBTUpfTZqFZeTxrpDBRlTeTyRfljkquDNpa 2iMcpFX/f2aelRmIj11WnYAZ+VwIV0vLwF0aIAvYOzaKIVkzHR8MkBDRofRfb4FrWky/ F+pCgEJP/n5wAAvf9DSfermzNFJd/HAm25t+/uTt8RhGh92Ca7++VZtxB/fgfml0bdaA A91CONT5HbUqnpi395d6N31W2EKs82I519yDczerkLYMUxcqq2YVvmw8z4na/NLO/oCP GIMQ9TkWCXUu0h6peuwx4By5TAnMIGvx1fcoPpmaE6Kg2leEAiGGpo3ovDsyKcOSg0dS eA== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 38j68m8pqf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 15 May 2021 20:49:57 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14FKetCl114124; Sat, 15 May 2021 20:49:57 GMT Original-Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2177.outbound.protection.outlook.com [104.47.58.177]) by aserp3020.oracle.com with ESMTP id 38j64263yu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 15 May 2021 20:49:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YW2oJNfDrn72eHo9VBUGMEqKmXpbDkGuA8aJKWxJyIdfT78RGSKqoQ4Qkdr3jfYiHYCKBITaGo1aPTTZKMQtCAGCd8RPZpi621UruiHk775YsZgHVRfZGgQ+4h5yMGEJkGyx2J/MAL4g/sHpG+f1wwpK1iRrok4tkodkpo4elZCkQUyonxRnrGOjZnVUiVCUaRK6JsaWo6PEwjdqCS3gCmHcTaoL0G4dDfeSEt83bltEUDxZE7/CbpQK2b4OYLbRcITnH+ud5o09+DZHsQlgBWLlfKxXUnI1gRpYPYn8PlA+GpjTEwsECLdB1Ewvt0iTQOaqgsdT794Ap3t2s2qYEQ== 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=tZZrB/X9PdoRJr84rgpr55j1nQqJ2LP9PSSpSYGLCHg=; b=l8oBefZbL/TLlNwA2id4JCE1HTcoQlpFMptEzoSsXCWa+tccnCMMi+lSfm52MPWgzxK7WkUVNIeV4Zz2UtaVSQYtDrGUMZ0xmtLw8eH6hxUoa22MIhxV2TnFqk8zVaTG9Gf33KAyfzIxS/w/rJzUh/NgBYc3jFszjpYuynYhpipjGGWdcLfeIRpY0cfmrEzigMTZ5MeF+KpjAP8NIg86nLyiKLhLlE2QvNwIPFnv4COt5s5eHwBlJMXoKeBa11HAVHjvja+IxGSuuvJYBNumdEvLlXbJWnqso36pDYDxqAPT/P3NHjFs4nI6agE4nI2MVZhAbkDT4l5Gio58mrNeow== 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=tZZrB/X9PdoRJr84rgpr55j1nQqJ2LP9PSSpSYGLCHg=; b=cd4MExfb6GMniPYalwsudfDtboABZ9IPyohPO5d2blZbrNtEtHHR5pZDFA2qWbrgjY5swlSRuiPl/jBC2Rxjtdt9wA3tJ4dvhdWMfP++LlbLIsouAZbqrVTis+ZxuIomnmpTe5sWAEpX0UYFPd/EtHhmlDVjN7AwBneZ+TeQ+zM= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4428.namprd10.prod.outlook.com (2603:10b6:806:fa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Sat, 15 May 2021 20:49:55 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4129.028; Sat, 15 May 2021 20:49:55 +0000 Thread-Topic: [External] : Does defvar-local has same effect as make-variable-buffer-local? Thread-Index: AQHXScc+GRU7dADGl0eY7NIcrK7vMarlAyKw In-Reply-To: Accept-Language: en-US Content-Language: en-US authentication-results: gnu.support; dkim=none (message not signed) header.d=none;gnu.support; 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: e81aa2ba-6a08-4b97-5695-08d917e2fef6 x-ms-traffictypediagnostic: SA2PR10MB4428: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +yFsJLjs+jt18JIhMG9r9vm8/DVrfFtnsg/6zdtVUdAqeY56AbqHxys9MEvBdHH3HnE8Euit7Mz1+CNubRCuRTdF7xEhFhYLmia7yKnNVW1V3Slf+ZQRoKmvQmAbQ06tc1a15ByVZjtRrfbJZ3HcJU0l3bxbaTw+bWYF/P4e1ZPHLVMUM3CjrUFmBENtCUdFf7nj8fupSafZq+Cg/1YKXWG32WXF8K8IAv7cM9jfvvvBZHm07zk1UAAbN3Ncb0welZMW52ZCVcit1syQNJ1YsvZ5N2px6lwo2c6NoD93q9bX9K3nY5zEXhWvujv8lboeGaofQBz61n9HK6rNUS8w9QcRQ6fT32rjsT7aUZfV03wuqhQn3a1/LrSEQMXj+N0pdpx2rwkocxbq296ul+Aja2NM0tIaW/clK9af0TbtN5Rm7whlekAcx7oqgcG7Lh99kVmSswEkW4q3PRycxbsGXY1q+5yaxsA9c6zD7wTLsLz76hlzc5lVKN9cFgIRJbZL50UA8ny50E54fn89E5+FL4svXPj7X5y+3JR4yvr3P2uqdjxi3y/MzD06ddCPMlU7kQp3VS2VbmsiTEHXOCLzWMpozNM3qgLH2fK/VD9wrCI= 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:(136003)(39860400002)(396003)(366004)(346002)(376002)(71200400001)(5660300002)(52536014)(33656002)(186003)(26005)(2906002)(64756008)(66476007)(66946007)(76116006)(66446008)(66556008)(38100700002)(122000001)(86362001)(7696005)(478600001)(44832011)(6506007)(110136005)(316002)(8936002)(55016002)(9686003)(4744005)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?k7LcAL/Ay+7knwjCAkrnGive8pUJLxI9Ei7zZHViuiO37Gm81+grhW/0bvzz?= =?us-ascii?Q?A/5BONftK6+gLhW8nSC2/PRngjUcmJBhH6YkUcusalKtZCKFTTutpgkC4eVa?= =?us-ascii?Q?+d4pDfWoQY/AWb4tcWPAjHo8TiKPShFAj8wsHC5VuWFZ0VM/CHTEJdI0vlqU?= =?us-ascii?Q?z01h6Bm9HsPCiT2tyjJNK/RgXxjadUFV/xZFws0h7nLWhLJ7Rw1TnZhmQMq+?= =?us-ascii?Q?tNHTE3220bQR5mwFz+iR+HnaxDM0ZIHw2vsdQmlAAgrg1ngl130PTHyfAeWZ?= =?us-ascii?Q?P8ZeZp5vski1zRkDeWPY/4dVD2kpWUNC2GkHrwk+GGWpAe1AtNrQwDb+H/4h?= =?us-ascii?Q?y3wOFxiVc0eKInIzS138kERgaB0Db7TYbCPbO+s5+QKIFaQQWOQOYzu4oAij?= =?us-ascii?Q?V6fDkb6cDe+cr63D72P3B7F5sJaQhP+ehEPBm9sdC3p6IfKXm+prIi6cSueY?= =?us-ascii?Q?ZeGM8oEuMLM1Idk88AtAkFIAqvb5D7OxQsZ8sjpbgJgopk7A59mxlkUfk78e?= =?us-ascii?Q?bXPuNJLr/WmtTSk7901ZtC1M+DB7Ugg8288toAp6vQ6pr0fnQ5HNJ9wRrx9a?= =?us-ascii?Q?no82eptWn7MRISPb/EGsEj5JpJlBquEGnx6fJlo2i7SpnGDLer7+IDaJwVvr?= =?us-ascii?Q?0Ir1 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: e81aa2ba-6a08-4b97-5695-08d917e2fef6 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2021 20:49:55.6314 (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: /TkI5u4G9h+MM6h8JccTQ9ztIKRq0x12s9Je/AVD15DmSOEIHuajNrOgLeOwu30h2R3hh1seZovMSR4zTEicPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4428 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9985 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=731 phishscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105150159 X-Proofpoint-ORIG-GUID: WgZXJtIZzvUbqs_hlXOT8fNBECozNwFx X-Proofpoint-GUID: WgZXJtIZzvUbqs_hlXOT8fNBECozNwFx X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9985 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 suspectscore=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105150160 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:129802 Archived-At: > (defvar rcd-current-hash nil) > (make-variable-buffer-local 'rcd-current-hash) >=20 > Is the above totally equivalent to this below? >=20 > (defvar-local rcd-current-hash nil) Ask Emacs. `C-h f defvar-local', then click link `subr.el': (defmacro defvar-local (var val &optional docstring) "..." ;; Can't use backquote here, it's too early in the bootstrap. (list 'progn (list 'defvar var val docstring) (list 'make-variable-buffer-local (list 'quote var)))) So yes. Without the fiddling for presence in `subr.el' that would be just: (defmacro defvar-local (var val &optional docstring) `(progn (defvar ,var ,val docstring) (make-variable-buffer-local ',val)))