The blank-mode.el (attached in this email) now has the toggle funs: blank-toggle blank-toggle-global If it's called interactively, it reads a char. If it's called non-interactively, it should be passed a symbol or a list of symbols. Please, read the fun docstring. Juri Linkov wrote: >>>> So, if blank-toggle is binded to a key, for example, C-c b, then the >>>> user could >>>> type: >>>> >>>> C-c b t toggle tabs >>>> C-c b s toggle spaces and hard spaces >>>> C-c b r toggle trailing blanks >>>> C-c b b toggle spaces before tab >>>> C-c b l toggle lines >>> I like the idea (and blank-mode in general), > > I like this package too, and I have some suggestions: since it implements > a minor mode I suggest defining it with `define-minor-mode', and name the > global mode `global-blank-mode'. Well, I'll try to use define-minor-mode in the next blank-mode version. Is there some convention (or consensus) about global mode name? > Also I have a question how it interacts with nobreak-char-display. > Does your package overwrite highlighting of nobreak space displayed > by nobreak-char-display feature, or ignores it? I've made some tests and both blank-mode faces and display table are displayed when blank-mode is on and nobreak-char-display is t. When blank-mode is turned off and nobreak-char-display is t, the nobreak-char-display faces and display table are displayed. That is, blank-mode have precedence over nobreak-char-display but only over hard spaces (or nobreak spaces), the soft hyphens is handled only by nobreak-char-display. The same occurs with show-trailing-whitespace feature. >>> but according to the >>> Emacs Lisp reference, C-c b is reserved for major modes: >>> >>> The key sequences bound in a minor mode should consist of `C-c' >>> followed by one of `.,/?`'"[]\|~!#$%^&*()-_+='. (The other punctuation >>> characters are reserved for major modes.) >> No problem, the key binding above was only an example, it could be any >> other key binding. > > I think a key prefix with good mnemonics for blank-minor-mode is `C-c _'. Cool! At moment blank-mode doesn't have any key binding, this is left to the user do. But I'll put a tip in blank-mode documentation suggesting the key prefix `C-c _'.