[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: Shrinking the C core
From: |
Drew Adams |
Subject: |
RE: [External] : Re: Shrinking the C core |
Date: |
Sun, 17 Sep 2023 17:38:03 +0000 |
> For functions like `cl-incf', where there is no corresponding
> "incf" [I don't know whatever happened to it or why it was
> dropped, or maybe it wasn't ever there before cl-lib?] one
> could setup aliases or simply drop the "cl-" prefix (and set
> an "cl-incf" alias to the new "incf" as not to break existing
> code).
The CL emulation was originally in file `cl.el' and
its helper files, such as `cl-macs.el'. At that time
functions/macros such as `cl-incf' and `cl-case' had
no `cl-' prefix. E.g., Emacs 20:
___
incf is a Lisp macro in `cl'.
(incf PLACE &optional X)
(incf PLACE [X]): increment PLACE by X (1 by default).
PLACE may be a symbol, or any generalized variable allowed by `setf'.
The return value is the incremented value of PLACE.
___
case is a Lisp macro in `cl-macs'.
(case EXPR &rest CLAUSES)
(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared
against each key in each KEYLIST; the corresponding BODY is evaluated.
If no clause succeeds, case returns nil. A single atom may be used in
place of a KEYLIST of one atom. A KEYLIST of `t' or `otherwise' is
allowed only in the final clause, and matches if no other keys match.
Key values are compared by `eql'.
___
There's no `incf' or `case' in Elisp that would
conflict with the CL-emulation definitions, but
when Someone decided to prefix CL thingies with
`cl-' the decision was to do it wholesale, not
just where there was a collision/conflict with
existing Elisp thingies.
- Re: [External] : Re: Shrinking the C core, Arthur Miller, 2023/09/13
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/15
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/16
- Re: [External] : Re: Shrinking the C core, Alfred M. Szmidt, 2023/09/17
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/17
- Re: [External] : Re: Shrinking the C core, Alfred M. Szmidt, 2023/09/17
- RE: [External] : Re: Shrinking the C core,
Drew Adams <=
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/18
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Eli Zaretskii, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/21
- Re: [External] : Re: Shrinking the C core, Eli Zaretskii, 2023/09/17
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/17
- RE: [External] : Re: Shrinking the C core, Drew Adams, 2023/09/17
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/18