bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#22457: 24.5; [PATCH] `dired-mark-if' should not count non-changes


From: Drew Adams
Subject: bug#22457: 24.5; [PATCH] `dired-mark-if' should not count non-changes
Date: Tue, 25 Jun 2019 09:06:46 -0700 (PDT)

> And why is dired-mark-if a macro in the first place?  It's pretty long
> to be a macro; it could be rewritten as a function that take a
> predicate...

(Length of a macro's code makes no difference, if
the code using it is compiled.)

I would say leave this sleeping dog lie...

---

The PREDICATE arg is really code (a sexp), not
a predicate (function).

See also the use of `dired-mark-if' in command
`dired-mark-sexp' (in `dired-x.el').  See the
doc string of that command.

There too the PREDICATE arg is code (a sexp),
not a predicate.  And there you can use a set
of predefined variables in the "PREDICATE"
sexp that gets evaluated and then passed to
`dired-mark-if'.

See also the uses of `dired-mark-if' in
`dired-aux.el', where an anonymous function
is constructed using the macro.

This is the way things have been since about
Day One of Emacs.

Could things have been coded differently for
this?  Likely.  Should they be?  Doubtful.





reply via email to

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