diff options
| author | Richard M. Stallman | 1994-01-08 09:21:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-08 09:21:59 +0000 |
| commit | 54ad07d30fe057d5709f9deb939bca788ba01c8c (patch) | |
| tree | 9dab1e2f649e32387d5b84b12a38d67d4b63f818 /src/buffer.c | |
| parent | 7e6c2178ef8c158c5625bc460240482377659e6a (diff) | |
| download | emacs-54ad07d30fe057d5709f9deb939bca788ba01c8c.tar.gz emacs-54ad07d30fe057d5709f9deb939bca788ba01c8c.zip | |
[MSDOS]: New buffer-local variable:
buffer-file-type to handle DOS newlines.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 3d263a2d754..e25d3cef36a 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -140,6 +140,10 @@ Lisp_Object Qinsert_behind_hooks; | |||
| 140 | /* For debugging; temporary. See set_buffer_internal. */ | 140 | /* For debugging; temporary. See set_buffer_internal. */ |
| 141 | /* Lisp_Object Qlisp_mode, Vcheck_symbol; */ | 141 | /* Lisp_Object Qlisp_mode, Vcheck_symbol; */ |
| 142 | 142 | ||
| 143 | #ifdef MSDOS | ||
| 144 | Lisp_Object Qbuffer_file_type; | ||
| 145 | #endif | ||
| 146 | |||
| 143 | nsberror (spec) | 147 | nsberror (spec) |
| 144 | Lisp_Object spec; | 148 | Lisp_Object spec; |
| 145 | { | 149 | { |
| @@ -2064,6 +2068,9 @@ init_buffer_once () | |||
| 2064 | buffer_defaults.truncate_lines = Qnil; | 2068 | buffer_defaults.truncate_lines = Qnil; |
| 2065 | buffer_defaults.ctl_arrow = Qt; | 2069 | buffer_defaults.ctl_arrow = Qt; |
| 2066 | 2070 | ||
| 2071 | #ifdef MSDOS | ||
| 2072 | buffer_defaults.buffer_file_type = 0; /* TEXT */ | ||
| 2073 | #endif | ||
| 2067 | XFASTINT (buffer_defaults.fill_column) = 70; | 2074 | XFASTINT (buffer_defaults.fill_column) = 70; |
| 2068 | XFASTINT (buffer_defaults.left_margin) = 0; | 2075 | XFASTINT (buffer_defaults.left_margin) = 0; |
| 2069 | 2076 | ||
| @@ -2105,6 +2112,9 @@ init_buffer_once () | |||
| 2105 | XFASTINT (buffer_local_flags.abbrev_table) = 0x1000; | 2112 | XFASTINT (buffer_local_flags.abbrev_table) = 0x1000; |
| 2106 | XFASTINT (buffer_local_flags.display_table) = 0x2000; | 2113 | XFASTINT (buffer_local_flags.display_table) = 0x2000; |
| 2107 | XFASTINT (buffer_local_flags.syntax_table) = 0x8000; | 2114 | XFASTINT (buffer_local_flags.syntax_table) = 0x8000; |
| 2115 | #ifdef MSDOS | ||
| 2116 | XFASTINT (buffer_local_flags.buffer_file_type) = 0x4000; | ||
| 2117 | #endif | ||
| 2108 | 2118 | ||
| 2109 | Vbuffer_alist = Qnil; | 2119 | Vbuffer_alist = Qnil; |
| 2110 | current_buffer = 0; | 2120 | current_buffer = 0; |
| @@ -2239,6 +2249,14 @@ This is the same as (default-value 'tab-width)."); | |||
| 2239 | "Default value of `case-fold-search' for buffers that don't override it.\n\ | 2249 | "Default value of `case-fold-search' for buffers that don't override it.\n\ |
| 2240 | This is the same as (default-value 'case-fold-search)."); | 2250 | This is the same as (default-value 'case-fold-search)."); |
| 2241 | 2251 | ||
| 2252 | #ifdef MSDOS | ||
| 2253 | DEFVAR_LISP_NOPRO ("default-buffer-file-type", | ||
| 2254 | &buffer_defaults.buffer_file_type, | ||
| 2255 | "Default file type for buffers that do not override it.\n\ | ||
| 2256 | This is the same as (default-value 'buffer-file-type).\n\ | ||
| 2257 | The file type is nil for text, t for binary."); | ||
| 2258 | #endif | ||
| 2259 | |||
| 2242 | DEFVAR_PER_BUFFER ("mode-line-format", ¤t_buffer->mode_line_format, | 2260 | DEFVAR_PER_BUFFER ("mode-line-format", ¤t_buffer->mode_line_format, |
| 2243 | Qnil, 0); | 2261 | Qnil, 0); |
| 2244 | 2262 | ||
| @@ -2268,6 +2286,7 @@ A string is printed verbatim in the mode line except for %-constructs:\n\ | |||
| 2268 | %s -- print process status. %l -- print the current line number.\n\ | 2286 | %s -- print process status. %l -- print the current line number.\n\ |
| 2269 | %p -- print percent of buffer above top of window, or top, bot or all.\n\ | 2287 | %p -- print percent of buffer above top of window, or top, bot or all.\n\ |
| 2270 | %n -- print Narrow if appropriate.\n\ | 2288 | %n -- print Narrow if appropriate.\n\ |
| 2289 | %t -- print T if files is text, B if binary.\n\ | ||
| 2271 | %[ -- print one [ for each recursive editing level. %] similar.\n\ | 2290 | %[ -- print one [ for each recursive editing level. %] similar.\n\ |
| 2272 | %% -- print %. %- -- print infinitely many dashes.\n\ | 2291 | %% -- print %. %- -- print infinitely many dashes.\n\ |
| 2273 | Decimal digits after the % specify field width to which to pad."); | 2292 | Decimal digits after the % specify field width to which to pad."); |
| @@ -2326,6 +2345,12 @@ Note that this is overridden by the variable\n\ | |||
| 2326 | `truncate-partial-width-windows' if that variable is non-nil\n\ | 2345 | `truncate-partial-width-windows' if that variable is non-nil\n\ |
| 2327 | and this buffer is not full-frame width."); | 2346 | and this buffer is not full-frame width."); |
| 2328 | 2347 | ||
| 2348 | #ifdef MSDOS | ||
| 2349 | DEFVAR_PER_BUFFER ("buffer-file-type", ¤t_buffer->buffer_file_type, | ||
| 2350 | Qnil, | ||
| 2351 | "*If visited file is text, nil; otherwise, t."); | ||
| 2352 | #endif | ||
| 2353 | |||
| 2329 | DEFVAR_PER_BUFFER ("default-directory", ¤t_buffer->directory, | 2354 | DEFVAR_PER_BUFFER ("default-directory", ¤t_buffer->directory, |
| 2330 | make_number (Lisp_String), | 2355 | make_number (Lisp_String), |
| 2331 | "Name of default directory of current buffer. Should end with slash.\n\ | 2356 | "Name of default directory of current buffer. Should end with slash.\n\ |