From: Brian P. <bp...@re...> - 2004-10-17 21:46:18
|
boj...@dd... (Johan Bockg=E5rd) writes: > Brian Palmer <bp...@re...> writes: [accepted most of the changes pointed out.] [erc-send-pre-hook] > This hook will be run in every case. That is not good. Please try to > preserve the old behavior when possible, in particular when dealing > with when/if hooks are run. Ah. I think the old behaviour was a bug. erc-send-pre-hook explicitly notes that you can change the text that is sent or whether it is sent at all; the text that should go through the checking for whitespace filter should be the final text that you're going to output. You should also have the opportunity to modify the text even if it's just blank lines.=20 > In pre-cvs Emacs this test interprets input of the form "\n+/foo" as a > command, (split-string "\n/foo" "\n") =3D> ("/foo"). > And (split-string "" "\n") =3D> nil, meaning that we won't get a warning > message in this case. That's annoying. pre-cvs emacs seems broken. I'll have to think about an elegant way to handle that.=20 > To summarize: If `erc-send-whitespace-lines' is nil and input consists > only of whitespace erc should beep and complain once (not once per > line),=20 what if the message contains a mixture of blank and non-blank lines? The docstring from erc-warn-about-blank-lines suggests to me it needs to cause at least one beep. I don't know that that is *useful* (but then, I think erc-warn-about-blank-lines is pretty useless, and I'd love to just eliminate it. If anybody does really care about it, a check-and-beep could go into erc-send-pre-hook, instead).=20 --=20 I'm awfully glad I'm a Beta, because I don't work so hard. |