emacs-devel
[Top][All Lists]
Advanced

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

Re: FIX#3: byte-code: Wrong type argument: number-or-marker-p, (+ -21)


From: Jan Nieuwenhuizen
Subject: Re: FIX#3: byte-code: Wrong type argument: number-or-marker-p, (+ -21)
Date: Thu, 20 Nov 2003 10:59:40 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

address@hidden (Kim F. Storm) writes:

>> but I'm not at all sure about the right arithmetic for (+/- INT) ...
>
> Me neither...   What do others think about this?

So here's a patch #3 to try.

Jan.

2003-11-20  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-20 01:51:14.000000000 +0100
@@ -335,10 +335,18 @@ React to settings of `default-frame-alis
                                           frame-initial-geometry-arguments)))
                   (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)))
+               (let ((new-top
+                      (if (consp top)
+                          (cond ((eq '+ (car top))
+                                 (list
+                                  '+ (+ (cadr top) (* lines char-height))))
+                                ((eq '- (car top))
+                                 (list
+                                  '- (- (display-pixel-height)
+                                        ((cadr top) (* lines char-height)))))
+                                (t 0))
+                        (+ top (* lines char-height)))))
+                 (setq newparms (append newparms `((top . ,new-top)) nil))))
              (modify-frame-parameters frame-initial-frame newparms)
              (tool-bar-mode -1)))))
 

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org





reply via email to

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