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: Replacement for `aput' from obsolete assoc.el? Date: Tue, 05 Jun 2012 18:52:17 -0400 Message-ID: References: <87txyrnhxi.fsf@web.de> <87oboytp45@ch.ristopher.com> <87haupwo6b.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1338936756 6278 80.91.229.3 (5 Jun 2012 22:52:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Jun 2012 22:52:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 06 00:52:32 2012 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 1Sc2bw-0005pk-Vq for ged-emacs-devel@m.gmane.org; Wed, 06 Jun 2012 00:52:25 +0200 Original-Received: from localhost ([::1]:45886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc2bw-0007UL-GZ for ged-emacs-devel@m.gmane.org; Tue, 05 Jun 2012 18:52:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc2bt-0007TS-Bz for emacs-devel@gnu.org; Tue, 05 Jun 2012 18:52:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sc2br-0005Sv-LI for emacs-devel@gnu.org; Tue, 05 Jun 2012 18:52:20 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:58282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc2br-0005Sl-H7 for emacs-devel@gnu.org; Tue, 05 Jun 2012 18:52:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FpaHl/2dsb2JhbABEtBGBCIIVAQEEAScvIwULCzQSFBgNJIgcBboJkEQDliqNCYFYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="189547168" Original-Received: from 69-165-161-229.dsl.teksavvy.com (HELO pastel.home) ([69.165.161.229]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Jun 2012 18:52:17 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9A3D359319; Tue, 5 Jun 2012 18:52:17 -0400 (EDT) In-Reply-To: <87haupwo6b.fsf@web.de> (Michael Heerdegen's message of "Tue, 05 Jun 2012 21:31:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.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:150789 Archived-At: >> Using side-effects on alists is often a bad idea. > Why? I do this very often in my .emacs. For example: Because a lot of code assumes alists are used in a "pure" way. > --8<---------------cut here---------------start------------->8--- > (aput 'find-constituents 'readable (list 0)) > (eval-after-load "linkd" > '(aput 'minor-mode-alist 'linkd-mode '(" Ld"))) > (aput 'default-frame-alist 'width 104) > (aput 'warning-suppress-types 'undo '(discard-info)) > (aput 'auto-mode-alist "\\.v?dired\\'" 'dired-virtual-mode) > (aput 'org-show-siblings 'org-goto t) > (aput 'w3m-search-engine-alist > "duckduckgo" '("http://duckduckgo.com/?q=%s")) > --8<---------------cut here---------------end--------------->8--- > Is it a bad idea in these cases? AFAICT, (push (cons key val) foo) would work just as well in those cases. > Will it be ok to require cl-lib at run-time in third-party packages? Requiring `cl' has been allowed for ever in third party packages (as if we could disallow it, anyway). What is new is that require `cl-lib' is OK in non-third-party packages. Stefan