From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375967931 30009 80.91.229.3 (8 Aug 2013 13:18:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2013 13:18:51 +0000 (UTC) Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 08 15:18:52 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V7Q7A-0007xd-HE for ged-emacs-devel@m.gmane.org; Thu, 08 Aug 2013 15:18:52 +0200 Original-Received: from localhost ([::1]:43063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7Q79-0007Ol-Pt for ged-emacs-devel@m.gmane.org; Thu, 08 Aug 2013 09:18:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7Q70-0007OW-8w for emacs-devel@gnu.org; Thu, 08 Aug 2013 09:18:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7Q6s-0005wp-Vi for emacs-devel@gnu.org; Thu, 08 Aug 2013 09:18:42 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:63207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7Q6s-0005wX-Qq for emacs-devel@gnu.org; Thu, 08 Aug 2013 09:18:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYcBwULCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYcBwULCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20993935" Original-Received: from 75-119-243-106.dsl.teksavvy.com (HELO pastel.home) ([75.119.243.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Aug 2013 09:18:27 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8BCCD63C87; Thu, 8 Aug 2013 09:18:33 -0400 (EDT) In-Reply-To: (Juanma Barranquero's message of "Thu, 8 Aug 2013 12:04:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162498 Archived-At: > - `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 frameset--super-dangerous-constructor-do-not-use. You could also replace it with a constructor that does the right thing. Something like (:constructor nil) (:constructor frameset-make (frame-list &key app name description filters predicate properties &aux (states (let* ((list (or (copy-sequence frame-list) (frame-list))) (frames (cl-delete-if-not #'frame-live-p (if predicate (cl-delete-if-not predicate list) list)))) (frameset--record-minibuffer-relationships frames) (mapcar (lambda (frame) (cons (frameset-filter-params (frame-parameters frame) (or filters frameset-filter-alist) t) (window-state-get (frame-root-window frame) t))) frames))))) 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. Stefan