From 557ca2c1b40f8bd3061e242ec4346d099a37d032 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 18 Sep 2004 19:20:53 +0000 Subject: [PATCH] (syms_of_buffer) : Doc fix. --- src/ChangeLog | 2 ++ src/buffer.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3d8cfd61200..9cd8931ff8a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2004-09-18 Richard M. Stallman + * buffer.c (syms_of_buffer) : Doc fix. + * xdisp.c (try_window_reusing_current_matrix): Handle the case where we reach the old displayed text, out of sync with the old line boundary. diff --git a/src/buffer.c b/src/buffer.c index c70831e155f..b1c453816ce 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5430,7 +5430,14 @@ Decimal digits after the % specify field width to which to pad. */); DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. -nil here means use current buffer's major mode. */); +nil here means use current buffer's major mode, provided it is not +marked as "special". + +When a mode is used by default, `find-file' switches to it +before it reads the contents into the buffer and before +it finishes setting up the buffer. Thus, the mode and +its hooks should not expect certain variables such as +`buffer-read-only' and `buffer-file-coding-system' to be set up. */); DEFVAR_PER_BUFFER ("major-mode", ¤t_buffer->major_mode, make_number (Lisp_Symbol), -- 2.39.2