struct buffer *
decode_buffer (Lisp_Object buffer, int allow_string)
{
- if (NILP (buffer))
+ if (NILP (buffer) || (!POINTER_TYPE_P( XTYPE(buffer))))
return current_buffer;
if (allow_string && STRINGP (buffer))
delete_from_buffer_alist (buf);
- /* #### This is a problem if this buffer is in a dedicated window.
- Need to undedicate any windows of this buffer first (and delete them?)
- */
+ /* Undedicate any windows of this buffer, and make sure no windows
+ show it. */
+
+ undedicate_windows (buf, Qt);
+
GCPRO1 (buf);
Freplace_buffer_in_windows (buf, Qnil, Qall);
UNGCPRO;
implies that the future text is not really related to the past text. */
b->saved_size = Qzero;
- zmacs_region_stays = 0;
return Qnil;
}
/* #### Warning: 1<<31 is the largest number currently allowable
due to the XINT() handling of this value. With some
- rearrangement you can get 3 more bits. */
+ rearrangement you can get 3 more bits.
+
+ #### 3 more? 34 bits???? -ben */
}
}
DEFVAR_BUFFER_LOCAL ("case-fold-search", case_fold_search /*
*Non-nil if searches should ignore case.
Automatically becomes buffer-local when set in any fashion.
-
-BUG: Under XEmacs/Mule, translations to or from non-ASCII characters
- (this includes chars in the range 128 - 255) are ignored by
- the string/buffer-searching routines. Thus, `case-fold-search'
- will not correctly conflate a-umlaut and A-umlaut even if the
- case tables call for this.
*/ );
DEFVAR_BUFFER_LOCAL ("fill-column", fill_column /*