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

Re: Fixed highlighting in draft mode



At Tue, 19 Jan 2010 10:09:18 -0500, David Abrahams wrote:

> Maybe pcl-cvs lied to me that the checkin succeeded.  It's really
> strange.  But maybe that's a good thing because it seems to have
> broken delete-selection-mode.
> 
> I'll investigate further.

How about such hack?

(defun my-highlight-hook (beg end len)
  (let ((begining (save-excursion
		    (goto-char beg)
		    (re-search-backward "^" nil t)))
	(ending (save-excursion
		  (goto-char end)
		  (re-search-forward "$" nil t))))
    (put-text-property begining ending 'face nil)
    (wl-highlight-message begining ending t nil)
    (wl-highlight-message begining ending t t)))

(add-hook 'wl-draft-mode-hook (lambda ()
				(add-hook 'after-change-functions
					  'my-highlight-hook)))

And, yes, my assumption about highlighting in SEMI was wrong.
-- 
wbr, Vitaly