all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: More problems with flyspell
Date: Mon, 09 Jan 2006 23:16:05 -0500	[thread overview]
Message-ID: <87psn0k9h4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20060109225602.GB5150@agmartin.aq.upm.es> (Agustin Martin's message of "Mon, 9 Jan 2006 23:56:02 +0100")

>> Looking at this patch, I feel like my flyspell-last-buffer should probably
>> be moved from flyspell.el to ispell.el (and renamed ispell-last-buffer).

> If I am not wrong nothing in ispell.el really needs it, is (flyspell-word)
> in a loop what needs it.  If patch is correct, it will only be set if
> flyspell.el is loaded, so flyspell.el seems not that a bad place.  And it
> indeed shows name of last buffer accessed by a flyspell operation.
> Its presence in ispell.el is a bit surprising, but harmless when
> flyspell.el is not loaded.

ispell.el is not just an end-user package: it's also a library that provides
services for flyspell.  The flyspell-last-buffer variable was introduced to
optimize a particular operation because flyspell needs that optimization,
but the right place to put that optimization is in the ispell.el library,
even if the ispell.el end-user commands don't directly benefit from it.

>> PS: Maybe the same should be done with flyspell-word-cache-word, of course,
>> but I'm not familiar enough with it.

> That is flyspell only, stores last word checked by (flyspell-word), so
> flyspell-word is not called again unless cursor goes to a different word.
> However is good to have it cleared when dict is changed to force re-checking
> of current word, and the dict change is done from ispell.el. I think this
> one should not be moved.

Then maybe rather than move flyspell-last-buffer and
flyspell-word-cache-word to ispell.el, ispell.el should provide an
ispell-start-process-hook or ispell-change-dict-hook that flyspell could use
to reset those vars.

Doing a (featurep 'flyspell) test is just really ugly.


        Stefan

  reply	other threads:[~2006-01-10  4:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05 13:37 More problems with flyspell Piet van Oostrum
2006-01-05 21:52 ` Stefan Monnier
2006-01-06  0:11 ` Agustin Martin
2006-01-08 14:47   ` Richard M. Stallman
2006-01-09 12:53     ` Agustin Martin
2006-01-09 18:26       ` Agustin Martin
2006-01-09 21:53         ` Stefan Monnier
2006-01-09 22:56           ` Agustin Martin
2006-01-10  4:16             ` Stefan Monnier [this message]
2006-01-10 14:46               ` Agustin Martin

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

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

  git send-email \
    --in-reply-to=87psn0k9h4.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.