unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: John Mastro <john.b.mastro@gmail.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Odd block highlighting [master build]
Date: Tue, 20 Sep 2016 19:45:01 +0000	[thread overview]
Message-ID: <CAFyQvY1xow0AWBnn1fJdB8n=mpN8iCUr1FN4d_H-iSp5=iXZGA@mail.gmail.com> (raw)
In-Reply-To: <CAOj2CQQPocq01KtOdntREHYufUzBNig-arsTpman8EDZVS2UjQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]

On Tue, Sep 20, 2016 at 3:35 PM John Mastro <john.b.mastro@gmail.com> wrote:

> Kaushal Modi <kaushal.modi@gmail.com> 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
                        flyspell-before-incorrect-word-string))
      (and (stringp flyspell-after-incorrect-word-string)
           (overlay-put overlay 'after-string
                        flyspell-after-incorrect-word-string)))
    overlay))

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 :)

        John
>
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 3513 bytes --]

      parent reply	other threads:[~2016-09-20 19:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 18:44 Odd block highlighting [master build] Kaushal Modi
2016-09-20 18:47 ` Odd block highlighting [emacs-25 branch build] (Was: .. master build]) Kaushal Modi
2016-09-20 19:35 ` Odd block highlighting [master build] John Mastro
2016-09-20 19:44   ` Noam Postavsky
2016-09-20 19:50     ` Kaushal Modi
2016-09-20 20:06       ` Kaushal Modi
2016-09-20 20:10         ` Kaushal Modi
2016-09-20 20:53           ` Kaushal Modi
2016-09-20 21:48             ` Noam Postavsky
2016-09-20 20:49         ` John Mastro
2016-09-20 20:58           ` Kaushal Modi
2016-09-20 19:45   ` Kaushal Modi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY1xow0AWBnn1fJdB8n=mpN8iCUr1FN4d_H-iSp5=iXZGA@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=john.b.mastro@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).