emacs-devel
[Top][All Lists]
Advanced

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

Re: Performance degradation from long lines


From: Eli Zaretskii
Subject: Re: Performance degradation from long lines
Date: Sun, 10 Mar 2019 14:58:55 +0200

> Cc: address@hidden, address@hidden, address@hidden
> From: Phil Sainty <address@hidden>
> Date: Sun, 10 Mar 2019 23:22:02 +1300
> 
> >   +(defgroup so-long nil
> >   +  "Prevent unacceptable performance degradation with very long lines."
> >   +  :prefix "so-long"
> >   +  :group 'convenience)
> >   +
> >   +(defcustom so-long-threshold 250
> >   +  "Maximum line length permitted before invoking `so-long-function'.
> >   +
> >   +See `so-long-detected-long-line-p' for details."
> >   +  :type 'integer
> >   +  :package-version '(so-long . "1.0")
> >   +  :group 'so-long)
> > 
> > Please add :version tags to all the customizable options.
> 
> It hadn't occurred to me that the defgroup should specify a version,
> but I can add that.

I meant defcustoms.

> I thought that :package-version functioned as an alternative to
> :version which worked both for the core library and for the GNU ELPA
> package for earlier emacs versions?

AFAIR, when we discussed this, the intent was to put this in core?  I
have no clear idea what is required for ELPA.

> > Also, please make the first sentence fit on a single line -- this
> > is important for Apropos commands, which only display one line.
> 
> In this instance I had intentionally wrapped the line early so that
> the first line was coherent on its own, even though it was part of a
> longer sentence.  i.e.:
> 
> "Ensures that `so-long-mode' knows the original `major-mode'"
> 
> If that's not sufficient, I can rephrase it over multiple sentences.

I think we want this rephrased.  Just put a period at the end of the
first line, and then add something to the beginning of the rest to get
the next sentence.

> >   +(defun so-long-menu ()
> >   +  "Dynamically generate the \"So Long\" menu."
> >   +  ;; (info "(elisp) Menu Example")
> > 
> > How about providing some help-echo for this menu?
> 
> I'd tried that initially, but I found it so glitchy that I removed it.

??? I'm surprised: I never saw nor hear any complaints about help-echo
for menus.

> I think the `so-long-menu-item-revert' docstring can remain as a
> simple cross-reference to `so-long-revert', or else I could do this:
> 
> ;; Duplicate the `so-long-revert' documentation for the menu item.
> (put 'so-long-menu-item-revert 'function-documentation
>      (documentation 'so-long-revert t))

I wonder how will that work with i18n.



reply via email to

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