all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* rename jit-lock-function jit-lock-from
@ 2010-08-03 10:07 Andreas Röhler
  2010-08-03 13:52 ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Röhler @ 2010-08-03 10:07 UTC (permalink / raw)
  To: emacs-devel; +Cc: Gerd Moellmann

Hi,

having the admirable `jit-lock.el' at the desk, thanks a lot to Gerd 
Moellmann BTW, just one tiny issue:

(defun jit-lock-function (start)

A symbol having `function' in it's name is supposed to
be a variable harbouring a function.

Considering the usage, I suggest renaming it into

jit-lock-from

Thanks


Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/





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

* Re: rename jit-lock-function jit-lock-from
  2010-08-03 10:07 rename jit-lock-function jit-lock-from Andreas Röhler
@ 2010-08-03 13:52 ` Juanma Barranquero
  2010-08-03 14:16   ` Andreas Röhler
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2010-08-03 13:52 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Emacs developers

On Tue, Aug 3, 2010 at 12:07, Andreas Röhler <andreas.roehler@online.de> wrote:

> A symbol having `function' in it's name is supposed to
> be a variable harbouring a function.

Unfortunately, there's no restriction for function names. On a fresh
emacs -Q I get these:

Buffer-menu-revert-function
ange-ftp-completion-hook-function
ange-ftp-hook-function
auto-fill-function
backquote-list*-function
blink-cursor-timer-function
common-lisp-indent-function
compilation-next-error-function
completion-setup-function
describe-function
direct-print-region-function
direct-ps-print-region-function
disabled-command-function
elp-instrument-function
ethio-composition-function
fill-minibuffer-function
find-function
font-lock-after-change-function
font-lock-default-function
format-annotate-function
indirect-function
jit-lock-function
lao-composition-function
lisp-font-lock-syntactic-face-function
lisp-indent-function
macro-declaration-function
occur-revert-function
process-kill-buffer-query-function
sgml-html-meta-auto-coding-function
sgml-xml-auto-coding-function
symbol-function
syntax-ppss-after-change-function
tags-completion-at-point-function
tai-viet-composition-function
thai-composition-function
timer--function
timer-set-function
trace-function
vc-find-backend-function

   J



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

* Re: rename jit-lock-function jit-lock-from
  2010-08-03 13:52 ` Juanma Barranquero
@ 2010-08-03 14:16   ` Andreas Röhler
  2010-08-03 14:23     ` Juanma Barranquero
  2010-08-04 13:23     ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Röhler @ 2010-08-03 14:16 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs developers

Am 03.08.2010 15:52, schrieb Juanma Barranquero:
> On Tue, Aug 3, 2010 at 12:07, Andreas Röhler<andreas.roehler@online.de>  wrote:
>
>    
>> A symbol having `function' in it's name is supposed to
>> be a variable harbouring a function.
>>      
> Unfortunately, there's no restriction for function names. On a fresh
> emacs -Q I get these:
>
> Buffer-menu-revert-function
> ange-ftp-completion-hook-function
> ange-ftp-hook-function
> auto-fill-function
> backquote-list*-function
> blink-cursor-timer-function
> common-lisp-indent-function
> compilation-next-error-function
> completion-setup-function
> describe-function
> direct-print-region-function
> direct-ps-print-region-function
> disabled-command-function
> elp-instrument-function
> ethio-composition-function
> fill-minibuffer-function
> find-function
> font-lock-after-change-function
> font-lock-default-function
> format-annotate-function
> indirect-function
> jit-lock-function
> lao-composition-function
> lisp-font-lock-syntactic-face-function
> lisp-indent-function
> macro-declaration-function
> occur-revert-function
> process-kill-buffer-query-function
> sgml-html-meta-auto-coding-function
> sgml-xml-auto-coding-function
> symbol-function
> syntax-ppss-after-change-function
> tags-completion-at-point-function
> tai-viet-composition-function
> thai-composition-function
> timer--function
> timer-set-function
> trace-function
> vc-find-backend-function
>
>     J
>
>    

Thanks for the check.

Let me state nonetheless: a variable bearing "function" in its name part 
delivers useful information.
A function calling themself function not  IMHO, as its character as a 
function is visible already.

Should not be a restriction, rather a recommendation.

Andreas




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

* Re: rename jit-lock-function jit-lock-from
  2010-08-03 14:16   ` Andreas Röhler
