[Top][All Lists]

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

Re: Odd block highlighting [master build]

From: Kaushal Modi
Subject: Re: Odd block highlighting [master build]
Date: Tue, 20 Sep 2016 19:45:01 +0000

On Tue, Sep 20, 2016 at 3:35 PM John Mastro <address@hidden> wrote:
Kaushal Modi <address@hidden> wrote:

I don't have any insight into this, but I noticed that the highlighting
(and the change in your mouse cursor) seems to mirror what happens when
you move your mouse over the strings.

Correct. I have seen that happen and on investigating further, it is caused by the flyspell package if the string is detected to have a typo. As seen in the gifv, those strings are gibberish and so flyspell puts overlays on those.. and maybe some weird regexp match is causing the same overlay to be put on the whole block?

Here is a code excerpt from flyspell.el:

(defun make-flyspell-overlay (beg end face mouse-face)
  "Allocate an overlay to highlight an incorrect word.
BEG and END specify the range in the buffer of that word.
FACE and MOUSE-FACE specify the `face' and `mouse-face' properties
for the overlay."
  (let ((overlay (make-overlay beg end nil t nil)))
    (overlay-put overlay 'face face)
    (overlay-put overlay 'mouse-face mouse-face)
    (overlay-put overlay 'flyspell-overlay t)
    (overlay-put overlay 'evaporate t)
    (overlay-put overlay 'help-echo "mouse-2: correct word at point")
    (overlay-put overlay 'keymap flyspell-mouse-map)
    (when (eq face 'flyspell-incorrect)
      (and (stringp flyspell-before-incorrect-word-string)
           (overlay-put overlay 'before-string
      (and (stringp flyspell-after-incorrect-word-string)
           (overlay-put overlay 'after-string

Next time, this happen I will put debug statements in the flyspell-highlight-incorrect-region function.
Since you didn't mention the thing
with the strings, is it safe to assume that's expected?

I expected that, but did not investigate what caused that as it looked right. Now I know that probably flyspell is causing this..
If so, what major/minor mode provides that functionality? From a
position of ignorance, my first thought is that it seems related.

It was a good question :) 


Kaushal Modi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]