From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: EWMH package, please review. Date: 13 Oct 2003 09:54:41 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <0864E46B-FD36-11D7-8B0B-00039363E640@swipnet.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066032066 21721 80.91.224.253 (13 Oct 2003 08:01:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Oct 2003 08:01:06 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Oct 13 10:01:03 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8xdX-0001nQ-00 for ; Mon, 13 Oct 2003 10:01:03 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8xdX-00054Y-00 for ; Mon, 13 Oct 2003 10:01:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8xa9-0005DQ-DS for emacs-devel@quimby.gnus.org; Mon, 13 Oct 2003 03:57:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A8xYJ-0004gv-Gp for emacs-devel@gnu.org; Mon, 13 Oct 2003 03:55:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A8xXm-0004XS-6M for emacs-devel@gnu.org; Mon, 13 Oct 2003 03:55:37 -0400 Original-Received: from [62.226.11.236] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1A8xXl-0004WV-5o for emacs-devel@gnu.org; Mon, 13 Oct 2003 03:55:05 -0400 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h9D7skDB012157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Oct 2003 09:54:51 +0200 Original-Received: (from dak@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h9D7sfEq012153; Mon, 13 Oct 2003 09:54:41 +0200 Original-To: "Jan D." In-Reply-To: <0864E46B-FD36-11D7-8B0B-00039363E640@swipnet.se> Original-Lines: 22 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17058 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17058 "Jan D." writes: > >> ;;; Code: > >> > >> (defun x-ewmh-send (arg hint frame &optional hint2) > >> "Send a client message to change an extended window manager hint. > >> > >> (let* ((eff-arg (if (null arg) 0 (prefix-numeric-value arg))) > > > > This is simpler: > > > > (setq arg (if (null arg) 0 (prefix-numeric-value arg))) > > (let ((action ...use ARG instead of EFF-ARG...)) > > I was told to avoid setq when I learned lisp :-). And using setq on variables not supposed to be global and not having a local binding either is quite a bad practice. In this case, however, arg already _has_ a local binding from the defun. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum