[Top][All Lists]

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

Re: [Emacs-diffs] trunk r113747: lisp/frameset.el: Convert `frameset' to

From: Stefan Monnier
Subject: Re: [Emacs-diffs] trunk r113747: lisp/frameset.el: Convert `frameset' to vector and add new slots.
Date: Thu, 08 Aug 2013 09:18:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>  - `frameset-save', the type's constructor, captures all or a subset of the
>    live frames, and returns a serializable snapshot of them (a frameset).
> The reason I didn't completely remove make-frameset is because I use
> internally.  It's a tiny bit cleaner that constructing the vector by
> hand.

You could make it more clearly internal by renaming it to something like

You could also replace it with a constructor that does the right thing.
Something like

   (:constructor nil)
    (frame-list &key app name description
                     filters predicate properties
                &aux (states
                      (let* ((list (or (copy-sequence frame-list)
                             (frames (cl-delete-if-not
                                      (if predicate
                                          (cl-delete-if-not predicate list)
                        (frameset--record-minibuffer-relationships frames)
                         (lambda (frame)
                            (frameset-filter-params (frame-parameters frame)
                                                    (or filters
                            (window-state-get (frame-root-window frame) t)))

But I find this way really hideous.

> Also, I've added docstrings for frameset-p and all slot accessors, via
> (put 'frameset-SLOT 'function-documentation "Docstring."). Oh the joy.
> Please tell me that I just missed a way to define the docstrings in
> the cl-defstruct declaration...

No, I don't think there's such a thing as slot-doc-strings ;-)
Neither in cl-defstruct, nor in Common-Lisp itself.


reply via email to

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