Subject: Re: bug#18586: 24.4.50; "Not an in-range integer, float, or cons of integers" from x-focus-frame

From: Ted Zlatanov <[email-masked]>
Date: Tue, 30 Sep 2014 09:24:59 -0400

I also get this error on my home system, which is Ubuntu with a GTK
Emacs built from trunk as of yesterday, with all the image-related
libraries (png, gif, ImageMagick, etc.). emacsclient is not involved,
but I do have a frame fontification hook. Maybe it will help find the
problem. It happened when I tried to open a .el file; I can then reopen
it on the second try. I was in a hurry and didn't have time to debug it
further.

(when (tzz-emacs-unix)
  (defun fontify-frame (frame)
    (let* ((w (frame-pixel-width))
	   (h (frame-pixel-height))
	   (font
            (if (and window-system (eq system-type 'darwin))
              (if (> w 2000)
                  "-*-inconsolata-*-*-*--36-*-*-*-*-*-*-*"
                "-*-inconsolata-*-*-*--24-*-*-*-*-*-*-*")
              (if (> w 2000)
                  "-xos4-terminus-bold-r-normal-*-28-*-*-*-*-*-iso10646-1"
                "-xos4-terminus-bold-r-normal-*-22-*-*-*-*-*-iso10646-1"))))
      (if (and window-system (eq system-type 'darwin))
          (set-face-font 'default font))
      (set-frame-parameter frame 'font font)))

  ;; Fontify current frame
  (fontify-frame nil)
  ;; Fontify any future frames
  (push 'fontify-frame after-make-frame-functions))

I can dig further tonight if needed.

HTH
Ted