emacs-devel
[Top][All Lists]
Advanced

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

RE: [Emacs-diffs] emacs-25 a9c48d5: Additional fixes for file notificati


From: Drew Adams
Subject: RE: [Emacs-diffs] emacs-25 a9c48d5: Additional fixes for file notification
Date: Mon, 29 Feb 2016 13:19:21 -0800 (PST)

> > `cl-callf'
> > `cl-callf2'
> 
> Don't have an opinion on those two.  They might fit in gv.el.

Good.

> > `cl-iter-defun'
> 
> This one could indeed move to generator.el, tho it currently uses
> the internal cl--transform-lambda, so the implementation would need
> to be rewoked to avoid having an external package depend on CL's
> internals.

Good again.

> > `cl-flet*'
> 
> This belongs right next to cl-flet, so moving it out of cl-lib would
> make no sense.
> 
> > `cl-letf*'
>
> This belongs right next to cl-letf.

It belongs right next to `letf'.  Neither `letf' nor `letf*' are
Common Lisp.  Why should they be in this library and have prefix
`cl-'?  They are Emacs inventions.

> > `cl-prettyprint'   (called a "debugging aid")
> > `cl-prettyexpand'  (called a "debugging aid")
> > `cl-describe-type'
> 
> These are intimately linked to cl-lib's implementation, AFAIK.

1. No, I don't think so, at least not the pretties.  Grepping for
   `cl-prettyprint' shows that it is used only in `cl-prettyexpand'.  
   Grepping for that shows that it used nowhere.

2. But if it were true then they should use prefix `cl--', no?

3. Grepping for `cl-describe-type' shows that it is used only to
   fill `describe-symbol-backends' and to define button type
   `cl-help-type'.  Not Common Lisp at all - just Emacs stuff.

> > Moving to `cl-preloaded.el':
> > `cl-struct-define'
> 
> Same here.  IOW they belong to cl-lib not because they're part of
> Common-Lisp, but because they belong to cl-lib's implementation.

Rename it (there is no "them") using prefix `cl--', if it is really
used only to implement a Common Lisp construct.

> > And it seems that there are internal functions and macros,
> > which are used only for implementing CL things, which use
> > prefix `cl-' instead of `cl--'.  For example, `cl-struct-define'.
> > Should they not be renamed?
> 
> I don't have a strong opinion on this.  The issue is the following:
> cl-struct-define is "used internally by cl-defstruct", but it can't
> be changed at will, because it will basically have to be preserved
> for as long as Emacs-NN.MM wants to be able to run .elc files
> generated with Emacs-24.5.

At the rate things have been changing in the byte-compiler, that
won't be long. ;-)

> Those "functions only used in a macro's expansion" have a half-way
> "internal" status in this respect, and we sometimes give them
> a "prefix-" and sometimes a "prefix--".

How so, "half-way"?  When is it sometimes this and when sometimes
that?

I think Joost expressed the point pretty clearly just now:

  To me, `cl' is so obviously an abbreviation for Common Lisp that
  I would automatically expect any function (macro, etc.) prefixed
  with `cl-' to be a Common-Lisp emulation function. The fact that
  some of them aren't is quite confusing and makes me wonder by what 
  criterion a function or macro is included in (or excluded from)
  cl-lib.



reply via email to

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