emacs-devel
[Top][All Lists]
Advanced

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

Re: Freezing frameset-restore


From: Juanma Barranquero
Subject: Re: Freezing frameset-restore
Date: Fri, 7 Mar 2014 22:34:45 +0100

On Fri, Mar 7, 2014 at 9:32 PM, Stefan Monnier <address@hidden> wrote:

> Could we instead make frameset-restore return a list of (FRAME
> . ACTION), so we can then use a plain dolist if we want to do some
> extra cleanup.

We could do that, but a priori I think the most common use case for
frameset-restore is to substitute the current frame(s) for the ones
restored from the frameset, so with your proposal the default call for
frameset restore would go from

  (frameset-restore fs)  ; all the current defaults make sense in this case

to

(dolist (frame-action (frameset-restore fs))
  (with-demoted-errors "Error deleting frame: %s"
    (when (memq (cdr frame-action) '(:ignored :rejected))
      (delete-frame (car frame-action)))))

i.e., we're offloading complexity from the occasional use of CLEANUP's
FUNC variant to the common case. To avoid that we would still need a
way to tell frameset-restore to default to :delete, and then we're
back to CLEANUP.

    J



reply via email to

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