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))
is provided, then the ordering is for that frame. If the second arg
is t, then the global ordering is returned.
-Note: In FSF Emacs, this function takes two arguments: BUFFER and
-VISIBLE-OK.
+Note: In FSF Emacs, this function takes the arguments in the order of
+BUFFER, VISIBLE-OK and FRAME.
*/
(buffer, frame, visible_ok))
{
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;