Commit 6a94510a authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(Vmessages_buffer_name): New variable.

(message_dolog): Use it.
(syms_of_xdisp): Initialize it.
parent 2cb085db
...@@ -453,6 +453,10 @@ static int line_number_display_limit_width; ...@@ -453,6 +453,10 @@ static int line_number_display_limit_width;
Lisp_Object Vmessage_log_max; Lisp_Object Vmessage_log_max;
/* The name of the *Messages* buffer, a string. */
static Lisp_Object Vmessages_buffer_name;
/* Current, index 0, and last displayed echo area message. Either /* Current, index 0, and last displayed echo area message. Either
buffers from echo_buffers, or nil to indicate no message. */ buffers from echo_buffers, or nil to indicate no message. */
...@@ -4898,18 +4902,9 @@ message_dolog (m, len, nlflag, multibyte) ...@@ -4898,18 +4902,9 @@ message_dolog (m, len, nlflag, multibyte)
Lisp_Object old_deactivate_mark, tem; Lisp_Object old_deactivate_mark, tem;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
static Lisp_Object messages_buffer_name;
static int buffer_name_initialized;
old_deactivate_mark = Vdeactivate_mark; old_deactivate_mark = Vdeactivate_mark;
oldbuf = current_buffer; oldbuf = current_buffer;
if (!buffer_name_initialized) Fset_buffer (Fget_buffer_create (Vmessages_buffer_name));
{
messages_buffer_name = build_string ("*Messages*");
staticpro (&messages_buffer_name);
buffer_name_initialized = 1;
}
Fset_buffer (Fget_buffer_create (messages_buffer_name));
current_buffer->undo_list = Qt; current_buffer->undo_list = Qt;
oldpoint = Fpoint_marker (); oldpoint = Fpoint_marker ();
...@@ -13245,6 +13240,9 @@ syms_of_xdisp () ...@@ -13245,6 +13240,9 @@ syms_of_xdisp ()
staticpro (&echo_area_buffer[0]); staticpro (&echo_area_buffer[0]);
staticpro (&echo_area_buffer[1]); staticpro (&echo_area_buffer[1]);
Vmessages_buffer_name = build_string ("*Messages*");
staticpro (&Vmessages_buffer_name);
DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace, DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace,
"Non-nil means highlight trailing whitespace.\n\ "Non-nil means highlight trailing whitespace.\n\
The face used for trailing whitespace is `trailing-whitespace'."); The face used for trailing whitespace is `trailing-whitespace'.");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment