all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Przemysław Wojnowski" <esperanto@cumego.com>
To: Emacs Developers <emacs-devel@gnu.org>
Subject: Separating obarray handling from abbrevs
Date: Sat, 31 Oct 2015 14:21:43 +0100	[thread overview]
Message-ID: <87d1vvfa1k.fsf@cumego.com> (raw)

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ław



             reply	other threads:[~2015-10-31 13:21 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-31 13:21 Przemysław Wojnowski [this message]
2015-11-01 13:11 ` Separating obarray handling from abbrevs Artur Malabarba
2015-11-01 22:17   ` Przemysław Wojnowski
2015-11-02 20:21     ` John Wiegley
2015-11-08 18:50       ` Przemysław Wojnowski
2015-11-08 18:54         ` Eli Zaretskii
2015-11-08 19:09           ` Przemysław Wojnowski
2015-11-08 19:59             ` Eli Zaretskii
2015-11-08 21:05         ` Artur Malabarba
2015-11-08 21:17           ` Przemysław Wojnowski
2015-11-09  9:38             ` Stephen Leake
2015-11-08 21:36           ` Przemysław Wojnowski
2015-11-09  0:29             ` Artur Malabarba
2015-11-09 18:24               ` Przemysław Wojnowski
2015-11-09 23:12                 ` Nicolas Petton
2015-11-09 23:18                   ` John Wiegley
2015-11-10 20:10                   ` Przemysław Wojnowski
2015-11-10 20:32                     ` John Wiegley
2015-11-10 20:37                       ` Eli Zaretskii
2015-11-10 20:54                         ` Przemysław Wojnowski
2015-11-11  4:27                           ` Ken Raeburn
2015-11-11 16:51                         ` Nicolas Petton
2015-11-10 20:39                       ` Przemysław Wojnowski
2015-11-10 21:55                         ` Artur Malabarba
2015-11-10 22:19                           ` Drew Adams
2015-11-10 22:26                           ` John Wiegley
2015-11-11  3:31                         ` Eli Zaretskii
2015-11-11  5:08                           ` Drew Adams
2015-11-11 10:40                         ` David Kastrup
2015-11-11 16:50                       ` Nicolas Petton
2015-11-11 16:56                       ` Nicolas Petton
2015-11-11 16:57                         ` John Wiegley
2015-11-19 23:23                           ` Nicolas Petton
2015-11-20  0:13                             ` John Wiegley
2015-11-20  1:01                               ` Artur Malabarba
2015-11-20  7:52                                 ` Przemysław Wojnowski
2015-11-10 22:01                     ` Nicolas Petton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1vvfa1k.fsf@cumego.com \
    --to=esperanto@cumego.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.