all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* define-key .. whats wrong here?
@ 2003-06-27  0:48 Harry Putnam
  2003-06-27  1:01 ` Harry Putnam
       [not found] ` <mailman.8724.1056675775.21513.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Harry Putnam @ 2003-06-27  0:48 UTC (permalink / raw)


This is ocurring in gnus but is an elisp or emacs question so
properly belongs here I guess.

Attempting to define a keys that run macros

>From .gnus.el
  (fset 'delall 
     [?M ?P ?b ?B backspace ?y]) 
   (define-key gnus-summary-mode-map "D" 'delall) 

  (fset 'sendto_spam1 
     [?M ?P ?b ?B ?m ?\C-a ?\C-k ?n ?n ?m ?l ?: ?s ?p ?a ?m ?1 return]) 
  (define-key gnus-summary-mode-map "\C-ss" 'send2_spam1) 

The first one works.
And pressing C-h k <RET> D <RET> in summary buffer shows 
it bound to the macro

The second doesn't throw errors but shows undefined when
running C-h k <RET> C-c s <RET> in summary mode.

I got the example from emacs info:

[...] 
                  (define-key texinfo-mode-map "\C-cp"
                              'backward-paragraph)
                  (define-key texinfo-mode-map "\C-cn"
                              'forward-paragraph)))

Where it is discussing adding hooks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: define-key .. whats wrong here?
  2003-06-27  0:48 define-key .. whats wrong here? Harry Putnam
@ 2003-06-27  1:01 ` Harry Putnam
       [not found] ` <mailman.8724.1056675775.21513.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Harry Putnam @ 2003-06-27  1:01 UTC (permalink / raw)


Harry Putnam <reader@newsguy.com> writes:

>>From .gnus.el
>   (fset 'delall 
>      [?M ?P ?b ?B backspace ?y]) 
>    (define-key gnus-summary-mode-map "D" 'delall) 
>
>   (fset 'sendto_spam1 
>      [?M ?P ?b ?B ?m ?\C-a ?\C-k ?n ?n ?m ?l ?: ?s ?p ?a ?m ?1 return]) 
>   (define-key gnus-summary-mode-map "\C-ss" 'send2_spam1) 

Looked like it might just be a stupid naming error
sendto != send2

But I cleaned that up by redoing the macro renaming and reinserting
in .gnus.el.  Then a full restart.  Still pressing 
C-h k <RET>C-c s<RET> In summary mode shows that emacs doesn't know
about this keyboard definition

However C-h w sendto_spam1 is known and reports the key binding as 
C-c s.  Also M-x sendto_spam1 runs the macro.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: define-key .. whats wrong here?
       [not found] ` <mailman.8724.1056675775.21513.help-gnu-emacs@gnu.org>
@ 2003-06-27  9:48   ` Andy Sawyer
  2003-07-01  7:30     ` Harry Putnam
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Sawyer @ 2003-06-27  9:48 UTC (permalink / raw)


In article <mailman.8724.1056675775.21513.help-gnu-emacs@gnu.org>,
 on Thu, 26 Jun 2003 18:01:17 -0700,
 Harry Putnam <reader@newsguy.com> wrote:

> Harry Putnam <reader@newsguy.com> writes:
> 
> >   (fset 'sendto_spam1 
> >      [?M ?P ?b ?B ?m ?\C-a ?\C-k ?n ?n ?m ?l ?: ?s ?p ?a ?m ?1 return]) 
> >   (define-key gnus-summary-mode-map "\C-ss" 'send2_spam1) 

Is this.....................................^^ the problem?

> But I cleaned that up by redoing the macro renaming and reinserting
> in .gnus.el.  Then a full restart.  Still pressing 
> C-h k <RET>C-c s<RET> In summary mode shows that emacs doesn't know
> about this keyboard definition

It appears to me that you've bound the macro to C-s s (not C-c s) - or
am I missing something really obvious?

> However C-h w sendto_spam1 is known and reports the key binding as 
> C-c s.

Are you sure?


Regards,
 Andy
-- 
"Light thinks it travels faster than anything but it is wrong. No matter
 how fast light travels it finds the darkness has always got there first,
 and is waiting for it."                  -- Terry Pratchett, Reaper Man

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: define-key .. whats wrong here?
  2003-06-27  9:48   ` Andy Sawyer
@ 2003-07-01  7:30     ` Harry Putnam
  0 siblings, 0 replies; 4+ messages in thread
From: Harry Putnam @ 2003-07-01  7:30 UTC (permalink / raw)


Andy Sawyer <andys@despammed.com> writes:


>> >   (define-key gnus-summary-mode-map "\C-ss" 'send2_spam1) 
> Is this.....................................^^ the problem?

Absolutely

>> However C-h w sendto_spam1 is known and reports the key binding as 
>> C-c s.
>
> Are you sure?

I'm not even sure I have a functioning brain cell left.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-01  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-27  0:48 define-key .. whats wrong here? Harry Putnam
2003-06-27  1:01 ` Harry Putnam
     [not found] ` <mailman.8724.1056675775.21513.help-gnu-emacs@gnu.org>
2003-06-27  9:48   ` Andy Sawyer
2003-07-01  7:30     ` Harry Putnam

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.