emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: blank-mode.el


From: Drew Adams
Subject: RE: blank-mode.el
Date: Sun, 28 Oct 2007 12:05:56 -0700

> > User option `blank-chars' specifies which blank characters to
> > highlight, but it would be good to also have commands to toggle
> > each highlighting type. For example, `M-x blank-toggle-trailing'
> > and `M-x blank-toggle-tabs'. And it would be good to have this
> > for both local and global use: `blank-toggle-tabs-global', in
> > addition to `blank-toggle-tabs'.
>
> Hummm, maybe a better approach could be to pass a list to blank-mode or
> blank-global-mode like:
>
> ; turn on local blank-mode but only highlight trailing spaces and spaces
> before tab
> (blank-mode '(trailing space-before-tab))
>
> So, the command above is the same as the following sequence:
>
> (blank-mode nil)
> (setq blank-chars '(trailing space-before-tab))
> (blank-mode t)

What would that mean interactively? Would the user need to decide which
chars to highlight each time s?he used the mode command? How would s?he
specify those chars - input their names with completion? What if s?he just
wants the default (current) `blank-chars' - does s?he still need to specify
all the chars to highlight when turning on the mode?

I don't think the choice of what to highlight should be connected with the
mode command. That should remain a simple toggle, just turning on/off
highlighting as specified by the current value of `blank-chars'. Much of the
time, that will be all a user needs.

I'd prefer to have a separate toggle command for each kind of blank
highlighting - those commands would only change the value of `blank-chars'.
That, to me, is the most convenient for the user - more convenient than
`set-variable' or `customize-option', and more convenient that coupling
highlighting changes with the mode command.

Second best is just using `set-variable' (but that requires you to specify
each of the chars to highlight). IIUC, least convenient of all, IMO, is
coupling the minor-mode command with the chars choice.

My suggestion lets users change the highlighting by expressing only the
delta - not all of the chars to highlight, but just what to change.

Just one opinion.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]