>> Sorry, I'm probably missing something, but I don't understand how this >> would work. > > Simple: it wouldn't use run-hook* (or maybe it would introduce a new > run-hook-filter).
Not using a hook seems to be simpler than writing a new run-hook-filter function. How about the following? It seems to be a bit overengineered, but that's the only way to meet the various objections. (defvar kill-filters nil "List of functions for converting a string before it is killed. These are called by `kill-region' and `copy-region-as-kill' to convert a buffer substring before putting it into the kill ring and passing it to `interprogram-cut-function'. Each function must accept three arguments: STRING, BEG, and END. STRING is the string to be converted, and BEG and END are the position arguments given to `kill-region' or `copy-region-as-kill'. Each function must return a string. The buffer substring between BEG and END is passed as STRING to the first function in the list, and the return value of each function is passed as STRING to the next. The final return value is used as the killed string. If this variable is nil, no filtering is performed.") _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel