emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

23.0.60; x-create-frame: wrong-type-argument number-or-markerp nil


From: Drew Adams
Subject: 23.0.60; x-create-frame: wrong-type-argument number-or-markerp nil
Date: Thu, 24 Apr 2008 10:37:01 -0700

I have this code:
 
(define-key global-map [menu-bar pop-up-tool-bar]
  '(menu-item
    "Buttons" show-tool-bar-for-one-command
    :visible (and tool-bar-pop-up-mode 
                  (not tool-bar-mode)
                  (not tool-bar-here-mode))
    :enable  (and tool-bar-pop-up-mode
                  (not tool-bar-mode)
                  (not tool-bar-here-mode))
    :help "Use tool bar for one command"))
 
Because of this, apparently, x-create-frame gives this error:
 
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  >(nil 0)
 
The `and' for :visible and :enable returns t. That's the last thing I see eval'd
in the debugger before the error message. It appears that there is some problem
in the C code of x-create-frame.
 
I have no such problem prior to Emacs 23.
 
Here is what the backtrace looks like just before the error. The `and' evals to
t, then `d' in the debugger gives the error.
 
* (and tool-bar-pop-up-mode (not tool-bar-mode) (not tool-bar-here-mode))
* x-create-frame(((visibility) (background-color . "LavenderBlush2")
(mouse-color . "VioletRed") (cursor-color . "VioletRed") (width . 100) (font .
"-*-Lucida Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (width . 80)
(height . 14) (mouse-color . "Yellow") (cursor-color . "Yellow") (menu-bar-lines
. 1) (foreground-color . "Black") (background-color . "LightSteelBlue") (top .
0) (left . 0) (unsplittable . t) (user-position . t) (vertical-scroll-bars .
right) (height . 14) (width . 80) (unsplittable . t)))
* (let ((visibility-spec ...) (frame ...) success) (unwind-protect (progn ...
... ... ... ... ... ...) (unless success ...)) frame)
* x-create-frame-with-faces(((background-color . "LavenderBlush2") (mouse-color
. "VioletRed") (cursor-color . "VioletRed") (width . 100) (font . "-*-Lucida
Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (width . 80) (height . 14)
(mouse-color . "Yellow") (cursor-color . "Yellow") (menu-bar-lines . 1)
(foreground-color . "Black") (background-color . "LightSteelBlue") (top . 0)
(left . 0) (unsplittable . t) (user-position . t) (vertical-scroll-bars . right)
(height . 14) (width . 80) (unsplittable . t)))
  make-frame(((background-color . "LavenderBlush2") (mouse-color . "VioletRed")
(cursor-color . "VioletRed") (width . 100) (font . "-*-Lucida
Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (width . 80) (height . 14)
(mouse-color . "Yellow") (cursor-color . "Yellow") (menu-bar-lines . 1)
(foreground-color . "Black") (background-color . "LightSteelBlue") (top . 0)
(left . 0) (unsplittable . t) (user-position . t) (vertical-scroll-bars . right)
(height . 14) (width . 80) (unsplittable . t)))
  special-display-popup-frame(#<buffer *Completions*> ((background-color .
"LavenderBlush2") (mouse-color . "VioletRed") (cursor-color . "VioletRed")
(width . 100)))
  funcall(special-display-popup-frame #<buffer *Completions*> ((background-color
. "LavenderBlush2") (mouse-color . "VioletRed") (cursor-color . "VioletRed")
(width . 100)))
 
I do not see this problem for all frame creations. I see it for the
creation of a special-display buffer using this function:
 
(defun 1on1-display-*Completions*-frame (buf &optional args)
  "Display *Completions* buffer in its own frame.
`special-display-function' is used to do the actual displaying.
Completion input events are redirected to `1on1-minibuffer-frame'.
BUF and ARGS are the arguments to `special-display-function'."
  (let ((old-ptr-shape x-pointer-shape)
        return-window)
    (when (and 1on1-*Completions*-frame-flag (boundp 'x-pointer-box-spiral))
      (setq x-pointer-shape x-pointer-box-spiral))
    (setq return-window (select-window (funcall special-display-function buf
args)))
    (when (fboundp 'zoom-frm-out)
      (condition-case nil (progn (zoom-frm-out) (zoom-frm-out)) ; In
`zoom-frm.el'.
        (error nil)))
    
    ;; We reposition frame this way, instead of binding
`special-display-frame-alist'
    ;; with this value, because `after-make-frame-functions' might resize frame.
    (when 1on1-*Completions*-frame-at-right-flag
      (modify-frame-parameters
       (selected-frame)                 ; Hard-code 7 here - what does it depend
on?
       `((left . ,(- (x-display-pixel-width) (+ (frame-pixel-width) 7))))))
    (raise-frame)
    (when (boundp '1on1-minibuffer-frame)
      (redirect-frame-focus (selected-frame) 1on1-minibuffer-frame))
    (when (and 1on1-*Completions*-frame-flag (boundp 'x-pointer-box-spiral))
      (setq x-pointer-shape old-ptr-shape))
    return-window))
 
And this is how that function gets called:
 
(add-to-list
            'special-display-buffer-names
            `("*Completions*" 1on1-display-*Completions*-frame
              ((background-color ,@1on1-completions-frame-background)
               (mouse-color      ,@1on1-completions-frame-mouse+cursor-color)
               (cursor-color     ,@1on1-completions-frame-mouse+cursor-color)
               ,@(and 1on1-completions-frame-width
                      `((width   ,@1on1-completions-frame-width))))))
 
[I also got a fatal error when I tried to quit Emacs with C-x C-c.]
 

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-04-04 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
 
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t
 
Major mode: Emacs-Lisp
 
Minor modes in effect:
  eldoc-mode: t
  display-time-mode: t
  savehist-mode: t
  icomplete-mode: t
  tool-bar-pop-up-mode: t
  icicle-mode: t
  minibuffer-indicate-depth-mode: t
  pretty-control-l-mode: t
  delete-selection-mode: t
  tabbar-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
 
Recent input:
q <down-mouse-1> <mouse-1> M-x g r e p <return> C-g 
<switch-frame> <down-mouse-1> <mouse-1> C-x 4 f t o 
o l - <tab> <return> c <switch-frame> <switch-frame> 
c <down-mouse-1> <mouse-1> C-s f r a m e C-s C-s C-s 
C-M-l C-M-l C-M-l C-s C-s C-s C-s C-s C-s C-s C-s C-a 
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> 
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> 
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> 
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> 
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> 
<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> 
<mouse-1> <mouse-1> <mouse-1> <switch-frame> <help-echo> 
<help-echo> <switch-frame> <down-mouse-1> <drag-mouse-1> 
M-< C-s a d v i C-g <down-mouse-1> <mouse-1> <wheel-down> 
<double-wheel-down> <triple-wheel-down> <triple-wheel-down> 
<wheel-down> <double-wheel-down> <triple-wheel-down> 
<wheel-down> <wheel-down> <wheel-down> <down-mouse-1> 
<mouse-1> M-x <tab> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> c d d c d d d c d d d c c d 
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> C-s 
C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w 
C-w C-w C-w C-w C-w C-a <help-echo> <down-mouse-1> 
<mouse-1> C-s C-s C-a <switch-frame> <switch-frame> 
<down-mouse-1> <mouse-1> <wheel-down> <wheel-down> 
<double-wheel-down> <triple-wheel-down> <wheel-down> 
<wheel-up> <switch-frame> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <send-emacs-bug-report> 
C-g <help-echo> <switch-frame> <help-echo> <switch-frame> 
<help-echo> <help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-movement> <mouse-movement> <help-echo> <mouse-movement> 
<mouse-movement> <drag-mouse-1> <down-mouse-1> <mouse-1> 
<down-mouse-3> <mouse-3> M-w <help-echo> <down-mouse-1> 
<mouse-1> d c d c d <help-echo> d c d <switch-frame> 
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-3> 
<mouse-3> M-w <help-echo> <switch-frame> <down-mouse-1> 
<mouse-1> <down-mouse-3> <mouse-3> <down-mouse-1> <mouse-1> 
<down-mouse-3> <mouse-3> q q <down-mouse-1> <mouse-1> 
M-x t o o l - b a r - m o d e <return> M-x M-p <return> 
M-x <tab> <help-echo> c d c d d c d d c d d c c d c 
d q <switch-frame> <switch-frame> q <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> 
<help-menu> <send-emacs-bug-report>
 
Recent messages:
Entering debugger...
Continuing.
Entering debugger...
Proceeding, will debug on next eval or call.
Entering debugger...
Continuing.
Entering debugger...
Proceeding, will debug on next eval or call.
Entering debugger... [2 times]
Back to top level.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]