Tezave z GNU/Emacsom

Grega Fajdiga Gregor.Fajdiga at telemach.net
Sat Jul 28 10:53:18 CEST 2001


Pozdrav!

V neki knjigi sem prebral, da se da z naslednjo kodo v datoteki .emacs zelo 
preprosto vstavljati komentarje za C. Koda je naslednja:

(defun c-begin-comment-box ()

  "Insert the beginning of a comment, followed by a string of asterisks."
  
  (interactive)
  
  (insert "/************************************************\n")
 )

(defun c-end-comment-box ()
  
  "Insert a string of asterisks, followed by an end of a comment"
  
  (interactive)

  (insert "************************************************/\n")

  )

(add c-mode-hook
     (lambda ()
	(define-key c-mode-map "\C-cb" 'c-begin-comment-box)
	(define-key c-mode-map "\C-ce" 'c-end-comment-box)
       )
     )

Koda seveda ne deluje. Nekje sem se zatipkal, se najbolj pa sumim napacno 
rabo apostrofov. Mi lahko kdo pomaga?

TIA in lp,
Grega 



More information about the lugos-list mailing list