emacs-devel
[Top][All Lists]
Advanced

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

Re: [External] : Re: [elpa] main 2ec80977e1: * elpa-packages (dired-prev


From: Philip Kaludercic
Subject: Re: [External] : Re: [elpa] main 2ec80977e1: * elpa-packages (dired-preview): New package
Date: Fri, 14 Jul 2023 19:29:51 +0000

Drew Adams <drew.adams@oracle.com> writes:

> While on the subject of `dolist' versus `mapc',
> I'd add that code with `dolist' looks more like
> usual imperative programming constructs (e.g.,
> it looks like C or Fortran), and `mapc' looks,
> perhaps misleadingly, more like functional
> programming mapping over streams.
>
> IOW, IMO there's no great use case for `mapc'
> on a list, but I suppose maybe someone might
> find it clearer than `dolist' when used in a
> context where there's already some other
> mapping involved.

I rgrep'ed my own code and found this block I still find convenient,
because I don't have to come up with a name (even though `var'  would
probably be a sufficiently good fit here, I guess):

--8<---------------cut here---------------start------------->8---
(mapc #'kill-local-variable
      '(enable-local-variables
        header-line-format
        buffer-read-only))
--8<---------------cut here---------------end--------------->8---




reply via email to

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