Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!mrose@uci-750a
From: mrose%uci-750a@sri-unix.UUCP
Newsgroups: net.emacs
Subject: bug in abbrev facility?
Message-ID: <16470@sri-arpa.UUCP>
Date: Tue, 7-Feb-84 04:03:09 EST
Article-I.D.: sri-arpa.16470
Posted: Tue Feb  7 04:03:09 1984
Date-Received: Fri, 10-Feb-84 03:02:52 EST
Lines: 31

From:  Marshall Rose 

Does anyone have any ideas on how to handle this:

    You enter abbrev mode and define some local abbrevations.  One of
    them has a hook.  You then write an abbrev file.  If you read back
    in the abbrev file, you don't have the definition for the hook
    anymore, instead you have just the expansion text.

    This can cause bizarre behavior in emacs: you start-up a shell in a
    buffer using a routine that defines "cd" as an abbrev that expands
    to "cd" and calls a hook.  [What the hook does is unimportant to
    this example but important to the user.]  Later on you define some
    abbrevs in another table, unrelated to the shell buffer, and write
    an abbrev file.  This file contains abbrevs for all abbrev tables.
    You then exit emacs.  Later on you start emacs again, start a shell
    in a buffer, and then go to another buffer and do some editing.
    You then innocently read in the abbrev file that you wrote last
    time.  Poof!  The hook is gone for the "cd" abbrev in the shell
    buffer.

    Off hand, I can think of two solutions: 1) if the abbrev has a
    hook associated, don't write it out in the file; 2) if the abbrev
    has a hook associated, write both the expansion text and the name
    of the hook to the file.

Any ideas?  Is there a better way to handle this?

Thanks,

/mtr