>>>>> "Eric" == Eric Friedman <[EMAIL PROTECTED]> writes:

  Eric> : While I'm offering suggestions, something I have never seen
  Eric> in a code : editor, but which I think would be very useful
  Eric> would be a command to toggle : the display of comments on and
  Eric> off. I find that sometimes I just don't want : to see the
  Eric> comments when examining my code. Anybody else every wished for
  Eric> : something like that?

  Eric> You can probably do this with hideshow mode, whose comments
  Eric> say that comments are just another kind of block.  You'll need
  Eric> to write some regexes, no doubt, but that's a small price to
  Eric> pay.


        My own "jfolding" mode does precisely this. It uses hide-show
to fold the code blocks, and "folding mode" to fold the comments. Its
a bit of a hack but it works fine for me in most cases. The advantage
of using the two different systems is that you can fold comments, and
code blocks independantly. The disadvantage is that you get two menus
rather than one. From the documentation. 

       


;;;
;; Usage:
;; 
;; This package folds away java methods and block comments. 
;; There is a method jfolding-hide-all which hides all of the
;; methods. The normal "hide-all" from hide-show does the wrong
;; thing. The folding works fine using the folding package commands, 
;; in the "fld" method. You can also fold and unfold with mouse 
;; clicks (most of the time). The right mouse button is bound to
;; toggle a folded block. The way to get this to work is to 
;; point your mouse at say an open brace, left click, to move point 
;; to the brace and right click to fold. 
;;
;; Its not as hard as it sounds
;;


        You can get it at http://www.bioinf.man.ac.uk/~lord/home.html
and follow the link to "emacs packages".


         Phil    

Reply via email to