From: Sarir Khamsi <sarir.khamsi@raytheon.com>
Subject: problem passing argument to global-set-key
Date: Fri, 27 Aug 2004 13:49:30 -0700 [thread overview]
Message-ID: <uk6vki9wl.fsf@raytheon.com> (raw)
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
next reply other threads:[~2004-08-27 20:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-27 20:49 Sarir Khamsi [this message]
2004-08-27 21:06 ` problem passing argument to global-set-key Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uk6vki9wl.fsf@raytheon.com \
--to=sarir.khamsi@raytheon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).