home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / emacs / help / 3868 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.1 KB  |  37 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!uvaarpa!murdoch!virginia.edu!gs4t
  3. From: gs4t@virginia.edu (Gnanasekaran  Swaminathan)
  4. Subject: Re: C++ mode in emacs and unbinding C-cC-c
  5. Message-ID: <1992Aug28.005832.1668@murdoch.acc.Virginia.EDU>
  6. Sender: usenet@murdoch.acc.Virginia.EDU
  7. Reply-To: gs4t@virginia.edu (Gnanasekaran  Swaminathan)
  8. Organization: University of Virginia
  9. References:  <1992Aug27.154259.558@Warren.MENTORG.COM>
  10. Date: Fri, 28 Aug 1992 00:58:32 GMT
  11. Lines: 24
  12.  
  13. sharma@euler.Warren.MENTORG.COM (Sharma Kunapalli) writes:
  14. : Hi All,
  15. : When I am in the C++ mode in emacs, C-cC-c is
  16. : automatically bound to 'c++-comment-region'.
  17. : What I want is to bind C-cC-c to 'compile'.
  18. : I have tried doing global-set-key C-cC-c to compile.
  19. : Doesnt work.
  20. : I have tried global-unset-key C-cC-c first and then
  21. : bind it to 'compile'. Doesnt work.
  22. : Any help on how I can bind C-cC-c to 'compile' 
  23. : would be appreciated.
  24.  
  25. Add the following to your .emacs file
  26.  
  27. (setq c++-mode-hook 'my-key)
  28. (defun my-key ()
  29.   "My binding for c++-mode."
  30.   (define-key c++-mode-map "\C-c\C-c" 'compile))
  31.  
  32. -Sekar
  33.