unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* flyspell.el patch
@ 2003-10-16 16:09 Lars Magne Ingebrigtsen
  2003-10-16 17:12 ` Miles Bader
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-10-16 16:09 UTC (permalink / raw)


The following patch fixes the in-headers predicated -- if
mail-header-separator is "", it was true on most bodies as well.
Reversing the logic (kinda) should do the trick...

*** flyspell.el.~1.47.~	Thu Oct 16 17:21:41 2003
--- flyspell.el	Thu Oct 16 18:07:35 2003
***************
*** 267,273 ****
  (defun mail-mode-flyspell-verify ()
    "This function is used for `flyspell-generic-check-word-p' in Mail mode."
    (let ((in-headers (save-excursion
! 		      (re-search-forward mail-header-separator nil t)))
  	(in-signature (save-excursion
  			(re-search-backward message-signature-separator nil t))))
      (cond (in-headers
--- 267,273 ----
  (defun mail-mode-flyspell-verify ()
    "This function is used for `flyspell-generic-check-word-p' in Mail mode."
    (let ((in-headers (save-excursion
! 		      (not (re-search-backward mail-header-separator nil t))))
  	(in-signature (save-excursion
  			(re-search-backward message-signature-separator nil t))))
      (cond (in-headers

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: flyspell.el patch
  2003-10-16 16:09 flyspell.el patch Lars Magne Ingebrigtsen
@ 2003-10-16 17:12 ` Miles Bader
  2003-10-16 17:29   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Miles Bader @ 2003-10-16 17:12 UTC (permalink / raw)


On Thu, Oct 16, 2003 at 06:09:42PM +0200, Lars Magne Ingebrigtsen wrote:
> The following patch fixes the in-headers predicated -- if
> mail-header-separator is "", it was true on most bodies as well.
> Reversing the logic (kinda) should do the trick...
>
>     (let ((in-headers (save-excursion
> ! 		      (not (re-search-backward mail-header-separator nil t))))

It still seems wrong -- according to the documentation, mail-header-separator
is _not_ a regexp, so the above code is going to simply always return true for
a typical value like "" (which I use).

I guess it needs to be something like (note no `re-'):

   (not (search-backward (concat "\n" mail-header-separator "\n") nil t))

-Miles
-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: flyspell.el patch
  2003-10-16 17:12 ` Miles Bader
@ 2003-10-16 17:29   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-10-16 17:29 UTC (permalink / raw)


Miles Bader <miles@gnu.org> writes:

> I guess it needs to be something like (note no `re-'):
>
>    (not (search-backward (concat "\n" mail-header-separator "\n") nil t))

Yes, that seems more correct.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-16 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-16 16:09 flyspell.el patch Lars Magne Ingebrigtsen
2003-10-16 17:12 ` Miles Bader
2003-10-16 17:29   ` Lars Magne Ingebrigtsen

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