[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A couple of lisp questions

From: Phillip Lord
Subject: A couple of lisp questions
Date: 11 Nov 2003 14:00:16 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93

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. 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]