From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#48281: buffer_local_value and find_symbol_value duplicate functionality Date: Fri, 07 May 2021 18:44:33 -0400 Message-ID: <87im3up3ji.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30785"; mail-complaints-to="usenet@ciao.gmane.io" To: 48281@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 08 00:45: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 1lf9Do-0007u0-Jn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 May 2021 00:45:24 +0200 Original-Received: from localhost ([::1]:53436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lf9Dm-0008C5-N5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 18:45:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf9DS-0008Bs-Ua for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 18:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lf9DS-0003VV-NW for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 18:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lf9DS-0004NM-Ki for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 18:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 May 2021 22:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48281 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162042748116778 (code B ref -1); Fri, 07 May 2021 22:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 May 2021 22:44:41 +0000 Original-Received: from localhost ([127.0.0.1]:46364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf9D6-0004MY-VG for submit@debbugs.gnu.org; Fri, 07 May 2021 18:44:41 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf9D3-0004MS-W6 for submit@debbugs.gnu.org; Fri, 07 May 2021 18:44:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf9D3-00089s-Nx for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 18:44:37 -0400 Original-Received: from venus.catern.com ([68.183.49.163]:48176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf9D0-00039s-W0 for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 18:44:37 -0400 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=98.7.229.235; helo=localhost; envelope-from=sbaugh@catern.com; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=catern.com; s=mail; t=1620427473; bh=pHq4x09SimQtdMB2HV6Rx0H0OKMEbdFZd3FgAEiWrc4=; h=From:To:Subject:Date; b=iGCCZ/t4T89Xf9lYw85bZ0GD6RlreBendHBZRDmWiPs63WJ66Z8X6aZAADPWjwtgx w46G58eyuFiOTUfq1kcd8rZziqs0gpjBVmXqt0aNCu7StQ55cb72NxeUJHaZNhSPdP N//qpOUiZIglIblu4N8TCQfthGMrVP0CYkKz/rbo= Original-Received: from localhost (cpe-98-7-229-235.nyc.res.rr.com [98.7.229.235]) by venus.catern.com (Postfix) with ESMTPSA id C884C2E9771 for ; Fri, 7 May 2021 22:44:33 +0000 (UTC) Received-SPF: pass client-ip=68.183.49.163; envelope-from=sbaugh@catern.com; helo=venus.catern.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:205966 Archived-At: find_symbol_value is described as: Find the value of a symbol, returning Qunbound if it's not bound. buffer_local_value does the same, except that it allows one to specify a buffer. Yet they both implement symbol lookup, without sharing code. And given that the comment above find_symbol_value says "Great care is required for this.", I'm guessing that one or both of them may have bugs that the other does not. Especially because buffer_local_value is simpler than find_symbol_value, despite doing an ostensibly more complicated job... How about unifying them into a single function? Would a patch doing that be accepted? Alternatively, maybe I'm missing some detail about why they're different?