emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: hi-lock-buffer-mode and hi-lock-mode do not follow normal convention


From: Juri Linkov
Subject: Re: hi-lock-buffer-mode and hi-lock-mode do not follow normal convention
Date: Tue, 06 Dec 2005 03:54:34 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> It seems that much of Emacs follows a convention for naming global
> minor modes vs buffer local minor modes that hi-lock-mode does not
> follow. The convention is for buffer local minor modes to be named
> minor-mode-name and for global minor modes to be named
> global-minor-mode-name.
>
> I realize that previously hi-lock-mode was the global mode, and you
> want to keep backward compatibility, but it is confusing to have
> multiple conventions for the same thing.

It is bad that now hi-lock does not follow a convention for naming
minor modes.  This makes it harder to understand how to use hi-lock mode.

> Please change the function named hi-lock-mode to global-hi-lock-mode,
> hi-lock-buffer-mode to hi-lock-mode.

I'm not sure how the users having (hi-lock-mode 1) in .emacs will
react to this change.

> This bit me because I don't like having the H for hi-lock-mode
> displayed in the mode line, so I added
>
> (setf (second (assoc 'hi-lock-mode minor-mode-alist)) nil)
>
> to my init file.  This just broke.

I don't like having the H displayed in the mode line for no reason too.
I have a local fix that displays Hi in the mode line only when the
list of regexps to highlight is not empty in the current buffer.
This means it is displayed only when hi-lock has something to highlight.

Do you think it would be useful to use this logic by default in hi-lock.el?

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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