From a4ada374d6f96b5a7b9fe8df57307fae3fcd3351 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Wed, 11 Nov 2009 06:10:42 +0000 Subject: [PATCH] * xfns.c (syms_of_xfns): Use make_pure_string instead of build_string. * xterm.c (syms_of_xterm): * xfaces.c (syms_of_xfaces): * xdisp.c (syms_of_xdisp): * lread.c (syms_of_lread): * keyboard.c (syms_of_keyboard): Use make_pure_c_string instead of build_string. * doc.c (Fsnarf_documentation): Purecopy Vbuild_files. --- src/ChangeLog | 11 +++++++++++ src/doc.c | 1 + src/keyboard.c | 2 +- src/lread.c | 4 ++-- src/xdisp.c | 20 ++++++++++---------- src/xfaces.c | 2 +- src/xfns.c | 2 +- src/xterm.c | 2 +- 8 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c9634e7f4c..933752178f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2009-11-11 Dan Nicolaescu + + * xfns.c (syms_of_xfns): Use make_pure_string instead of build_string. + * xterm.c (syms_of_xterm): + * xfaces.c (syms_of_xfaces): + * xdisp.c (syms_of_xdisp): + * lread.c (syms_of_lread): + * keyboard.c (syms_of_keyboard): Use make_pure_c_string instead of + build_string. + * doc.c (Fsnarf_documentation): Purecopy Vbuild_files. + 2009-11-10 Stefan Monnier * fns.c (Fplist_get): Merge the active and the uncommented code. diff --git a/src/doc.c b/src/doc.c index dd933909f7..30b909b8ce 100644 --- a/src/doc.c +++ b/src/doc.c @@ -619,6 +619,7 @@ the same file name is found in the `doc-directory'. */) if (len > 0) Vbuild_files = Fcons (make_string (beg, len), Vbuild_files); } + Vbuild_files = Fpurecopy (Vbuild_files); } fd = emacs_open (name, O_RDONLY, 0); diff --git a/src/keyboard.c b/src/keyboard.c index 872bd81ed4..3b4f0c54eb 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11729,7 +11729,7 @@ syms_of_keyboard () pending_funcalls = Qnil; staticpro (&pending_funcalls); - Vlispy_mouse_stem = build_string ("mouse"); + Vlispy_mouse_stem = make_pure_c_string ("mouse"); staticpro (&Vlispy_mouse_stem); /* Tool-bars. */ diff --git a/src/lread.c b/src/lread.c index a75836f046..a3cb505f72 100644 --- a/src/lread.c +++ b/src/lread.c @@ -4330,8 +4330,8 @@ otherwise to default specified by file `epaths.h' when Emacs was built. */); This list should not include the empty string. `load' and related functions try to append these suffixes, in order, to the specified file name if a Lisp suffix is allowed or required. */); - Vload_suffixes = Fcons (build_string (".elc"), - Fcons (build_string (".el"), Qnil)); + Vload_suffixes = Fcons (make_pure_c_string (".elc"), + Fcons (make_pure_c_string (".el"), Qnil)); DEFVAR_LISP ("load-file-rep-suffixes", &Vload_file_rep_suffixes, doc: /* List of suffixes that indicate representations of \ the same file. diff --git a/src/xdisp.c b/src/xdisp.c index 5b6fdf83fe..46cd45a9eb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -24782,7 +24782,7 @@ syms_of_xdisp () staticpro (&echo_area_buffer[0]); staticpro (&echo_area_buffer[1]); - Vmessages_buffer_name = build_string ("*Messages*"); + Vmessages_buffer_name = make_pure_c_string ("*Messages*"); staticpro (&Vmessages_buffer_name); mode_line_proptrans_alist = Qnil; @@ -24852,7 +24852,7 @@ See also `overlay-arrow-string'. */); DEFVAR_LISP ("overlay-arrow-string", &Voverlay_arrow_string, doc: /* String to display as an arrow in non-window frames. See also `overlay-arrow-position'. */); - Voverlay_arrow_string = build_string ("=>"); + Voverlay_arrow_string = make_pure_c_string ("=>"); DEFVAR_LISP ("overlay-arrow-variable-list", &Voverlay_arrow_variable_list, doc: /* List of variables (symbols) which hold markers for overlay arrows. @@ -24953,14 +24953,14 @@ and is used only on frames for which no explicit name has been set \(see `modify-frame-parameters'). */); Vicon_title_format = Vframe_title_format - = Fcons (intern_c_string ("multiple-frames"), - Fcons (build_string ("%b"), - Fcons (Fcons (empty_unibyte_string, - Fcons (intern_c_string ("invocation-name"), - Fcons (build_string ("@"), - Fcons (intern_c_string ("system-name"), - Qnil)))), - Qnil))); + = pure_cons (make_pure_c_string ("multiple-frames"), + pure_cons (make_pure_c_string ("%b"), + pure_cons (pure_cons (empty_unibyte_string, + pure_cons (intern_c_string ("invocation-name"), + pure_cons (make_pure_c_string ("@"), + pure_cons (intern_c_string ("system-name"), + Qnil)))), + Qnil))); DEFVAR_LISP ("message-log-max", &Vmessage_log_max, doc: /* Maximum number of lines to keep in the message log buffer. diff --git a/src/xfaces.c b/src/xfaces.c index 9da3cc7f32..4c7f2d969d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6952,7 +6952,7 @@ that number of fonts when searching for a matching font. */); This stipple pattern is used on monochrome displays instead of shades of gray for a face background color. See `set-face-stipple' for possible values for this variable. */); - Vface_default_stipple = build_string ("gray3"); + Vface_default_stipple = make_pure_c_string ("gray3"); DEFVAR_LISP ("tty-defined-color-alist", &Vtty_defined_color_alist, doc: /* An alist of defined terminal colors and their RGB values. */); diff --git a/src/xfns.c b/src/xfns.c index 8fd46fa1a0..9d4c1f8063 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5932,7 +5932,7 @@ the tool bar buttons. */); char gtk_version[40]; g_snprintf (gtk_version, sizeof (gtk_version), "%u.%u.%u", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - Vgtk_version_string = build_string (gtk_version); + Vgtk_version_string = make_pure_string (gtk_version, strlen (gtk_version), strlen (gtk_version), 0); } #endif /* USE_GTK */ diff --git a/src/xterm.c b/src/xterm.c index 545f3a5254..9936e98b1e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10847,7 +10847,7 @@ syms_of_xterm () last_mouse_press_frame = Qnil; #ifdef USE_GTK - xg_default_icon_file = build_string ("icons/hicolor/scalable/apps/emacs.svg"); + xg_default_icon_file = make_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg"); staticpro (&xg_default_icon_file); Qx_gtk_map_stock = intern_c_string ("x-gtk-map-stock"); -- 2.20.1