w32fns.c (Fx_create_frame): Use KVAR.
w32term.c (w32_create_terminal): Use KVAR.
s/ms-w32.h (MODE_LINE_BINARY_TEXT): Remove.
xdisp.c (decode_mode_spec): Don't use MODE_LINE_BINARY_TEXT.
fileio.c (Finsert_file_contents, Fwrite_region): Remove
references to buffer_file_type.
(syms_of_fileio): Don't intern and staticpro
find-buffer-file-type.
callproc.c (syms_of_callproc): Remove references to
buffer_file_type.
buffer.c (reset_buffer_local_variables): Don't set
buffer_file_type.
(init_buffer_once): Likewise.
(syms_of_buffer): Don't define buffer-file-type.
buffer.h (struct buffer): Remove buffer_file_type.
+2011-02-16 Eli Zaretskii <eliz@gnu.org>
+
+ * w32fns.c (Fx_create_frame): Use KVAR.
+
+ * w32term.c (w32_create_terminal): Use KVAR.
+
+ * s/ms-w32.h (MODE_LINE_BINARY_TEXT): Remove.
+
+ * xdisp.c (decode_mode_spec): Don't use MODE_LINE_BINARY_TEXT.
+
+ * fileio.c (Finsert_file_contents, Fwrite_region): Remove
+ references to buffer_file_type.
+ (syms_of_fileio): Don't intern and staticpro
+ find-buffer-file-type.
+
+ * callproc.c (syms_of_callproc): Remove references to
+ buffer_file_type.
+
+ * buffer.c (reset_buffer_local_variables): Don't set
+ buffer_file_type.
+ (init_buffer_once): Likewise.
+ (syms_of_buffer): Don't define buffer-file-type.
+
+ * buffer.h (struct buffer): Remove buffer_file_type.
+
2011-02-16 Tom Tromey <tromey@parfait>
* callint.c (Fcall_interactively): Update.
BVAR (b, case_canon_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[1];
BVAR (b, case_eqv_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[2];
BVAR (b, invisibility_spec) = Qt;
-#ifndef DOS_NT
- BVAR (b, buffer_file_type) = Qnil;
-#endif
/* Reset all (or most) per-buffer variables to their defaults. */
if (permanent_too)
BVAR (&buffer_defaults, extra_line_spacing) = Qnil;
BVAR (&buffer_defaults, cursor_in_non_selected_windows) = Qt;
-#ifdef DOS_NT
- BVAR (&buffer_defaults, buffer_file_type) = Qnil; /* TEXT */
-#endif
BVAR (&buffer_defaults, enable_multibyte_characters) = Qt;
BVAR (&buffer_defaults, buffer_file_coding_system) = Qnil;
XSETFASTINT (BVAR (&buffer_defaults, fill_column), 70);
XSETFASTINT (BVAR (&buffer_local_flags, left_margin), idx); ++idx;
XSETFASTINT (BVAR (&buffer_local_flags, abbrev_table), idx); ++idx;
XSETFASTINT (BVAR (&buffer_local_flags, display_table), idx); ++idx;
-#ifdef DOS_NT
- XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_type), idx);
- /* Make this one a permanent local. */
- buffer_permanent_local_flags[idx++] = 1;
-#endif
XSETFASTINT (BVAR (&buffer_local_flags, syntax_table), idx); ++idx;
XSETFASTINT (BVAR (&buffer_local_flags, cache_long_line_scans), idx); ++idx;
XSETFASTINT (BVAR (&buffer_local_flags, category_table), idx); ++idx;
doc: /* Default value of `case-fold-search' for buffers that don't override it.
This is the same as (default-value 'case-fold-search). */);
-#ifdef DOS_NT
- DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-type",
- buffer_file_type,
- doc: /* Default file type for buffers that do not override it.
-This is the same as (default-value 'buffer-file-type).
-The file type is nil for text, t for binary. */);
-#endif
-
DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width",
left_margin_cols,
doc: /* Default value of `left-margin-width' for buffers that don't override it.
`truncate-partial-width-windows', since wrapping can make text readable
in narrower windows. */);
-#ifdef DOS_NT
- DEFVAR_PER_BUFFER ("buffer-file-type", &BVAR (current_buffer, buffer_file_type),
- Qnil,
- doc: /* Non-nil if the visited file is a binary file.
-This variable is meaningful on MS-DOG and Windows NT.
-On those systems, it is automatically local in every buffer.
-On other systems, this variable is normally always nil. */);
-#endif
-
DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
make_number (Lisp_String),
doc: /* Name of default directory of current buffer. Should end with slash.
Lisp_Object BUFFER_INTERNAL_FIELD (left_margin);
/* Function to call when insert space past fill column. */
Lisp_Object BUFFER_INTERNAL_FIELD (auto_fill_function);
- /* nil: text, t: binary.
- This value is meaningful only on certain operating systems. */
- /* Actually, we don't need this flag any more because end-of-line
- is handled correctly according to the buffer-file-coding-system
- of the buffer. Just keeping it for backward compatibility. */
- Lisp_Object BUFFER_INTERNAL_FIELD (buffer_file_type);
/* Case table for case-conversion in this buffer.
This char-table maps each char into its lower-case version. */
/* Pattern used by call-process-region to make temp files. */
static Lisp_Object Vtemp_file_name_pattern;
-#ifdef DOS_NT
-Lisp_Object Qbuffer_file_type;
-#endif /* DOS_NT */
-
/* True if we are about to fork off a synchronous process or if we
are waiting for it. */
int synch_process_alive;
void
syms_of_callproc (void)
{
-#ifdef DOS_NT
- Qbuffer_file_type = intern_c_string ("buffer-file-type");
- staticpro (&Qbuffer_file_type);
-#endif /* DOS_NT */
-
#ifndef DOS_NT
Vtemp_file_name_pattern = build_string ("emacsXXXXXX");
#elif defined (WINDOWSNT)
return (mtime1 > st.st_mtime) ? Qt : Qnil;
}
\f
-#ifdef DOS_NT
-Lisp_Object Qfind_buffer_file_type;
-#endif /* DOS_NT */
-
#ifndef READ_BUF_SIZE
#define READ_BUF_SIZE (64 << 10)
#endif
/* Now INSERTED is measured in characters. */
-#ifdef DOS_NT
- /* Use the conversion type to determine buffer-file-type
- (find-buffer-file-type is now used to help determine the
- conversion). */
- if ((VECTORP (CODING_ID_EOL_TYPE (coding.id))
- || EQ (CODING_ID_EOL_TYPE (coding.id), Qunix))
- && ! CODING_REQUIRE_DECODING (&coding))
- BVAR (current_buffer, buffer_file_type) = Qt;
- else
- BVAR (current_buffer, buffer_file_type) = Qnil;
-#endif
-
handled:
if (deferred_remove_unwind_protect)
int quietly = !NILP (visit);
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
struct buffer *given_buffer;
-#ifdef DOS_NT
- int buffer_file_type = O_BINARY;
-#endif /* DOS_NT */
struct coding_system coding;
if (current_buffer->base_buffer && visiting)
desc = -1;
if (!NILP (append))
#ifdef DOS_NT
- desc = emacs_open (fn, O_WRONLY | buffer_file_type, 0);
+ desc = emacs_open (fn, O_WRONLY | O_BINARY, 0);
#else /* not DOS_NT */
desc = emacs_open (fn, O_WRONLY, 0);
#endif /* not DOS_NT */
if (desc < 0 && (NILP (append) || errno == ENOENT))
#ifdef DOS_NT
desc = emacs_open (fn,
- O_WRONLY | O_CREAT | buffer_file_type
+ O_WRONLY | O_CREAT | O_BINARY
| (EQ (mustbenew, Qexcl) ? O_EXCL : O_TRUNC),
S_IREAD | S_IWRITE);
#else /* not DOS_NT */
Qexcl = intern_c_string ("excl");
staticpro (&Qexcl);
-#ifdef DOS_NT
- Qfind_buffer_file_type = intern_c_string ("find-buffer-file-type");
- staticpro (&Qfind_buffer_file_type);
-#endif /* DOS_NT */
-
DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
doc: /* *Coding system for encoding file names.
If it is nil, `default-file-name-coding-system' (which see) is used. */);
#define HAVE_MENUS 1
#endif
-#define MODE_LINE_BINARY_TEXT(_b_) (NILP (B_(_b_,buffer_file_type)) ? "T" : "B")
-
/* Get some redefinitions in place. */
#ifdef emacs
/* Initialize `default-minibuffer-frame' in case this is the first
frame on this terminal. */
if (FRAME_HAS_MINIBUF_P (f)
- && (!FRAMEP (kb->Vdefault_minibuffer_frame)
- || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))))
- kb->Vdefault_minibuffer_frame = frame;
+ && (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame))
+ || !FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)))))
+ KVAR (kb, Vdefault_minibuffer_frame) = frame;
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
terminal like X does. */
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
- terminal->kboard->Vwindow_system = intern ("w32");
+ KVAR (terminal->kboard, Vwindow_system) = intern ("w32");
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
/* Don't let the initial kboard remain current longer than necessary.
}
case 't': /* indicate TEXT or BINARY */
-#ifdef MODE_LINE_BINARY_TEXT
- return MODE_LINE_BINARY_TEXT (b);
-#else
return "T";
-#endif
case 'z':
/* coding-system (not including end-of-line format) */