unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: abort in `make-frame'
Date: Thu, 22 Jul 2004 06:29:32 -0400	[thread overview]
Message-ID: <E1BnapQ-0003Cj-CZ@fencepost.gnu.org> (raw)
In-Reply-To: <200407202347.i6KNl3V16313@raven.dms.auburn.edu> (message from Luc Teirlinck on Tue, 20 Jul 2004 18:47:03 -0500 (CDT))

	  x-create-frame(((visibility) (icon-left . 0)))
	  x-create-frame-with-faces(((icon-left . 0)))
	  make-frame(((icon-left . 0)))
	  eval((make-frame (quote (...))))
	  eval-expression((make-frame (quote (...))) nil)
	  call-interactively(eval-expression)

    Now, this is expected.

    What I did not expect is that quitting out of the debugger with `q'
    would make Emacs abort.  Is this unavoidable?

The cause of this is surely that the error is signaled at a time
when the frame is already partly set up.  One needs to debug the
code around that place.  When the actual abort happens, that's too
late to be interesting.

The error is signaled from x_icon, which has not yet done anything
interesting.  But x_icon is called from Fx_create_frame after it
has already created the frame's window.

Does this fix it?

*** xfns.c	14 May 2004 05:26:50 -0400	1.610
--- xfns.c	21 Jul 2004 17:47:42 -0400	
***************
*** 2633,2638 ****
--- 2633,2660 ----
  #endif /* not USE_GTK */
  #endif /* not USE_X_TOOLKIT */
  
+ /* Verify that the icon position args for this window are valid.  */
+ 
+ static void
+ x_icon_verify (f, parms)
+      struct frame *f;
+      Lisp_Object parms;
+ {
+   Lisp_Object icon_x, icon_y;
+ 
+   /* Set the position of the icon.  Note that twm groups all
+      icons in an icon window.  */
+   icon_x = x_frame_get_and_record_arg (f, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER);
+   icon_y = x_frame_get_and_record_arg (f, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
+   if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
+     {
+       CHECK_NUMBER (icon_x);
+       CHECK_NUMBER (icon_y);
+     }
+   else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
+     error ("Both left and top icon corners of icon must be specified");
+ }
+ 
  /* Handle the icon stuff for this window.  Perhaps later we might
     want an x_set_icon_position which can be called interactively as
     well.  */
***************
*** 3116,3121 ****
--- 3138,3145 ----
  
    tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
    f->no_split = minibuffer_only || EQ (tem, Qt);
+ 
+   x_icon_verify (f, parms);
  
    /* Create the X widget or window.  */
  #ifdef USE_X_TOOLKIT

  parent reply	other threads:[~2004-07-22 10:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-20 23:47 abort in `make-frame' Luc Teirlinck
2004-07-21 19:27 ` Jan D.
2004-07-22 10:29 ` Richard Stallman [this message]
2004-07-22 13:16   ` Luc Teirlinck
2004-07-22 13:26     ` Jan D.
2004-07-22 13:37       ` Luc Teirlinck
2004-07-24  3:01     ` Richard Stallman
2004-07-24 12:56       ` Luc Teirlinck

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=E1BnapQ-0003Cj-CZ@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).