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