all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: multi-tty@lists.fnord.hu, emacs-devel@gnu.org
Subject: Re: Emacs routinely gets stuck in single_kboard mode
Date: Mon, 12 Jul 2004 19:58:04 -0400	[thread overview]
Message-ID: <E1BkAgO-0000yr-28@fencepost.gnu.org> (raw)
In-Reply-To: <E1Bjnfd-0008Om-L2@fencepost.gnu.org> (message from Richard Stallman on Sun, 11 Jul 2004 19:23:45 -0400)

    Killing the sole frame on a certain display should exit single_kboard mode
    if it is enabled on tht display.

    Would someone like to implement that?

I decided to write it rather than wonder if someone would.
Does this fix it?  Add the following function to keyboard.c
and install the patch below.


/* If we're in single_kboard state for kboard KBOARD,
   get out of it.  */

void
not_single_kboard_state (kboard)
     KBOARD *kboard;
{
  if (kboard == current_kboard)
    single_kboard = 0;
}


*** frame.c	16 Nov 2003 20:36:24 -0500	1.306
--- frame.c	12 Jul 2004 16:55:02 -0400	
***************
*** 1327,1332 ****
--- 1327,1362 ----
  	}
      }
  
+   /* If there's no other frame on the same kboard, get out of
+      single-kboard state if we're in it for this kboard.  */
+   {
+     Lisp_Object frames;
+     /* Some frame we found on the same kboard, or nil if there are none.  */
+     Lisp_Object frame_on_same_kboard;
+ 
+     frame_on_same_kboard = Qnil;
+ 
+     for (frames = Vframe_list;
+ 	 CONSP (frames);
+ 	 frames = XCDR (frames))
+       {
+ 	Lisp_Object this;
+ 	struct frame *f1;
+ 
+ 	this = XCAR (frames);
+ 	if (!FRAMEP (this))
+ 	  abort ();
+ 	f1 = XFRAME (this);
+ 
+ 	if (FRAME_KBOARD (f) == FRAME_KBOARD (f1))
+ 	  frame_on_same_kboard = this;
+       }
+ 
+     if (NILP (frame_on_same_kboard))
+       not_single_kboard_state (FRAME_KBOARD (f));
+   }
+ 
+ 
    /* If we've deleted this keyboard's default_minibuffer_frame, try to
       find another one.  Prefer minibuffer-only frames, but also notice
       frames with other windows.  */

  reply	other threads:[~2004-07-12 23:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-07  7:45 Emacs routinely gets stuck in single_kboard mode Lőrentey Károly
2004-06-13 21:49 ` Richard Stallman
2004-07-11  1:29   ` Lőrentey Károly
2004-07-11  3:55     ` Lőrentey Károly
2004-07-11 23:23       ` Richard Stallman
2004-07-12 23:58         ` Richard Stallman [this message]
2004-07-13 16:55           ` Lőrentey Károly
2004-07-11 23:23     ` Richard Stallman
2004-07-12  6:18       ` Lőrentey Károly
2004-07-12 23:57         ` Richard Stallman
2004-07-13 17:12           ` Lőrentey Károly
2004-07-13 23:49             ` David Kastrup
2004-07-14 18:26             ` Richard Stallman
2004-07-15 22:22               ` Lőrentey Károly
2004-07-16 16:08                 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1BkAgO-0000yr-28@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=multi-tty@lists.fnord.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.