From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Przemys=C5=82aw_Wojnowski?= Newsgroups: gmane.emacs.devel Subject: Separating obarray handling from abbrevs Date: Sat, 31 Oct 2015 14:21:43 +0100 Message-ID: <87d1vvfa1k.fsf@cumego.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1446297732 25097 80.91.229.3 (31 Oct 2015 13:22:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2015 13:22:12 +0000 (UTC) To: Emacs Developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 31 14:22:04 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZsW6d-0004IN-6o for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2015 14:22:03 +0100 Original-Received: from localhost ([::1]:55644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsW6c-0002YA-78 for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2015 09:22:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsW6R-0002X9-Lq for emacs-devel@gnu.org; Sat, 31 Oct 2015 09:21:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsW6N-00053K-Ox for emacs-devel@gnu.org; Sat, 31 Oct 2015 09:21:51 -0400 Original-Received: from smtp23.iq.pl ([86.111.242.228]:60719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsW6N-00053E-G7 for emacs-devel@gnu.org; Sat, 31 Oct 2015 09:21:47 -0400 Original-Received: (qmail 10359 invoked from network); 31 Oct 2015 13:21:45 -0000 Original-Received: from unknown (HELO namek.cumego.com) (esperanto@cumego.com@[159.205.196.239]) (envelope-sender ) by smtp22.iq.pl with AES128-GCM-SHA256 encrypted SMTP for ; 31 Oct 2015 13:21:45 -0000 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.111.242.228 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193017 Archived-At: Hello everybody, I'm trying to write a test for abbrev-table-p, but encountered a problem. The function checks that passed object is a vector, but abbrev tables are implemented in terms of obarrays, so in the following test, the last two assertions fail: (ert-deftest abbrev-table-p-test () "Should assert that given object is an abbrev table." (should-not (abbrev-table-p 42)) (should-not (abbrev-table-p "aoeu")) (should-not (abbrev-table-p '())) (should-not (abbrev-table-p [])) (should-not (abbrev-table-p ["a" "b" "c"]))) The check in abbrev-table-p should have been "(obarray-p object)" instead of "(vectorp object)". Of course, there's no obarray-p function, but I can write it. Another thing is that obarray "handling" is mixed with Abbrev functionality in one file - they are separate concepts. obarray is just a type of collection that is used as storage implementation and should be clearly separated. Can I move obarrays functionality from abbrev.el to a separate file and changed abbrev.el to use it? Also this would allow to reuse that functionality in other places where obarrays are used. Thanks, Przemys=C5=82aw