unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Phillip Lord <p.lord@russet.org.uk>
Subject: A couple of lisp questions
Date: 11 Nov 2003 14:00:16 +0000	[thread overview]
Message-ID: <vfu15bgg3z.fsf@rpc71.cs.man.ac.uk> (raw)





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

             reply	other threads:[~2003-11-11 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-11 14:00 Phillip Lord [this message]
2003-11-12 14:11 ` A couple of lisp questions Stefan Monnier
2003-11-12 16:29   ` Phillip Lord
2003-11-12 18:28     ` Stefan Monnier
2003-11-12 19:00       ` Phillip Lord
2003-11-13 16:31         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=vfu15bgg3z.fsf@rpc71.cs.man.ac.uk \
    --to=p.lord@russet.org.uk \
    /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.
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).