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

Re: Draft cursor position



At Fri, 14 May 2010 17:56:57 +0200,
David Maus wrote:
> 
> [1  <text/plain; US-ASCII (7bit)>]
> Richard Lewis wrote:
> >At Tue, 13 Apr 2010 16:58:57 +0100,
> >Richard Lewis wrote:
> >>
> >> Is there a hook in wl which gets called when, in draft-mode, the
> >> cursor moves above or below the "--text follows this line--" marker?
> >>
> >Nevermind, I've written my own:
> 
> 
> >I expect there's probably an existing solution to this.
> 
> >Basically, all I was trying to achieve was to be able to enable
> >flyspell-mode when in the body of a wl-draft-mode buffer, and disable
> >it when I'm in the headers section. This prevents flyspell-mode from
> >clobbering the bbdb completion keybinding.
> 
> Hah!  I was just looking how to disable flyspell M-TAB completion at
> all to achive the same and there is a simpler solution:
> 
> http://article.gmane.org/gmane.emacs.bbdb.user/349
> 
> (defadvice flyspell-auto-correct-word (around rather-bbdb-complete-name activate)
>   (when (and (interactive-p)
> 	     (eq major-mode 'mime-edit-mode)
> 	     (<= (point) (mail-header-end)))
>     (bbdb-complete-name)))
> 
There's always a simpler solution to my elisp hacks! Thanks very much,
very helpful.
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
ISMS, Computing
Goldsmiths, University of London
Tel: +44 (0)20 7078 5134
Skype: richardjlewis
JID: ironchicken@jabber.earth.li
http://www.richard-lewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+----------------------------------------------+
| Support open access to scholarship           |
| http://freeculture.org/ http://www.doaj.org/ |
+----------------------------------------------+