emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 012487b: * lisp/display-line-numbers.el (displa


From: Eli Zaretskii
Subject: Re: [Emacs-diffs] master 012487b: * lisp/display-line-numbers.el (display-line-numbers-type): Autoload it.
Date: Mon, 24 Jul 2017 21:04:18 +0300

> From: Stefan Monnier <address@hidden>
> Date: Mon, 24 Jul 2017 13:29:39 -0400
> 
> >> +;; Following function calls will autoload the library.
> >> +(defvar display-line-numbers-type)
> >> +
> >> (defun menu-bar-display-line-numbers-mode (type)
> >> (setq display-line-numbers-type type)
> >> (if global-display-line-numbers-mode
> > How is this better than the autoload?
> 
> Autoloading variables is a source of corner-case problems, and
> autoloading defcustoms even more so.

Emacs is full of corner-case problems, one more or one less won't
change anything.

And can you PLEASE make the problems documented somewhere?  The way
you are fighting this makes it sound like some black magic that only
you understand.  Maybe if the problem description is out in the open,
it will be easier to get people to follow your views?

> It's not serious enough to ban such autoloads, but it's a good
> practice to try and avoid them when it can be done cheaply, and to
> clearly document them when we do need them.

Good practice comes out from clearly documented problems and well
explained solutions.  We should _educate_ people to avoid such
problems, not haunt them with review comments that, left unexplained,
make little sense.  If it's important, it should be in "code
conventions" in the ELisp manual.

> - the comment on the defvar isn't needed anyway: it's pretty clear why the
>   defvar is used

It isn't clear to me, at least.



reply via email to

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