aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorPaul Eggert2011-04-15 00:48:51 -0700
committerPaul Eggert2011-04-15 00:48:51 -0700
commit4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9 (patch)
treee993b231bb5555c9c961f5d0b20d90ac76f77bbd /src/buffer.c
parent1963a2e0bb07cc8dee6d27f972f93d9cfd7c6b2d (diff)
parent49093f601b69d91126aefd328ee8f6bfeb797407 (diff)
downloademacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.tar.gz
emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.zip
Merge from mainline.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/buffer.c b/src/buffer.c
index a0054e32d0a..c649836adb8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -100,6 +100,8 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS];
100 100
101int last_per_buffer_idx; 101int last_per_buffer_idx;
102 102
103static Lisp_Object Fset_buffer_major_mode (Lisp_Object);
104static Lisp_Object Fdelete_overlay (Lisp_Object);
103static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, 105static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
104 int after, Lisp_Object arg1, 106 int after, Lisp_Object arg1,
105 Lisp_Object arg2, Lisp_Object arg3); 107 Lisp_Object arg2, Lisp_Object arg3);
@@ -111,30 +113,31 @@ static void reset_buffer_local_variables (struct buffer *b, int permanent_too);
111 to prevent lossage due to user rplac'ing this alist or its elements. */ 113 to prevent lossage due to user rplac'ing this alist or its elements. */
112Lisp_Object Vbuffer_alist; 114Lisp_Object Vbuffer_alist;
113 115
114Lisp_Object Qkill_buffer_query_functions; 116static Lisp_Object Qkill_buffer_query_functions;
115 117
116/* Hook run before changing a major mode. */ 118/* Hook run before changing a major mode. */
117Lisp_Object Qchange_major_mode_hook; 119static Lisp_Object Qchange_major_mode_hook;
118 120
119Lisp_Object Qfirst_change_hook; 121Lisp_Object Qfirst_change_hook;
120Lisp_Object Qbefore_change_functions; 122Lisp_Object Qbefore_change_functions;
121Lisp_Object Qafter_change_functions; 123Lisp_Object Qafter_change_functions;
122Lisp_Object Qucs_set_table_for_input; 124static Lisp_Object Qucs_set_table_for_input;
123 125
124Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; 126static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local;
125Lisp_Object Qpermanent_local_hook; 127static Lisp_Object Qpermanent_local_hook;
126 128
127Lisp_Object Qprotected_field; 129static Lisp_Object Qprotected_field;
128 130
129Lisp_Object QSFundamental; /* A string "Fundamental" */ 131static Lisp_Object QSFundamental; /* A string "Fundamental" */
130 132
131Lisp_Object Qkill_buffer_hook; 133static Lisp_Object Qkill_buffer_hook;
132 134
133Lisp_Object Qget_file_buffer; 135static Lisp_Object Qget_file_buffer;
134 136
135Lisp_Object Qoverlayp; 137static Lisp_Object Qoverlayp;
136 138
137Lisp_Object Qpriority, Qevaporate, Qbefore_string, Qafter_string; 139Lisp_Object Qpriority, Qbefore_string, Qafter_string;
140static Lisp_Object Qevaporate;
138 141
139Lisp_Object Qmodification_hooks; 142Lisp_Object Qmodification_hooks;
140Lisp_Object Qinsert_in_front_hooks; 143Lisp_Object Qinsert_in_front_hooks;
@@ -291,9 +294,6 @@ get_truename_buffer (register Lisp_Object filename)
291 return Qnil; 294 return Qnil;
292} 295}
293 296
294/* Incremented for each buffer created, to assign the buffer number. */
295int buffer_count;
296
297DEFUN ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0, 297DEFUN ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0,
298 doc: /* Return the buffer specified by BUFFER-OR-NAME, creating a new one if needed. 298 doc: /* Return the buffer specified by BUFFER-OR-NAME, creating a new one if needed.
299If BUFFER-OR-NAME is a string and a live buffer with that name exists, 299If BUFFER-OR-NAME is a string and a live buffer with that name exists,
@@ -830,8 +830,8 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too)
830 and set-visited-file-name ought to be able to use this to really 830 and set-visited-file-name ought to be able to use this to really
831 rename the buffer properly. */ 831 rename the buffer properly. */
832 832
833DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buffer_name, 833DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name,
834 1, 2, 0, 834 Sgenerate_new_buffer_name, 1, 2, 0,
835 doc: /* Return a string that is the name of no existing buffer based on NAME. 835 doc: /* Return a string that is the name of no existing buffer based on NAME.
836If there is no live buffer named NAME, then return NAME. 836If there is no live buffer named NAME, then return NAME.
837Otherwise modify name by appending `<NUMBER>', incrementing NUMBER 837Otherwise modify name by appending `<NUMBER>', incrementing NUMBER
@@ -1276,7 +1276,6 @@ If no other buffer exists, the buffer `*scratch*' is returned.
1276If BUFFER is omitted or nil, some interesting buffer is returned. */) 1276If BUFFER is omitted or nil, some interesting buffer is returned. */)
1277 (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame) 1277 (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame)
1278{ 1278{
1279 Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer);
1280 register Lisp_Object tail, buf, notsogood, tem, pred, add_ons; 1279 register Lisp_Object tail, buf, notsogood, tem, pred, add_ons;
1281 notsogood = Qnil; 1280 notsogood = Qnil;
1282 1281
@@ -2501,8 +2500,8 @@ current buffer is cleared. */)
2501 return flag; 2500 return flag;
2502} 2501}
2503 2502
2504DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, 2503DEFUN ("kill-all-local-variables", Fkill_all_local_variables,
2505 0, 0, 0, 2504 Skill_all_local_variables, 0, 0, 0,
2506 doc: /* Switch to Fundamental mode by killing current buffer's local variables. 2505 doc: /* Switch to Fundamental mode by killing current buffer's local variables.
2507Most local variable bindings are eliminated so that the default values 2506Most local variable bindings are eliminated so that the default values
2508become effective once more. Also, the syntax table is set from 2507become effective once more. Also, the syntax table is set from