another minor cleanup

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1993 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-10-15 16:35:34 +00:00
parent 4b7e3c3efa
commit 9cf7b28248
1 changed files with 12 additions and 8 deletions

View File

@ -1428,11 +1428,13 @@ bool do_int_spell_fix(const char *word)
bool case_sens_set = ISSET(CASE_SENSITIVE);
#ifndef NANO_SMALL
bool reverse_search_set = ISSET(REVERSE_SEARCH);
bool old_mark_set = ISSET(MARK_ISSET);
#endif
#ifdef HAVE_REGEX_H
bool regexp_set = ISSET(USE_REGEXP);
#endif
#ifndef NANO_SMALL
bool old_mark_set = ISSET(MARK_ISSET);
#endif
/* Make sure spell-check is case sensitive. */
SET(CASE_SENSITIVE);
@ -1440,14 +1442,15 @@ bool do_int_spell_fix(const char *word)
#ifndef NANO_SMALL
/* Make sure spell-check goes forward only. */
UNSET(REVERSE_SEARCH);
/* Make sure the marking highlight is off during spell-check. */
UNSET(MARK_ISSET);
#endif
#ifdef HAVE_REGEX_H
/* Make sure spell-check doesn't use regular expressions. */
UNSET(USE_REGEXP);
#endif
#ifndef NANO_SMALL
/* Make sure the marking highlight is off during spell-check. */
UNSET(MARK_ISSET);
#endif
/* Save the current search/replace strings. */
search_init_globals();
@ -1508,16 +1511,17 @@ bool do_int_spell_fix(const char *word)
/* Restore search/replace direction. */
if (reverse_search_set)
SET(REVERSE_SEARCH);
/* Restore marking highlight. */
if (old_mark_set)
SET(MARK_ISSET);
#endif
#ifdef HAVE_REGEX_H
/* Restore regular expression usage setting. */
if (regexp_set)
SET(USE_REGEXP);
#endif
#ifndef NANO_SMALL
/* Restore marking highlight. */
if (old_mark_set)
SET(MARK_ISSET);
#endif
return accepted;
}