From: lawrence m. <we...@gm...> - 2004-07-15 12:11:58
|
Michael Olson wrote: [...] > I figured out what the problem is. My original patch tried to set the > inhibit-read-only variable to `t' in order to be able to kill the > prompt when exiting. What I needed to do was use > erc-remove-text-properties-region to remove the read-only property of > the prompt before killing. Why does let-binding (I assume that's what you're doing) inhibit-read-only to t not allow reconnection. That sounds like a deeper problem, but, without looking, I'm not really sure. [...] >> ;; Kill the prompt >> ;; (XEmacs users beware: it doesn't seem to work for you) >> (beginning-of-line) >> (erc-remove-text-properties-region (point) (point-max)) >> (kill-line nil) Better written as: (forward-line 0) (erc-remove-text-properties-region (point) (point-max)) (delete-region (point) (point-max)) That way you don't have to worry about the dodgy behaviour of beginning-of-line with invisible/intangible stuff, and you don't add the prompt to the kill ring, which would definitely not be expected by the user. [...] -- lawrence mitchell <we...@gm...> |