[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with overlays
From: |
martin rudalics |
Subject: |
Re: problems with overlays |
Date: |
Wed, 25 Apr 2007 08:39:19 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
The following should work, but still overkills.
....
(goto-char satz-ende)
(gspell-remove-comma-overlays)
(while (re-search-backward "," satz-anfang t)
(let ((ov (make-overlay (match-beginning 0) (match-end 0) nil t)))
(overlay-put ov 'face 'gspell-highlight-commata-face)
(overlay-put ov 'gspell-comma t))))))))
(defun gspell-remove-comma-overlays ()
"Remove all comma-overlays from buffer."
(interactive)
(dolist (overlay (overlays-in (point-min) (point-max)))
(when (overlay-get overlay 'gspell-comma)
(delete-overlay overlay))))