XSETBUFFER (buf, b);
Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil));
- /* Fixme: Protect against errors, which would trigger infinite
- regress? */
+ /* An error in calling the function here (should someone redfine it)
+ can lead to infinite regress until you run out of stack. rms
+ says that's not worth protecting against. */
if (!NILP (Ffboundp (Qucs_set_table_for_input)))
- /* buff is on buffer-alist, so no gcpro */
+ /* buf is on buffer-alist, so no gcpro. */
call1 (Qucs_set_table_for_input, buf);
return buf;
/* Run hooks with the buffer to be killed the current buffer. */
{
int count = SPECPDL_INDEX ();
- Lisp_Object list;
Lisp_Object arglist[1];
record_unwind_protect (save_excursion_restore, save_excursion_save ());
Lisp_Object tail, markers;
struct buffer *other;
int undo_enabled_p = !EQ (current_buffer->undo_list, Qt);
- int begv = BEGV, zv = ZV;
- int narrowed = (BEG != begv || Z != zv);
+ int begv, zv;
+ int narrowed = (BEG != BEGV || Z != ZV);
int modified_p = !NILP (Fbuffer_modified_p (Qnil));
if (current_buffer->base_buffer)
/* If the cached position is for this buffer, clear it out. */
clear_charpos_cache (current_buffer);
+ if (NILP (flag))
+ begv = BEGV_BYTE, zv = ZV_BYTE;
+ else
+ begv = BEGV, zv = ZV;
+
if (narrowed)
Fwiden ();
Qpermanent_local = intern ("permanent-local");
Qkill_buffer_hook = intern ("kill-buffer-hook");
+ Fput (Qkill_buffer_hook, Qpermanent_local, Qt);
Qucs_set_table_for_input = intern ("ucs-set-table-for-input");
DEFVAR_LISP_NOPRO ("default-direction-reversed",
&buffer_defaults.direction_reversed,
- doc: /* Default value of `direction_reversed' for buffers that do not override it.
+ doc: /* Default value of `direction-reversed' for buffers that do not override it.
This is the same as (default-value 'direction-reversed). */);
DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters",