This page is about library '''<tt>[[hide-comnt.el]]</tt>''' and related features.

== Library `hide-comnt.el' ==

##hide-comnt.el## provides two commands, a macro, and a user option:

* [[command|Command]] '''`hide/show-comments'''' -- Does what its name says.  If the [[region]] is [[active region|active]] then hiding is limited to the region.  With a [[prefix argument]], hidden comments are shown again.

* Command '''`hide/show-comments-toggle'''' -- Toggles hiding/showing in the active region, or the whole buffer if the region is inactive.

* EmacsLisp [[macro]] '''`with-comments-hidden'''' --  Temporarily hides comments while it executes a body of code.  You do not see the commented text disappear and reappear -- it is effectively just '''ignored''' while processing the body.  The macro uses `hide/show-comments' to hide the comments.

* [[user options]]:

** '''`hide-whitespace-before-comment-flag'''' -- If non-`nil' then whitespace preceding a comment is hidden.  Empty lines (newline chars) are not hidden, however.

** '''`ignore-comments-flag'''' -- If `nil' then `with-comments-hidden' does not ignore comments.

** '''`show-invisible-comments-shows-all'''' -- If non-`nil' then showing comments after hiding them shows **all** text that was invisible, however it was made so.  The default is `nil': make visible only text that was made invisible by `hide/show-comments'.



== Features that Use `hide-comnt.el' ==

* Commands '''`next-visible-thing'''' and '''`previous-visible-thing'''', in library <tt>[[thing-cmds.el]]</tt>, use macro `with-comments-hidden', so they ignore things that are in commented code.

* In '''[[Icicles]]''':

** '''`##C-M-;##'''' in the [[minibuffer]] toggles option `ignore-comments-flag'.

** Command '''`icicle-search-thing'''' respects the option: when non-`nil' it ignores (does not search) ThingAtPoint things that are commented out.

** Commands '''`icicle-next-visible-thing'''' and '''`icicle-previous-visible-thing'''' are similar to `next-visible-thing' and `previous-visible-thing' from <tt>[[thing-cmds.el]]</tt>.







== Comments ==

[new]
Added an ELPA package of this library for download here: http://www.wisdomandwonder.com/link/6390/hide-or-ignore-comments-elpa-package -- GrantRettke

----













----
CategoryHideStuff
CategoryComments
