From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Generality of defvar Date: Wed, 27 Jul 2022 11:57:09 +0700 Message-ID: References: <874jz3sbvm.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40274"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 27 06:58:39 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 1oGZ83-000AJZ-HB for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 27 Jul 2022 06:58:39 +0200 Original-Received: from localhost ([::1]:52702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGZ82-0005dk-EZ for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 27 Jul 2022 00:58:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGZ6r-0005Zm-5o for help-gnu-emacs@gnu.org; Wed, 27 Jul 2022 00:57:25 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:35496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGZ6p-000166-C1 for help-gnu-emacs@gnu.org; Wed, 27 Jul 2022 00:57:24 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id v67-20020a1cac46000000b003a1888b9d36so526169wme.0 for ; Tue, 26 Jul 2022 21:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc; bh=JMnSz4WsEQhDD2dhselBs7NdwQQQdBYmWzjhIoZFLBk=; b=gJLIYLcefpIdt4uvAlQi3BYQmmjvTYvp9wsPXlCIqgR0z+b5bc+YjvKY23QfF7F7yv C3sAWWGLq0zoh08gfLGWTgPMez64EShQ+spXzFOe9u/p/tjFatWzVRUqQkMUnKNFYdWO z5wyGQWFGSHLy8qDWMHj+U6YY2pQPNmuK8WjqIpoZAI41r4hpAM8/kgst0YOs5Fuo5ay sunfMwAShRuEY6wOyVWMbd4wmIrCU8TU0tX/JqAnhEhX/xRYSdskahP2Plnj4a+RJsEJ U6pd0fnOm/r8r2WSNeY8FNzmmZgdXV+Nf2o3fNgT6qtzNPrjcd/r34iqSGxRzLbo02+l bsRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc; bh=JMnSz4WsEQhDD2dhselBs7NdwQQQdBYmWzjhIoZFLBk=; b=lSDk1unAw4W52xipNYGEkYLnN15bXsnEDdv4F5UOuYVRjWiMf/K028LzMhzwf6XtVn CxXpev8h30XjymWhOidfmYcKmbM0lFlIweA4txS3VBW5IeIHfJmoX1UdP+052IorIIqV CK1RTfI1HFqKJwRNPXwMBZGrURxU4JrWMXs1eNawZBn03lkt9pbvB4NKg2nFxWHquHeV 3cAmDUZCVGi5yuVldkzikg1yOnRj4awMhue7HmAb0sUpE+zsSqv8YrX4VXgpQ4rq3Sk0 ioPLNYsL8DXYbg82kAKb/dI0a9R8TmGDR0rGJFt1Y1Gq0aK9LYlScjJDUs60CTDgVpq/ 3rgg== X-Gm-Message-State: AJIora+UGKlvXtaD3atJdXLfZ+TX+HwCfGY/1R/2wVfgwMlnhVV9sLLi oUW3xIK2Sh2+ZOChum6JgIqGf7P4kAsLSIXJIfVnajTFjb0= X-Google-Smtp-Source: AGRyM1v7S8BZexWxadUH06QZwkXlwZzf4bG8UsRziOsmUiY4sscsTttwCVZ6RXnanfKXVrDU+w8KNx//TiKbui2LH4k= X-Received: by 2002:a05:600c:6009:b0:3a3:1506:f60f with SMTP id az9-20020a05600c600900b003a31506f60fmr1453066wmb.144.1658897841119; Tue, 26 Jul 2022 21:57:21 -0700 (PDT) In-Reply-To: <874jz3sbvm.fsf@dataswamp.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=yurivkhan@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:138637 Archived-At: On Wed, 27 Jul 2022 at 06:17, Emanuel Berg wrote: > For practical reasons it can be better to do > > (defvar var-name) > (setq var-name 'var-value) > > instead because if you do something with that and want to > reset it, it's enough to evaluate the second line, whereas if > you just have the first line you tend to evaluate that one and > if/because the variable is already set at that point then > nothing will happen ... Yes, but you can press C-M-x on a (defvar var-name 'var-value) and it will get re-set to the new value even if the variable is already defined.