home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / emacs / 3535 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.3 KB  |  33 lines

  1. Path: sparky!uunet!know!mips2!news.bbn.com!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!sgiblab!sgigate!sgi!wdl1!wdl1.wdl.loral.com!rob
  2. From: rob@icarus.ssd.loral.com (Rob Riepel)
  3. Newsgroups: comp.emacs
  4. Subject: Need help reading key sequence in Lucid emacs
  5. Message-ID: <ROB.92Nov12145630@icarus.ssd.loral.com>
  6. Date: 12 Nov 92 22:56:39 GMT
  7. Sender: news@wdl.loral.com
  8. Organization: Space Systems/Loral
  9. Lines: 22
  10.  
  11.  
  12.     I have an elisp program that I want to modify to work on with both gnu
  13.     emacs on a normal VT-series terminal and Lucid emacs.  In one part of
  14.     the program I check read a key sequence and check for a specific VT100
  15.     sequence.  Here's the abbreviated code.
  16.  
  17.     (if (equal (read-key-sequence "Go for it?") "\eOM") (go-for-it))
  18.  
  19.     Of course, the key sequence in never equal to "\eOM" in lucid emacs.
  20.  
  21.     What I'm looking for is code that will accomplish the same thing on both
  22.     versions of emacs without oodles of (if Lucid)'s.  Something like:
  23.  
  24.     ;;  The following line may be invoked in a customization file.
  25.     (setq string (if Lucid kp_enter "\eOM")
  26.  
  27.     ;;  This main code is ignorant of the Lucid/emacs conflicts!
  28.     (if (equal (read-key-sequence "Go for it?") string) (go-for-it)) 
  29.  
  30.     Any suggestions are welcome.  E-mail please to rob@icarus.ssd.loral.com.
  31.  
  32.     ..rob
  33.