From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?iso-8859-1?Q?Sebasti=E1n_Mon=EDa?= Newsgroups: gmane.emacs.devel Subject: Re: Variable predicate Date: Wed, 25 Sep 2024 11:47:49 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14975"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Garklein Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 25 17:48:54 2024 Return-path: Envelope-to: ged-emacs-devel@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 1stUG5-0003jI-AM for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Sep 2024 17:48:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stUFB-0004ga-3p; Wed, 25 Sep 2024 11:47:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stUF8-0004WP-LP for emacs-devel@gnu.org; Wed, 25 Sep 2024 11:47:55 -0400 Original-Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stUF6-0005ar-Nd for emacs-devel@gnu.org; Wed, 25 Sep 2024 11:47:54 -0400 Original-Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id A49C21380397; Wed, 25 Sep 2024 11:47:50 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Wed, 25 Sep 2024 11:47:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1727279270; x=1727365670; bh=paCQhkKOHSFBUrB4nOtco6D6BAyvOjdq hmjPZaKthS0=; b=c22ZDiglZaY3u4VF1S6teRfX7rFdIgbsBqg5BXZFwd6oYBxX OIx8RpM8yNys8M/v10PRSt4qHVNJjFAWK2ahI4p4VX/UAsa6B5swMSOE4Xq5RfYk NhrplumGKfDUBCWQZYQp9/8J01dbCN/rh5/2KgWfqJFi4cxzetvUXlydMVwcjNBp EAr+7cugWtRTmAT7v/J0xjavx8O6Z7PUFUWNzrYug80zcHA/7uZLH3iUIF1WvyIG 5inXTudJInxU6eQzgrjEgDE6SycGyZIZObChfvtAcPZ60BZntwRcGgfQs56b3ojb qwRA5DMlc1s+ZKfNPjKTrJRyLue2wZ8S29W6FQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1727279270; x= 1727365670; bh=paCQhkKOHSFBUrB4nOtco6D6BAyvOjdqhmjPZaKthS0=; b=N ru3UZIFQXvTncUzZxrp+WwNop0krAurO2UV9FkAtdssAXutHklMtOkHGRCtfwntY n6INzZi05HH89942VFZja3WEpf2/yKJkU+ORd8kB918xg/SldOG9U9od84UXTtOW bAINNgQDulIPXq7PODLs0HsLCdS1qv4fkPAC1+UmHF3VaAtBQg+Naazbx5KY3NfE v9+9H8w2fi9UblIC67MCh6dRSejC0SmP/kwm1+4dll0uJyGGR3pwr90xIGAbRz5y qorIyGVcjoWSPxawJLcEgqpBFgVsUX7DWqB7uCwSzFx9mHX9qyPs381kVnhyX87e Do01A/lyuX1MOH4h84M6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddthedgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf gjfhffkfgfgggtgfesthhqredttderudenucfhrhhomhepufgvsggrshhtihojnhcuofho nhovrgcuoehsvggsrghsthhirghnsehsvggsrghsmhhonhhirgdrtghomheqnecuggftrf grthhtvghrnhepjeefkeetveeuvdffhedtgeeukedtveekveethfdvgfffieeiieetuefg vdeiveeknecuffhomhgrihhnpehsvggsrghsmhhonhhirgdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggsrghsthhirghnsehs vggsrghsmhhonhhirgdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepvghmrggtshdquggvvhgvlhesghhnuhdrohhrghdprhgtphht thhopehgrghrkhhlvghinheljeesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: iab2c46da:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Sep 2024 11:47:50 -0400 (EDT) In-Reply-To: (Garklein's message of "Tue, 24 Sep 2024 08:25:58 -0400") Received-SPF: pass client-ip=103.168.172.147; envelope-from=sebastian@sebasmonia.com; helo=fout-a4-smtp.messagingengine.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324075 Archived-At: Hi Garklein, I am not sure I am the most qualified person to reply, but if I am wrong, we'll get corrections soon enough ;) Garklein writes: > In help-fns.el, two different ways are used to check if a symbol is a > variable. > > `describe-function' uses > > (lambda (vv) > (or (get vv 'variable-documentation) > (and (not (keywordp vv)) > ;; Since the variable may only exist in the > ;; original buffer, we have to look for it > ;; there. > (buffer-local-boundp vv orig-buffer)))) After checking the code, I think you meant this is how 'describe-variable' works. The predicate is not checking "is the symbol a variable", but if it has a documentation slot in its property list, -or- if it is bound buffer-local. The selection of symbols to run by the predicate comes from help--symbol-completion-table which does....a lot more. > and `variable-at-point' just uses `boundp'. You can check this one using `describe-function' on `boundp' :) > Is there any difference between these two methods? Which should I use? They do very different things, if you _only_ want to know if a symbol has been bound as a variable, boundp should be enough. Hope that helps! --=20 Sebasti=E1n Mon=EDa https://site.sebasmonia.com/