diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/src/buffer.c b/src/buffer.c index d43b3d19c7b..02518193264 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -456,7 +456,6 @@ reset_buffer (b) | |||
| 456 | b->mark_active = Qnil; | 456 | b->mark_active = Qnil; |
| 457 | b->point_before_scroll = Qnil; | 457 | b->point_before_scroll = Qnil; |
| 458 | b->file_format = Qnil; | 458 | b->file_format = Qnil; |
| 459 | b->redisplay_end_trigger = Qnil; | ||
| 460 | b->extra1 = Qnil; | 459 | b->extra1 = Qnil; |
| 461 | b->extra2 = Qnil; | 460 | b->extra2 = Qnil; |
| 462 | b->extra3 = Qnil; | 461 | b->extra3 = Qnil; |
| @@ -910,8 +909,8 @@ before the buffer is actually killed. The buffer to be killed is current\n\ | |||
| 910 | when the hook functions are called.\n\n\ | 909 | when the hook functions are called.\n\n\ |
| 911 | Any processes that have this buffer as the `process-buffer' are killed\n\ | 910 | Any processes that have this buffer as the `process-buffer' are killed\n\ |
| 912 | with `delete-process'.") | 911 | with `delete-process'.") |
| 913 | (bufname) | 912 | (buffer) |
| 914 | Lisp_Object bufname; | 913 | Lisp_Object buffer; |
| 915 | { | 914 | { |
| 916 | Lisp_Object buf; | 915 | Lisp_Object buf; |
| 917 | register struct buffer *b; | 916 | register struct buffer *b; |
| @@ -919,12 +918,12 @@ with `delete-process'.") | |||
| 919 | register struct Lisp_Marker *m; | 918 | register struct Lisp_Marker *m; |
| 920 | struct gcpro gcpro1, gcpro2; | 919 | struct gcpro gcpro1, gcpro2; |
| 921 | 920 | ||
| 922 | if (NILP (bufname)) | 921 | if (NILP (buffer)) |
| 923 | buf = Fcurrent_buffer (); | 922 | buf = Fcurrent_buffer (); |
| 924 | else | 923 | else |
| 925 | buf = Fget_buffer (bufname); | 924 | buf = Fget_buffer (buffer); |
| 926 | if (NILP (buf)) | 925 | if (NILP (buf)) |
| 927 | nsberror (bufname); | 926 | nsberror (buffer); |
| 928 | 927 | ||
| 929 | b = XBUFFER (buf); | 928 | b = XBUFFER (buf); |
| 930 | 929 | ||
| @@ -936,7 +935,7 @@ with `delete-process'.") | |||
| 936 | if (INTERACTIVE && !NILP (b->filename) | 935 | if (INTERACTIVE && !NILP (b->filename) |
| 937 | && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) | 936 | && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) |
| 938 | { | 937 | { |
| 939 | GCPRO2 (buf, bufname); | 938 | GCPRO1 (buf); |
| 940 | tem = do_yes_or_no_p (format1 ("Buffer %s modified; kill anyway? ", | 939 | tem = do_yes_or_no_p (format1 ("Buffer %s modified; kill anyway? ", |
| 941 | XSTRING (b->name)->data)); | 940 | XSTRING (b->name)->data)); |
| 942 | UNGCPRO; | 941 | UNGCPRO; |
| @@ -1172,8 +1171,8 @@ do not put this buffer at the front of the list of recently selected ones.\n\ | |||
| 1172 | WARNING: This is NOT the way to work on another buffer temporarily\n\ | 1171 | WARNING: This is NOT the way to work on another buffer temporarily\n\ |
| 1173 | within a Lisp program! Use `set-buffer' instead. That avoids messing with\n\ | 1172 | within a Lisp program! Use `set-buffer' instead. That avoids messing with\n\ |
| 1174 | the window-buffer correspondences.") | 1173 | the window-buffer correspondences.") |
| 1175 | (bufname, norecord) | 1174 | (buffer, norecord) |
| 1176 | Lisp_Object bufname, norecord; | 1175 | Lisp_Object buffer, norecord; |
| 1177 | { | 1176 | { |
| 1178 | register Lisp_Object buf; | 1177 | register Lisp_Object buf; |
| 1179 | Lisp_Object tem; | 1178 | Lisp_Object tem; |
| @@ -1184,14 +1183,14 @@ the window-buffer correspondences.") | |||
| 1184 | if (!NILP (tem)) | 1183 | if (!NILP (tem)) |
| 1185 | error ("Cannot switch buffers in a dedicated window"); | 1184 | error ("Cannot switch buffers in a dedicated window"); |
| 1186 | 1185 | ||
| 1187 | if (NILP (bufname)) | 1186 | if (NILP (buffer)) |
| 1188 | buf = Fother_buffer (Fcurrent_buffer (), Qnil); | 1187 | buf = Fother_buffer (Fcurrent_buffer (), Qnil); |
| 1189 | else | 1188 | else |
| 1190 | { | 1189 | { |
| 1191 | buf = Fget_buffer (bufname); | 1190 | buf = Fget_buffer (buffer); |
| 1192 | if (NILP (buf)) | 1191 | if (NILP (buf)) |
| 1193 | { | 1192 | { |
| 1194 | buf = Fget_buffer_create (bufname); | 1193 | buf = Fget_buffer_create (buffer); |
| 1195 | Fset_buffer_major_mode (buf); | 1194 | Fset_buffer_major_mode (buf); |
| 1196 | } | 1195 | } |
| 1197 | } | 1196 | } |
| @@ -1213,18 +1212,18 @@ If BUFFER is nil, then some other buffer is chosen.\n\ | |||
| 1213 | If `pop-up-windows' is non-nil, windows can be split to do this.\n\ | 1212 | If `pop-up-windows' is non-nil, windows can be split to do this.\n\ |
| 1214 | If optional second arg OTHER-WINDOW is non-nil, insist on finding another\n\ | 1213 | If optional second arg OTHER-WINDOW is non-nil, insist on finding another\n\ |
| 1215 | window even if BUFFER is already visible in the selected window.") | 1214 | window even if BUFFER is already visible in the selected window.") |
| 1216 | (bufname, other) | 1215 | (buffer, other) |
| 1217 | Lisp_Object bufname, other; | 1216 | Lisp_Object buffer, other; |
| 1218 | { | 1217 | { |
| 1219 | register Lisp_Object buf; | 1218 | register Lisp_Object buf; |
| 1220 | if (NILP (bufname)) | 1219 | if (NILP (buffer)) |
| 1221 | buf = Fother_buffer (Fcurrent_buffer (), Qnil); | 1220 | buf = Fother_buffer (Fcurrent_buffer (), Qnil); |
| 1222 | else | 1221 | else |
| 1223 | { | 1222 | { |
| 1224 | buf = Fget_buffer (bufname); | 1223 | buf = Fget_buffer (buffer); |
| 1225 | if (NILP (buf)) | 1224 | if (NILP (buf)) |
| 1226 | { | 1225 | { |
| 1227 | buf = Fget_buffer_create (bufname); | 1226 | buf = Fget_buffer_create (buffer); |
| 1228 | Fset_buffer_major_mode (buf); | 1227 | Fset_buffer_major_mode (buf); |
| 1229 | } | 1228 | } |
| 1230 | } | 1229 | } |
| @@ -1408,17 +1407,17 @@ See also `save-excursion' when you want to make a buffer current temporarily.\n\ | |||
| 1408 | This function does not display the buffer, so its effect ends\n\ | 1407 | This function does not display the buffer, so its effect ends\n\ |
| 1409 | when the current command terminates.\n\ | 1408 | when the current command terminates.\n\ |
| 1410 | Use `switch-to-buffer' or `pop-to-buffer' to switch buffers permanently.") | 1409 | Use `switch-to-buffer' or `pop-to-buffer' to switch buffers permanently.") |
| 1411 | (bufname) | 1410 | (buffer) |
| 1412 | register Lisp_Object bufname; | 1411 | register Lisp_Object buffer; |
| 1413 | { | 1412 | { |
| 1414 | register Lisp_Object buffer; | 1413 | register Lisp_Object buf; |
| 1415 | buffer = Fget_buffer (bufname); | 1414 | buf = Fget_buffer (buffer); |
| 1416 | if (NILP (buffer)) | 1415 | if (NILP (buf)) |
| 1417 | nsberror (bufname); | 1416 | nsberror (buffer); |
| 1418 | if (NILP (XBUFFER (buffer)->name)) | 1417 | if (NILP (XBUFFER (buf)->name)) |
| 1419 | error ("Selecting deleted buffer"); | 1418 | error ("Selecting deleted buffer"); |
| 1420 | set_buffer_internal (XBUFFER (buffer)); | 1419 | set_buffer_internal (XBUFFER (buf)); |
| 1421 | return buffer; | 1420 | return buf; |
| 1422 | } | 1421 | } |
| 1423 | 1422 | ||
| 1424 | DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, | 1423 | DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, |
| @@ -3375,7 +3374,6 @@ init_buffer_once () | |||
| 3375 | XSETINT (buffer_local_flags.file_truename, -1); | 3374 | XSETINT (buffer_local_flags.file_truename, -1); |
| 3376 | XSETINT (buffer_local_flags.invisibility_spec, -1); | 3375 | XSETINT (buffer_local_flags.invisibility_spec, -1); |
| 3377 | XSETINT (buffer_local_flags.file_format, -1); | 3376 | XSETINT (buffer_local_flags.file_format, -1); |
| 3378 | XSETINT (buffer_local_flags.redisplay_end_trigger, -1); | ||
| 3379 | 3377 | ||
| 3380 | XSETFASTINT (buffer_local_flags.mode_line_format, 1); | 3378 | XSETFASTINT (buffer_local_flags.mode_line_format, 1); |
| 3381 | XSETFASTINT (buffer_local_flags.abbrev_mode, 2); | 3379 | XSETFASTINT (buffer_local_flags.abbrev_mode, 2); |