regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 7
+#define PATCHLEVEL 8
#endif /* _PATCHLEVEL_H_ */
#if defined (READLINE)
# include "bashline.h"
+# include <readline/readline.h>
#endif
#if defined (HISTORY)
#if defined (HISTORY)
extern int history_lines_this_session;
#endif
+extern int no_line_editing;
extern void initialize_siglist ();
{
#if defined (HISTORY)
/* XXX - will inhibit history file being written */
- history_lines_this_session = 0;
+# if defined (READLINE)
+ if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0))
+# endif
+ history_lines_this_session = 0;
#endif
terminate_immediately = 0;
termsig_handler (sig);