>> I think it's usually important to keep the property that killing doesn't >> modify the buffer's text (when used in copy-as-kill), so rather than >> having before-kill-functions modify the buffer's text just before it's >> put in the kill-ring, it would be more convenient to make it return the >> string, i.e. use it as a replacement for buffer-substring. > > I like the idea, but returning a value from a hook is rather > inconvenient -- if there are multiple functions on the hook, which > value should you use eventually?
Another possibility is not to use a hook at all, e.g.: (defvar kill-filters nil "List of functions for converting a string before it is killed. Each function should accept a single argument, a string, and return a string. Whenever a string is killed, it is passed as an argument to the first function in the list, and the return value of each function is passed as the argument to the next. The final return value is the string that is actually put in the kill ring and passed to `interprogram-cut-function'.") _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel