From: Harry Putnam <reader@newsguy.com>
Subject: add summary mode hook for calling macro
Date: Sat, 17 Nov 2001 22:54:33 -0800 [thread overview]
Message-ID: <m1g07ck1qu.fsf@reader.newsguy.com> (raw)
I want to add a local key command to summary mode. That gives a key
binding to a defined and named macro.
I found a section in gnus manual that seems to deal with adding key
commands in summary mode under the unlikely topic:
Generic Marking Commands
info://gnus/Summary+Buffer/Marking+Articles/Generic+Marking+Commands
(add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
(defun my-alter-summary-map ()
(local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
But that is more directly about changing existing keymands to
different behavior.
I want to set a key to run a macro that embodies the keys needed to
respool a summary buffer. Some code I thought might be close below
just beeps. Probably way off base.
(add-hook 'gnus-summary-mode-hook 'my-macro-respool-command)
(defun my-macro-respool-command()
"define a key combo to run a macro that respools summary buffer"
; WHAT goes here? .. maybe:
(require 'macro)
(local-set-key "\C-c r" 'spool))
The macro is named and in a file macro.el along with a global key
binding that I would rather do with a summary mode hook.
cat macro.el
(fset 'spool
[?M ?P ?a ?B ?r return])
; (global-set-key [24 26] 'spool)
(provide 'macro)
reply other threads:[~2001-11-18 6:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1g07ck1qu.fsf@reader.newsguy.com \
--to=reader@newsguy.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 NNTP newsgroup(s).