From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.help Subject: A couple of lisp questions Date: 11 Nov 2003 14:00:16 +0000 Organization: Dept of Computer Science, University of Manchester, U.K. Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068560094 6954 80.91.224.253 (11 Nov 2003 14:14:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2003 14:14:54 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 11 15:14:52 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AJZIB-0003Ap-00 for ; Tue, 11 Nov 2003 15:14:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJaFI-000117-Ca for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Nov 2003 10:15:56 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!peer1.news.newnet.co.uk!peer1.news.newnet.co.uk!ifl.net!peernews.mcc.ac.uk!cs.man.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: rpc71.cs.man.ac.uk Original-X-Trace: wapping.cs.man.ac.uk 1068559216 6836 130.88.198.228 (11 Nov 2003 14:00:16 GMT) Original-X-Complaints-To: news@wapping.cs.man.ac.uk Original-NNTP-Posting-Date: Tue, 11 Nov 2003 14:00:16 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 Original-Xref: shelby.stanford.edu gnu.emacs.help:118116 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14055 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14055 I have a couple of questions which will help me with a package that I am writing. First, I want to call a function everytime a new word has been typed into a buffer. The only way that I can think of doing this at the moment is:- add to post-command-hook, check whether self-insert-command was last-command if so check whether the char before point is not a word constituent. if not then the word before that has probably just been entered. This does not work in all cases, so better ideas would be welcome. Second, my data structures are current using a hashtable, and a set of lists. The hashtable has a nice feature which is key/value weakness. I would really like to use this feature, but over an ordered list structure rather than a hash. As far as I can tell the only way I can use a weak reference is through the hashtable. There are no other weak data structures? Third, is there a good way of serializing hashtables, so that I can load them again next time from a file? To get my system to work I need multiple hashtables sharing the same objects not just objects with the same values, so its fairly complicated. Cheers Phil