emacs - enable other minor mode after calling for my node -


i'd write minor mode switches several other modes when run. kind of umbrella mode.

now i'm stack simplest task - create mode enables single other mode.

i'v wrote

(require 'whitespace) (define-minor-mode   myspace-mode   "some doc"   nil   nil   (if myspace-mode     (whitespace-mode 1)     (whitespace-mode -1)  ) ) 

when toggle mode m-x nothing happens. when evaluate directly (whitespace-mode ±1) works expected.

what miss?

there 1 parameter missing definition. reason, (if ...) form interpreted keymap parameter.

try this:

(define-minor-mode   myspace-mode   "some doc"   nil   nil   nil   (if myspace-mode       (whitespace-mode 1)       (whitespace-mode -1))) 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -