[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21)
From: |
Kim F. Storm |
Subject: |
Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21) |
Date: |
17 Nov 2003 15:06:15 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Jan Nieuwenhuizen <address@hidden> writes:
> "Jan D." <address@hidden> writes:
>
> > These lines in frame-notice-user-settings triggers the error:
> > (let* ...
> > (top (frame-parameter frame-initial-frame 'top)))
> > (when (and (consp initial-top) (eq '- (car initial-top)))
> > (setq newparms
> > (append newparms
> > `((top . ,(+ top (* lines char-height))))
> > nil)))
>
> Thanks. Why did debug-on-error not show me a backtrace?
>
> > When the top of the frame is over the top of the display:
> >
> > (frame-parameter (selected-frame) 'top)
> > (+ -21)
> >
> > Ditto for left.
>
> I could not trigger the error for left.
>
> > Someone better in lisp than me can probably fix
> > frame-notice-user-settings so it works ok.
>
> I'm not sure that I qualify, but below is a fix.
>
> Greetings,
> Jan.
>
>
> 2003-11-16 Jan Nieuwenhuizen <address@hidden>
>
> * frame.el (frame-notice-user-settings): Fix for TOP parameter
> of CONS flavour.
>
> --- frame.el.~1.205.~ 2003-10-02 16:06:45.000000000 +0200
> +++ frame.el 2003-11-16 23:03:18.000000000 +0100
> @@ -333,7 +333,12 @@ React to settings of `default-frame-alis
> (newparms (list (cons 'height (- height lines))))
> (initial-top (cdr (assq 'top
> frame-initial-geometry-arguments)))
> - (top (frame-parameter frame-initial-frame 'top)))
> + (fif-top (frame-parameter frame-initial-frame 'top))
> + (top (if (consp fif-top)
> + (cond ((eq '+ (car fif-top)) (cadr fif-top))
> + ((eq '- (car fif-top)) (- 0 (cadr fif-top)))
> + (t 0))
> + fif-top)))
> (when (and (consp initial-top) (eq '- (car initial-top)))
> (setq newparms
> (append newparms
`((top . ,(+ top (* lines char-height))))
nil)))
This still looks bogus to me, as the new parameter doesn't preserve
the (+ ...) or (- ...) form of the original setting, but uses the
calculated value directly. Shouldn't it preserve the top/left (+) or
bottom/right (-) indication?
--
Kim F. Storm <address@hidden> http://www.cua.dk
- byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan Nieuwenhuizen, 2003/11/12
- Re: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan D., 2003/11/14
- FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan Nieuwenhuizen, 2003/11/17
- Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21),
Kim F. Storm <=
- Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan Nieuwenhuizen, 2003/11/17
- Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan Nieuwenhuizen, 2003/11/19
- Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Kim F. Storm, 2003/11/19
- Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan Nieuwenhuizen, 2003/11/19
- Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Kim F. Storm, 2003/11/19
- Re: FIX#3: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan Nieuwenhuizen, 2003/11/20
- Re: FIX#3: byte-code: Wrong type argument: number-or-marker-p, (+ -21), Jan D., 2003/11/23