1

I want hs-minor-mode features, I chose it amongst many options I reviewed. How to make it work?

The only package I have atm is web-mode. I put this line in my init file:

(hs-minor-mode)

The error on Emacs startup:

Debugger entered--Lisp error: (error "Fundamental Mode doesn't support Hideshow Minor Mode")
  signal(error ("Fundamental Mode doesn't support Hideshow Minor Mode"))
  error("%s Mode doesn't support Hideshow Minor Mode" "Fundamental")
  hs-grok-mode-type()
  hs-minor-mode()
  eval-buffer(#<buffer  *load*> nil "/home/Miguel/.emacs" nil t)  ; Reading at buffer position 1759
  load-with-code-conversion("/home/Miguel/.emacs" "/home/Miguel/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "\205\262
5

hs-minor-mode is a minor mode. Like most minor modes, it is buffer-specific and should be activated in each buffer where you want it. The error message you have is because the code you added to your init file activates (or tries to activate) hideshow when your init file loads, which is way too early : at that moment, the current buffer is most certainly some temporary buffer, and it doesn't make sense to activate hideshow there.

So your actual question is : how do I activate hideshow ? The answer depends a bit on when you want to activate it. You probably want to activate it for some specific files/buffers, e.g. all emacs-lisp buffers. Then you would add the following to your init file :

(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.