aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 0daa2325795..e0843723232 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -115,41 +115,8 @@ static void reset_buffer_local_variables (struct buffer *, bool);
115 due to user rplac'ing this alist or its elements. */ 115 due to user rplac'ing this alist or its elements. */
116Lisp_Object Vbuffer_alist; 116Lisp_Object Vbuffer_alist;
117 117
118static Lisp_Object Qkill_buffer_query_functions;
119
120/* Hook run before changing a major mode. */
121static Lisp_Object Qchange_major_mode_hook;
122
123Lisp_Object Qfirst_change_hook;
124Lisp_Object Qbefore_change_functions;
125Lisp_Object Qafter_change_functions;
126
127static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local;
128static Lisp_Object Qpermanent_local_hook;
129
130static Lisp_Object Qprotected_field;
131
132static Lisp_Object QSFundamental; /* A string "Fundamental". */ 118static Lisp_Object QSFundamental; /* A string "Fundamental". */
133 119
134static Lisp_Object Qkill_buffer_hook;
135static Lisp_Object Qbuffer_list_update_hook;
136
137static Lisp_Object Qget_file_buffer;
138
139static Lisp_Object Qoverlayp;
140
141Lisp_Object Qpriority, Qbefore_string, Qafter_string;
142
143static Lisp_Object Qevaporate;
144
145Lisp_Object Qmodification_hooks;
146Lisp_Object Qinsert_in_front_hooks;
147Lisp_Object Qinsert_behind_hooks;
148
149Lisp_Object Qchoice, Qrange, Qleft, Qright;
150Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar;
151static Lisp_Object Qoverwrite_mode, Qfraction;
152
153static void alloc_buffer_text (struct buffer *, ptrdiff_t); 120static void alloc_buffer_text (struct buffer *, ptrdiff_t);
154static void free_buffer_text (struct buffer *b); 121static void free_buffer_text (struct buffer *b);
155static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); 122static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *);
@@ -1716,7 +1683,7 @@ cleaning up all windows currently displaying the buffer to be killed. */)
1716 return unbind_to (count, Qt); 1683 return unbind_to (count, Qt);
1717 1684
1718 /* Then run the hooks. */ 1685 /* Then run the hooks. */
1719 Frun_hooks (1, &Qkill_buffer_hook); 1686 run_hook (Qkill_buffer_hook);
1720 unbind_to (count, Qnil); 1687 unbind_to (count, Qnil);
1721 } 1688 }
1722 1689
@@ -2740,7 +2707,7 @@ The first thing this function does is run
2740the normal hook `change-major-mode-hook'. */) 2707the normal hook `change-major-mode-hook'. */)
2741 (void) 2708 (void)
2742{ 2709{
2743 Frun_hooks (1, &Qchange_major_mode_hook); 2710 run_hook (Qchange_major_mode_hook);
2744 2711
2745 /* Make sure none of the bindings in local_var_alist 2712 /* Make sure none of the bindings in local_var_alist
2746 remain swapped in, in their symbols. */ 2713 remain swapped in, in their symbols. */
@@ -5063,9 +5030,9 @@ init_buffer_once (void)
5063 /* Make sure all markable slots in buffer_defaults 5030 /* Make sure all markable slots in buffer_defaults
5064 are initialized reasonably, so mark_buffer won't choke. */ 5031 are initialized reasonably, so mark_buffer won't choke. */
5065 reset_buffer (&buffer_defaults); 5032 reset_buffer (&buffer_defaults);
5066 eassert (EQ (BVAR (&buffer_defaults, name), make_number (0))); 5033 eassert (NILP (BVAR (&buffer_defaults, name)));
5067 reset_buffer_local_variables (&buffer_defaults, 1); 5034 reset_buffer_local_variables (&buffer_defaults, 1);
5068 eassert (EQ (BVAR (&buffer_local_symbols, name), make_number (0))); 5035 eassert (NILP (BVAR (&buffer_local_symbols, name)));
5069 reset_buffer (&buffer_local_symbols); 5036 reset_buffer (&buffer_local_symbols);
5070 reset_buffer_local_variables (&buffer_local_symbols, 1); 5037 reset_buffer_local_variables (&buffer_local_symbols, 1);
5071 /* Prevent GC from getting confused. */ 5038 /* Prevent GC from getting confused. */