[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp files that load cl-lib in problematical ways
From: |
Eli Zaretskii |
Subject: |
Re: Lisp files that load cl-lib in problematical ways |
Date: |
Wed, 25 Oct 2023 15:23:43 +0300 |
> From: Richard Stallman <rms@gnu.org>
> Cc: acm@muc.de, emacs-devel@gnu.org
> Date: Tue, 24 Oct 2023 22:47:23 -0400
>
> > It would not have helped to define cl-pushnew on cl-macs, because
> > cl-pushnew calls cl-adjoin, which is a function defined on cl-lib. So
> > basically cl-pushnew is a (rather thin) wrapper around cl-adjoin, and
> > thus it is correctly defined on the same file where cl-adjoin is
> > defined.
>
> That is a good point -- for that particular solution I proposed.
>
> But if we let ourselves be a little more flexible, how about this
> solution: install this
>
> (while (string-match "\\W" abbrev pos)
> (or (memq (aref abbrev (match-beginning 0)) badchars)
> (push (aref abbrev (match-beginning 0)) badchars))
> (setq pos (1+ pos)))
>
> instead of the current code:
>
> (while (string-match "\\W" abbrev pos)
> (cl-pushnew (aref abbrev (match-beginning 0)) badchars)
> (setq pos (1+ pos)))
If someone wants to work on such rewrites, I'm not sure I will object,
provided that the result is clean, tested, and is not horribly
complicated. But personally, I see no need for investing any effort
in such rewrites, since there's nothing wrong with this code and
nothing wrong with loading cl-lib when its facilities are put to a
good use.
- Re: Lisp files that load cl-lib in problematical ways, (continued)
- Re: Lisp files that load cl-lib in problematical ways, Emanuel Berg, 2023/10/23
- Re: Lisp files that load cl-lib in problematical ways, Björn Bidar, 2023/10/19
- Re: Lisp files that load cl-lib in problematical ways, Richard Stallman, 2023/10/22
- Re: Lisp files that load cl-lib in problematical ways, Eli Zaretskii, 2023/10/23
- Re: Lisp files that load cl-lib in problematical ways, Richard Stallman, 2023/10/24
- Re: Lisp files that load cl-lib in problematical ways, Stefan Kangas, 2023/10/25
- Re: Lisp files that load cl-lib in problematical ways, Gerd Möllmann, 2023/10/25
- Re: Lisp files that load cl-lib in problematical ways, Richard Stallman, 2023/10/25
- Re: Lisp files that load cl-lib in problematical ways, Eli Zaretskii, 2023/10/26
- Re: Lisp files that load cl-lib in problematical ways, Emanuel Berg, 2023/10/25
- Re: Lisp files that load cl-lib in problematical ways,
Eli Zaretskii <=
- Re: Lisp files that load cl-lib in problematical ways, Richard Stallman, 2023/10/25
- Re: Lisp files that load cl-lib in problematical ways, Eli Zaretskii, 2023/10/26
- Re: Lisp files that load cl-lib in problematical ways, Richard Stallman, 2023/10/24
Re: [External] : Re: Shrinking the C core, Arsen Arsenović, 2023/10/20