unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Separating obarray handling from abbrevs
@ 2015-10-31 13:21 Przemysław Wojnowski
  2015-11-01 13:11 ` Artur Malabarba
  0 siblings, 1 reply; 37+ messages in thread
From: Przemysław Wojnowski @ 2015-10-31 13:21 UTC (permalink / raw)
  To: Emacs Developers

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



^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2015-11-20  7:52 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-31 13:21 Separating obarray handling from abbrevs Przemysław Wojnowski
2015-11-01 13:11 ` 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).