[Top][All Lists]

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

Re: scroll-down with pixel transition

From: Kaushal Modi
Subject: Re: scroll-down with pixel transition
Date: Wed, 19 Apr 2017 15:07:11 +0000

On Wed, Apr 19, 2017 at 10:44 AM Eli Zaretskii <address@hidden> wrote:
> From: Kaushal Modi <address@hidden>
> Date: Wed, 19 Apr 2017 12:38:52 +0000
> Cc: Clément Pit-Claudel <address@hidden>,
>       Emacs developers <address@hidden>, address@hidden
> I learnt recently that foo-p naming convention is only for predicate
> functions that return nil or non-nil.

We have several dozen of variables in Emacs whose names end in "-p".

It's just a convention, and it makes sense so I suggested that.

I ran ag in emacs/lisp:

1. 1511 matches -- defuns and defsubsts ending in -p -- ag 'def(un|subst)\s+[^ ]+-p\s+' --stats
2. 149 matches -- defvars, defconsts and defcustoms ending in -p -- ag 'def(var|const|custom)\s+[^ ]+-p\s+' --stats  
3. 65 matches -- Just the user-facing defcustoms -- ag 'defcustom\s+[^ ]+-p\s+' --stats

So it is correct that there are dozens of variables that end in -p, but it's a stronger convention to have -p in functions.

Kaushal Modi

reply via email to

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