2. Defining two new abnormal hooks, maybe named yank-encode-functions and
    kill-encode-functions, to be called by kill-region etc (or possibly the
    lower-level functions like kill-new and kill-append.)

This would be better than using advice.

    On further consideration, there seems to be some overlap between the above
    suggestion and the yank-handler text property (new to Emacs 22).

The idea of the yank-handler text property is that certain kill
strings are encoded specially, and need to be decoded when they are
yanked.  Maybe longlines could use this instead of a new hook for
yanking.

However, it would still need a hook for killing.  However,
not just for killing.  This hook should be used in various places,
including Fdelete_and_extract_region.

Or maybe you could just use after-change-functions.
Would that work?


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to