diff options
| author | Paul Eggert | 2011-04-15 00:48:51 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-15 00:48:51 -0700 |
| commit | 4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9 (patch) | |
| tree | e993b231bb5555c9c961f5d0b20d90ac76f77bbd /src/buffer.c | |
| parent | 1963a2e0bb07cc8dee6d27f972f93d9cfd7c6b2d (diff) | |
| parent | 49093f601b69d91126aefd328ee8f6bfeb797407 (diff) | |
| download | emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.tar.gz emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.zip | |
Merge from mainline.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 37 |
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 | ||
| 101 | int last_per_buffer_idx; | 101 | int last_per_buffer_idx; |
| 102 | 102 | ||
| 103 | static Lisp_Object Fset_buffer_major_mode (Lisp_Object); | ||
| 104 | static Lisp_Object Fdelete_overlay (Lisp_Object); | ||
| 103 | static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, | 105 | static 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. */ |
| 112 | Lisp_Object Vbuffer_alist; | 114 | Lisp_Object Vbuffer_alist; |
| 113 | 115 | ||
| 114 | Lisp_Object Qkill_buffer_query_functions; | 116 | static Lisp_Object Qkill_buffer_query_functions; |
| 115 | 117 | ||
| 116 | /* Hook run before changing a major mode. */ | 118 | /* Hook run before changing a major mode. */ |
| 117 | Lisp_Object Qchange_major_mode_hook; | 119 | static Lisp_Object Qchange_major_mode_hook; |
| 118 | 120 | ||
| 119 | Lisp_Object Qfirst_change_hook; | 121 | Lisp_Object Qfirst_change_hook; |
| 120 | Lisp_Object Qbefore_change_functions; | 122 | Lisp_Object Qbefore_change_functions; |
| 121 | Lisp_Object Qafter_change_functions; | 123 | Lisp_Object Qafter_change_functions; |
| 122 | Lisp_Object Qucs_set_table_for_input; | 124 | static Lisp_Object Qucs_set_table_for_input; |
| 123 | 125 | ||
| 124 | Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | 126 | static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; |
| 125 | Lisp_Object Qpermanent_local_hook; | 127 | static Lisp_Object Qpermanent_local_hook; |
| 126 | 128 | ||
| 127 | Lisp_Object Qprotected_field; | 129 | static Lisp_Object Qprotected_field; |
| 128 | 130 | ||
| 129 | Lisp_Object QSFundamental; /* A string "Fundamental" */ | 131 | static Lisp_Object QSFundamental; /* A string "Fundamental" */ |
| 130 | 132 | ||
| 131 | Lisp_Object Qkill_buffer_hook; | 133 | static Lisp_Object Qkill_buffer_hook; |
| 132 | 134 | ||
| 133 | Lisp_Object Qget_file_buffer; | 135 | static Lisp_Object Qget_file_buffer; |
| 134 | 136 | ||
| 135 | Lisp_Object Qoverlayp; | 137 | static Lisp_Object Qoverlayp; |
| 136 | 138 | ||
| 137 | Lisp_Object Qpriority, Qevaporate, Qbefore_string, Qafter_string; | 139 | Lisp_Object Qpriority, Qbefore_string, Qafter_string; |
| 140 | static Lisp_Object Qevaporate; | ||
| 138 | 141 | ||
| 139 | Lisp_Object Qmodification_hooks; | 142 | Lisp_Object Qmodification_hooks; |
| 140 | Lisp_Object Qinsert_in_front_hooks; | 143 | Lisp_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. */ | ||
| 295 | int buffer_count; | ||
| 296 | |||
| 297 | DEFUN ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0, | 297 | DEFUN ("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. |
| 299 | If BUFFER-OR-NAME is a string and a live buffer with that name exists, | 299 | If 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 | ||
| 833 | DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buffer_name, | 833 | DEFUN ("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. |
| 836 | If there is no live buffer named NAME, then return NAME. | 836 | If there is no live buffer named NAME, then return NAME. |
| 837 | Otherwise modify name by appending `<NUMBER>', incrementing NUMBER | 837 | Otherwise modify name by appending `<NUMBER>', incrementing NUMBER |
| @@ -1276,7 +1276,6 @@ If no other buffer exists, the buffer `*scratch*' is returned. | |||
| 1276 | If BUFFER is omitted or nil, some interesting buffer is returned. */) | 1276 | If 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 | ||
| 2504 | DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, | 2503 | DEFUN ("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. |
| 2507 | Most local variable bindings are eliminated so that the default values | 2506 | Most local variable bindings are eliminated so that the default values |
| 2508 | become effective once more. Also, the syntax table is set from | 2507 | become effective once more. Also, the syntax table is set from |