From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40388 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: add summary mode hook for calling macro Date: Sat, 17 Nov 2001 22:54:33 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175946 643 80.91.224.250 (21 Oct 2002 04:52:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:52:26 +0000 (UTC) Return-Path: Original-Received: (qmail 12732 invoked from network); 18 Nov 2001 06:57:38 -0000 Original-Received: from malifon.math.uh.edu (129.7.128.13) by mastaler.com with SMTP; 18 Nov 2001 06:57:38 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 165Ls6-0001zi-00; Sun, 18 Nov 2001 00:56:06 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 18 Nov 2001 00:55:48 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id AAA16364 for ; Sun, 18 Nov 2001 00:55:38 -0600 (CST) Original-Received: (qmail 12718 invoked by alias); 18 Nov 2001 06:55:50 -0000 Original-Received: (qmail 12713 invoked from network); 18 Nov 2001 06:55:50 -0000 Original-Received: from smtp.newsguy.com (HELO newsguy.com) (209.155.56.71) by gnus.org with SMTP; 18 Nov 2001 06:55:50 -0000 Original-Received: from reader.local.lan (adsl-66.51.210.228.dslextreme.com [66.51.210.228]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id WAA15089 for ; Sat, 17 Nov 2001 22:55:18 -0800 (PST) Original-Received: (from reader@localhost) by reader.local.lan (8.11.6/8.11.6) id fAI6tIA09517; Sat, 17 Nov 2001 22:55:18 -0800 X-Authentication-Warning: reader.local.lan: reader set sender to reader@newsguy.com using -f Original-To: ding@gnus.org User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i586-pc-linux-gnu) Original-Lines: 35 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40388 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40388 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)