🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8288

Re: handy oddments

#8288
From: News system owner ID
Date: Thu, 12 Jan 1989 18:22
40 lines
2030 bytes
A minor nit-pick with a recent posting:

>  From: jcgs@harlqn.harlqn.uucp (John Sturdy)
>  Date: 10 Jan 89 18:07:22 GMT
>  Sender: news@harlqn.UUCP
>  Organization: Harlequin Ltd, Cambridge, England
>  Lines: 73
>
>  Here are some oddments I wrote, that I've been finding particularly
>  useful lately.  This isn't really a package, just a bag of scraps!
>  ----------------------------------------------------------------
>  ;;; -*-emacs-lisp-*- /harlqn/usr/users/jcgs/new-stuff.el
>  ;;; Last edited: Tue Jan 10 16:58:38 1989 by jcgs (John Sturdy) on harlqn
>
>  (defun define-lisp-key (key command)
>    "Define KEY to run COMMAND in all lisp modes."
>    (define-key lisp-mode-map key command)
>    (define-key emacs-lisp-mode-map key command)
>    (define-key lisp-interaction-mode-map key command)
>    (define-key inferior-lisp-mode-map key command))
>
[other useful stuff deleted]

This WOULD be useful if you needed to do it: however, you don't. While
i'm not certain i understand the reasons why, i am certain of the
outcome: if instead of using define-key you use local-set-key, all
these other modes "inherit" the binding. So if i use local-set-key
inside lisp-mode-hook to perform some binding, i also get it for free
in emacs-lisp-mode, etc., suggesting that local-set-key is a better
way to go (and it probably says that somewhere :-).

........................................
Sean Boisen -- sboisen@bbn.com
BBN Systems and Technologies Corporation, Cambridge MA
Disclaimer: these opinions void where prohibited by lawyers.



Sean
Technical Details
Message-ID: <34465@bbn.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!bbn!news
References: <JCGS.89Jan10170722@harlqn.harlqn.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!bbn!news
From: news@bbn.COM (News system owner ID)
Newsgroups: comp.emacs
Subject: Re: handy oddments
Message-ID: <34465@bbn.COM>
Date: 12 Jan 89 18:22:07 GMT
References: <JCGS.89Jan10170722@harlqn.harlqn.uucp>
Reply-To: sboisen@bbn.com
Organization: Bolt Beranek and Newman, Inc., Cambridge, MA
Lines: 40
In-reply-to: jcgs@harlqn.harlqn.uucp's message of 10 Jan 89 18:07:22 GMT