From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: FIX: byte-code: Wrong type argument: number-or-marker-p, (+ -21) Date: 17 Nov 2003 15:06:15 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200311142330.hAENUB5p021655@stubby.bodenonline.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069074441 19757 80.91.224.253 (17 Nov 2003 13:07:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2003 13:07:21 +0000 (UTC) Cc: "Jan D." , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Nov 17 14:07:18 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ALj66-0005ND-00 for ; Mon, 17 Nov 2003 14:07:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ALj65-0001Df-00 for ; Mon, 17 Nov 2003 14:07:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ALk3K-0002UD-1r for emacs-devel@quimby.gnus.org; Mon, 17 Nov 2003 09:08:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ALk3E-0002U1-Tp for emacs-devel@gnu.org; Mon, 17 Nov 2003 09:08:24 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ALk2i-0002I8-Nq for emacs-devel@gnu.org; Mon, 17 Nov 2003 09:08:23 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.24) id 1ALk2h-0002H4-TF for emacs-devel@gnu.org; Mon, 17 Nov 2003 09:07:52 -0500 Original-Received: (qmail 40553 invoked from network); 17 Nov 2003 13:06:24 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 17 Nov 2003 13:06:24 -0000 Original-To: Jan Nieuwenhuizen In-Reply-To: Original-Lines: 64 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17862 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17862 Jan Nieuwenhuizen writes: > "Jan D." 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 > > * 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 http://www.cua.dk