#include "lisp.h"
#include "charset.h"
#include "coding.h"
+#include "keyboard.h"
#include "frame.h"
#include "disptab.h"
#include "termhooks.h"
-#include "keyboard.h"
#include "dispextern.h"
#include "window.h"
-#ifdef HAVE_TERMCAP_H
+/* For now, don't try to include termcap.h. On some systems,
+ configure finds a non-standard termcap.h that the main build
+ won't find. */
+
+#if defined HAVE_TERMCAP_H && 0
#include <termcap.h>
#else
extern void tputs P_ ((const char *, int, int (*)(int)));
#ifdef HAVE_X_WINDOWS
#include "xterm.h"
#endif
+#ifdef macintosh
+#include "macterm.h"
+#endif
static void turn_on_face P_ ((struct frame *, int face_id));
static void turn_off_face P_ ((struct frame *, int face_id));
else if (chars_wasted && chars_wasted[vpos] == 0)
/* For terminals with standout markers, write one on this line
if there isn't one already. */
- write_standout_marker (highlight, vpos);
+ write_standout_marker (inverse_video ? !highlight : highlight, vpos);
}
/* Call this when about to modify line at position VPOS
/* Turn appearance modes off. */
turn_off_face (f, face_id);
+ turn_off_highlight ();
}
/* We may have to output some codes to terminate the writing. */
register int len;
{
char *buf;
- struct glyph *glyph;
+ struct glyph *glyph = NULL;
struct frame *f, *sf;
if (len <= 0)
sf = XFRAME (selected_frame);
f = updating_frame ? updating_frame : sf;
- highlight_if_desired ();
if (TS_ins_multi_chars)
{
}
else
{
+ highlight_if_desired ();
turn_on_face (f, start->face_id);
glyph = start;
++start;
OUTPUT1_IF (TS_pad_inserted_char);
if (start)
- turn_off_face (f, glyph->face_id);
+ {
+ turn_off_face (f, glyph->face_id);
+ turn_off_highlight ();
+ }
}
cmcheckmagic ();
|| face->tty_alt_charset_p
|| face->tty_blinking_p
|| face->tty_underline_p)
- OUTPUT1_IF (TS_exit_attribute_mode);
+ {
+ OUTPUT1_IF (TS_exit_attribute_mode);
+ if (strcmp (TS_exit_attribute_mode, TS_end_standout_mode) == 0)
+ standout_mode = 0;
+ }
if (face->tty_alt_charset_p)
OUTPUT_IF (TS_exit_alt_charset_mode);
-
- if (standout_mode)
- standout_mode = 0;
}
else
{