[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: require-hard-newlines to use newline
From: |
Kim F. Storm |
Subject: |
Re: require-hard-newlines to use newline |
Date: |
Fri, 11 Mar 2005 23:29:24 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Chong Yidong" <address@hidden> writes:
>>> 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?
>>
>>> Perhaps before-kill-functions should get START, END and STRING
>>> as arguments where STRING is the result of buffer-substring.
>>
>>> Each hook could then modify that string as they please.
>
> Sorry, I'm probably missing something, but I don't understand how this
> would work. Since each function would only be modifying their own local
> STRING variable, not the one that will actually be killed...
It doesn't have to modify the variable `string', but its string value, e.g.
(defun x (s)
(aset s 1 ?-))
(let ((s "abc"))
(x s)
s)
=> "a-c"
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: require-hard-newlines to use newline, (continued)
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/11
- Re: require-hard-newlines to use newline, Stefan Monnier, 2005/03/11
- Re: require-hard-newlines to use newline, Kim F. Storm, 2005/03/11
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/11
- Re: require-hard-newlines to use newline, Stefan Monnier, 2005/03/11
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/11
- Re: require-hard-newlines to use newline, Stefan Monnier, 2005/03/11
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/11
- Re: require-hard-newlines to use newline, Stefan Monnier, 2005/03/11
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/11
- Re: require-hard-newlines to use newline,
Kim F. Storm <=
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/11
- Re: require-hard-newlines to use newline, Richard Stallman, 2005/03/12
- Re: require-hard-newlines to use newline, Stefan Monnier, 2005/03/12
- Re: require-hard-newlines to use newline, Richard Stallman, 2005/03/13
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/13
- Re: require-hard-newlines to use newline, Richard Stallman, 2005/03/13
- Re: require-hard-newlines to use newline, Chong Yidong, 2005/03/13
- Re: require-hard-newlines to use newline, Richard Stallman, 2005/03/15
- Re: require-hard-newlines to use newline, Richard Stallman, 2005/03/12
- Re: require-hard-newlines to use newline, Richard Stallman, 2005/03/04