unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15906: 24.3.50; Rename `highlight-*' functions
@ 2013-11-15 18:31 Drew Adams
  2016-04-29 14:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2013-11-15 18:31 UTC (permalink / raw)
  To: 15906

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'





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#15906: 24.3.50; Rename `highlight-*' functions
  2013-11-15 18:31 bug#15906: 24.3.50; Rename `highlight-*' functions Drew Adams
@ 2016-04-29 14:08 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-29 14:08 UTC (permalink / raw)
  To: Drew Adams; +Cc: 15906

Drew Adams <drew.adams@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-29 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-15 18:31 bug#15906: 24.3.50; Rename `highlight-*' functions Drew Adams
2016-04-29 14:08 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).