I use the package hideshow to fold/unfold codes. Recently I write some code to enable folding the #ifdef, #endif in c-mode like that

  (add-to-list 'hs-special-modes-alist
               '(c-mode "#ifdef"

I don't know why it doesn't work (just nothing happend when I used it).

I know another package hide-ifdef, but I hope to use hideshow to implement this function to make my operation more integrated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.