From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Strange eval behaviour Date: Sat, 19 Nov 2016 00:35:17 +0100 Message-ID: <87h974l5u2.fsf@web.de> References: <87vavrul0k.fsf@mail.de> <878tsl1p7b.fsf@mail.de> <878tshjyvy.fsf@web.de> <87fumo67vi.fsf@mail.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1479512169 21641 195.159.176.226 (18 Nov 2016 23:36:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2016 23:36:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Stefan Huchler Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 19 00:36:05 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7shQ-0004vh-1z for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 00:36:04 +0100 Original-Received: from localhost ([::1]:39335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7shT-0006oj-GK for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 18:36:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7sgp-0006nD-OJ for help-gnu-emacs@gnu.org; Fri, 18 Nov 2016 18:35:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7sgm-0004VP-L1 for help-gnu-emacs@gnu.org; Fri, 18 Nov 2016 18:35:27 -0500 Original-Received: from mout.web.de ([212.227.17.12]:55444) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7sgm-0004VD-AM for help-gnu-emacs@gnu.org; Fri, 18 Nov 2016 18:35:24 -0500 Original-Received: from drachen.dragon ([90.186.0.30]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MKIzC-1c6EnO2RF8-001g7a; Sat, 19 Nov 2016 00:35:21 +0100 In-Reply-To: <87fumo67vi.fsf@mail.de> (Stefan Huchler's message of "Fri, 18 Nov 2016 18:00:17 +0100") X-Provags-ID: V03:K0:nsBAacCOeeUXNBgSI99DUI6BwsQt8ZSht0JeHLGO4kOA5FDNikh 3X/0o/u1siDBDfVCLKuEhRWD5Nx4V+5eLl+vwhgnkCbQpuSWd4aeyWWRWY+hJ3nZHY70cU3 LLz9+hhz1sgIztfmld0+MhwSMMyRgSdl/MWFHwjhlCcE7Jj+ZFIZ4y3VfVO0oGk2c3OUmsD GD1LBvgC0AJPN8G6DCaHw== X-UI-Out-Filterresults: notjunk:1;V01:K0:UZrPE1bqDms=:/BesKuILh+0NHPQ8p9lzSc Ut37Frg/Yl4cNOaMq4VYjFoqF3PyOMx+YX8vW5/R4Xha4wNLIhfDAGBydvUy6s03zhLNfVYSI A1NL6OZ+rvVnGXn+3V7OpF8aPbzpw78fQRTRMGQZLPamP2TxERMw3gRYUOE7BT/35rgMJ43/C I6Pl+EodBLeGC97gLWgGegEMiJbBypNwp200b4256IVqP87qb68gsCqBP80yzXPfxj+ZcmkOk IkmiPspFxeATzFQjWV5QpPhASvnqQubdiqVIjstKGPxLKm6ypm5GoYavs9YNP0NBxToEKlbdM wfGNVWNIyz7CIMdhE7L0w686D7QxZH2cL4xjZ+8PQbmOCm7FX4PUdGPsp3wYvO7UUjzne65B8 7us2OEoBfIZl6IwVC35UIwwPCRNOKshi9P3s3Ryw2E3K1FevbvtbiG6ckI1+Zz0XY640mnblr nsYVJdaMGNwOtOxLAKLoOr4g/khTAXXRR96ytOhVwmAYQvZxkVQMAOPxIORfOFqb4reT/9BmZ fgZHZpuqBqm+5EQjyiZk47JGnuk8Wz1ek8ocNailKw0IdSS9CrnPjgSltZmFdKZoiI/cV6pqf ws98/THeyTKHUQtrvKty1pdAXDeFGw1DyCubMRmUJI4wNW9xQHy28tI54KHW4+rgdr3bkJMLK q+pH6I5ZcGERggTYkb11G/+1+hJaw7bcyXAIyLiZgNk6Pym/GRhIhsIqO/1RynpNSKElgZh1J YPKEzH7yd5yZ3KedaIASIsOD459OpSqof8ZfdW/plD+8FD4nnLvYZBVTAqoPXQIVEQuZLlmG X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111746 Archived-At: Stefan Huchler writes: > Or did you refer here to something different you saw? bytecompiling > only throw warnings about this params variables. And thats only > warnings... But the warnings are there for a reason, and the reason is that the code can potentially error when being run. In general, the warnings mean that you do something you definitely should not do. Let's fix these warnings, and then I can have a look at the code again if you want. Also try to follow the essence of functional programming: reduce side effects of functions to a minimum. When a function has side effects, make it clear (e.g. in the doc or the name of the function). If you really need to set any global variable, declare that variable with `defvar' and prefix its name with the prefix of your library. In general, the way functions transfer information in Lisp is by the return value, not by setting variables. For avoiding some bad habits it's very helpful to use lexical-binding - you can enable it with a specification in the file's first line. Maybe consider reading a good book about lisp (since learning by doing is not a good approach in Lisp). Maybe "Land of Lisp" (haven't read it, but it has a good title song) or "On Lisp" by Graham (a classical, but harder to read; reading some of the first chapters might be a good idea anyway). Regards, Michael.