From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sarir Khamsi Newsgroups: gmane.emacs.help Subject: problem passing argument to global-set-key Date: Fri, 27 Aug 2004 13:49:30 -0700 Organization: Raytheon Company Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1093639869 11712 80.91.224.253 (27 Aug 2004 20:51:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Aug 2004 20:51:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 27 22:51:02 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C0ngc-0000Tc-00 for ; Fri, 27 Aug 2004 22:51:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C0nlJ-00005t-78 for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Aug 2004 16:55:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!HSNX.atgi.net!cyclone-sf.pbi.net!151.164.30.34!cyclone.swbell.net!bos-service1.raytheon.com!dfw-service2.ext.ray.com.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:RYddkLXYa1qtEy2vZYk7DWkfyVQ= Original-Lines: 21 Original-NNTP-Posting-Host: 147.24.52.80 Original-X-Complaints-To: news@ext.ray.com Original-X-Trace: dfw-service2.ext.ray.com 1093639770 147.24.52.80 (Fri, 27 Aug 2004 15:49:30 CDT) Original-NNTP-Posting-Date: Fri, 27 Aug 2004 15:49:30 CDT Original-Xref: shelby.stanford.edu gnu.emacs.help:124985 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20335 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20335 I am trying to write a function that will grow or shrink a frame using: (defun sk-grow-frame (&optional n) "Grow or shrink the current frame." (interactive "p") (let ((my-arg n)) (message (format "%d" my-arg)) ; some debug (set-frame-height nil (+ (screen-height) my-arg)))) and assigning it to some keys with: (global-set-key (quote [C-M-up]) (quote sk-grow-frame)) (global-set-key (quote [C-M-down]) (quote sk-grow-frame -1)) The first keyboard shortcut works, ie, growing the frame by one, but the second does not...it still increases the frame by one (instead of decreasing it, which is what I want). What am I missing? I'm sure it's something simple. Thanks. Sarir