Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mandrill!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon S. Allbery) Newsgroups: comp.emacs Subject: Re: function-keymap: criticism Message-ID: <7788@ncoast.UUCP> Date: 17 May 88 00:45:51 GMT References: <8805071503.AA06117@EDDIE.MIT.EDU> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.emacs Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 26 As quoted from <8805071503.AA06117@EDDIE.MIT.EDU> by "SDRRTR::SDRRTR::MRGATE::\"MRGATE::PSI%SCRVX2::BLUE::IN%\"davis@blue.sdr.slb.COM\"\""@sdr.slb.COM: +--------------- | 4) Confronting people with lambda syntax on their first effort | at Emacs customization has its drawbacks. | | (setq term-setup-hook '(lambda () | (load "my-emacs-keys"))) | | is not utterly transparent to early users, especially | non-hackers. +--------------- Undoubtedly my code is less than perfect (not really a lisp hacker, and I haven't (yet) had a chance to bring up Gnu on my new *nix box), but it should at least get the basic idea across. (defmacro set-hook (hook value) "Set a hook's value, wrapping the value in a lambda if it's non-nil." (if (eq value nil) () (setq value '(lambda () value))) `(setq ,hook ,@value)) -- Brandon S. Allbery, moderator of comp.sources.misc {well!hoptoad,uunet!marque,cbosgd,sun!mandrill}!ncoast!allbery Delphi: ALLBERY MCI Mail: BALLBERY