@ 2010-08-03 14:23     ` Juanma Barranquero
  2010-08-04  4:05       ` Miles Bader
  2010-08-04 13:23     ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2010-08-03 14:23 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Emacs developers

On Tue, Aug 3, 2010 at 16:16, Andreas Röhler <andreas.roehler@online.de> wrote:

> A function calling themself function not  IMHO, as its character as a
> function is visible already.

Many of them are called XXX-function because they are the default
value for the XXX-function variable.

It's similar to the functions called XXX-hook which are default values
for the corresponding hook vars.

    Juanma



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

* Re: rename jit-lock-function jit-lock-from
  2010-08-03 14:23     ` Juanma Barranquero
@ 2010-08-04  4:05       ` Miles Bader
  2010-08-04  4:11         ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2010-08-04  4:05 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Andreas Röhler, Emacs developers

Juanma Barranquero <lekktu@gmail.com> writes:
>> A function calling themself function not  IMHO, as its character as a
>> function is visible already.
>
> Many of them are called XXX-function because they are the default
> value for the XXX-function variable.
>
> It's similar to the functions called XXX-hook which are default values
> for the corresponding hook vars.

To be fair, even in those cases, I think most current uses of a
"-function" suffix in function names are confusing.

A name like "XXX-default-function" _does_ seems good for that usage, as
it explicitly states what it's used for, but just "XXX-function" does
not, and indeed is positively confusing, I think, for the reasons
Andreas mentions.

-Miles

-- 
History, n. An account mostly false, of events mostly unimportant, which are
brought about by rulers mostly knaves, and soldiers mostly fools.



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

* Re: rename jit-lock-function jit-lock-from
  2010-08-04  4:05       ` Miles Bader
@ 2010-08-04  4:11         ` Juanma Barranquero
  0 siblings, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2010-08-04  4:11 UTC (permalink / raw)
  To: Miles Bader; +Cc: Andreas Röhler, Emacs developers

On Wed, Aug 4, 2010 at 06:05, Miles Bader <miles@gnu.org> wrote:

> To be fair, even in those cases, I think most current uses of a
> "-function" suffix in function names are confusing.

I dislike them, too.

My point is that this is not a bug on jit-lock-function, but something
pervasive. Changing it would require introducing a bunch of obsolete
aliases, for little gain. IMHO the best thing to do is adding a note
to the coding guidelines stating what to do (perhaps the
-default-function you suggest, though I don't much like it either),
and let the current uses languish and disappear.

    Juanma



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

* Re: rename jit-lock-function jit-lock-from
  2010-08-03 14:16   ` Andreas Röhler
  2010-08-03 14:23     ` Juanma Barranquero
@ 2010-08-04 13:23     ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2010-08-04 13:23 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Juanma Barranquero, Emacs developers

> Let me state nonetheless: a variable bearing "function" in its name
> part delivers useful information.  A function calling themself
> function not  IMHO, as its character as a function is visible already.

Agreed.


        Stefan



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

end of thread, other threads:[~2010-08-04 13:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 10:07 rename jit-lock-function jit-lock-from Andreas Röhler
2010-08-03 13:52 ` Juanma Barranquero
2010-08-03 14:16   ` Andreas Röhler
2010-08-03 14:23     ` Juanma Barranquero
2010-08-04  4:05       ` Miles Bader
2010-08-04  4:11         ` Juanma Barranquero
2010-08-04 13:23     ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.