[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: require-hard-newlines to use newline

From: Chong Yidong
Subject: Re: require-hard-newlines to use newline
Date: Fri, 11 Mar 2005 10:08:20 -0500 (EST)
User-agent: SquirrelMail/1.4.4

>> 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'.")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]