GNU bug report logs - #15906
24.3.50; Rename `highlight-*' functions

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 15 Nov 2013 18:33:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15906 in the body.
You can then email your comments to 15906 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15906; Package emacs. (Fri, 15 Nov 2013 18:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Nov 2013 18:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Rename `highlight-*' functions
Date: Fri, 15 Nov 2013 10:31:24 -0800 (PST)
The prefix `highlight-' should not be used for something as specific as
`hi-lock' highlighting or highlighting to show changes.  There are lots
of different kinds of highlighting in Emacs.  And third party libraries
provide many more ways.  The latter are requested by convention to use a
library prefix.

Hi Lock is one kind of highlighting, and quite particular.  The "lock"
part of its name is significant - it differentiates this highlighting
from other highlighting, and it should be present in the function names.

These are the functions to rename, with suggested renamings:

highlight-lines-matching-regexp    -> hi-lock-lines-matching-regexp
highlight-phrase                   -> hi-lock-phrase
highlight-regexp                   -> hi-lock-regexp
highlight-changes-mode             -> hilit-changes-mode
highlight-changes-next-change      -> hilit-changes-next-change
highlight-changes-previous-change  -> hilit-changes-previous-change
highlight-changes-remove-highlight -> hilit-changes-remove-highlight
highlight-changes-rotate-faces     -> hilit-changes-rotate-faces
highlight-changes-visible-mode     -> hilit-changes-visible-mode
highlight-compare-buffers          -> hilit-compare-buffers
highlight-compare-with-file        -> hilit-compare-with-file

An alternative for the `hilit-' functions would be to use `changes-' as
the prefix.  The result is clearer and shorter names, and it puts up
front what the highlighting is about: showing changes:

changes-highlight-mode
changes-highlight-next
changes-highlight-previous
changes-remove-highlight
changes-rotate-faces
changes-visible-mode
changes-compare-buffers
changes-compare-with-file

(No need for "highlight" at all in half of these names.)


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-11-12 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15906; Package emacs. (Fri, 29 Apr 2016 14:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 15906 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15906 <at> debbugs.gnu.org
Subject: Re: bug#15906: 24.3.50; Rename `highlight-*' functions
Date: Fri, 29 Apr 2016 16:08:30 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> The prefix `highlight-' should not be used for something as specific as
> `hi-lock' highlighting or highlighting to show changes.  There are lots
> of different kinds of highlighting in Emacs.  And third party libraries
> provide many more ways.  The latter are requested by convention to use a
> library prefix.
>
> Hi Lock is one kind of highlighting, and quite particular.  The "lock"
> part of its name is significant - it differentiates this highlighting
> from other highlighting, and it should be present in the function names.
>
> These are the functions to rename, with suggested renamings:
>
> highlight-lines-matching-regexp    -> hi-lock-lines-matching-regexp
> highlight-phrase                   -> hi-lock-phrase
> highlight-regexp                   -> hi-lock-regexp
> highlight-changes-mode             -> hilit-changes-mode
> highlight-changes-next-change      -> hilit-changes-next-change
> highlight-changes-previous-change  -> hilit-changes-previous-change
> highlight-changes-remove-highlight -> hilit-changes-remove-highlight
> highlight-changes-rotate-faces     -> hilit-changes-rotate-faces
> highlight-changes-visible-mode     -> hilit-changes-visible-mode
> highlight-compare-buffers          -> hilit-compare-buffers
> highlight-compare-with-file        -> hilit-compare-with-file

It is perhaps unfortunate that hi-lock has taken these prefixes, but
changing this at this point would be too much churn for little gain.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Apr 2016 14:09:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 15906 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Apr 2016 14:09:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 28 May 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.