From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Emacs Lisp Question Date: Thu, 27 Jun 2013 15:25:38 +0200 Message-ID: <87hagjvg6l.fsf@gmail.com> References: <1372338690045-290340.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372339710 14864 80.91.229.3 (27 Jun 2013 13:28:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Jun 2013 13:28:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 15:28:29 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1UsCFN-0005pm-H4 for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 15:28:25 +0200 Original-Received: from localhost ([::1]:49850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCFN-0002P8-0m for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 09:28:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCCw-0006xy-7x for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 09:25:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsCCv-0000Nk-1o for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 09:25:54 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:37207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCCu-0000Nd-NR for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 09:25:52 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UsCCu-0003Uf-57 for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 15:25:52 +0200 Original-Received: from e178189009.adsl.alicedsl.de ([85.178.189.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 15:25:52 +0200 Original-Received: from tjolitz by e178189009.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 15:25:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178189009.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:vcdnCkPDZzvljC2ElIAY+rHd3HU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91769 Archived-At: drain writes: > (defun copy-region-as-kill (beg end) > "Save the region as if killed, but don't kill it. > In Transient Mark mode, deactivate the mark. > If `interprogram-cut-function' is non-nil, also save the text for a > window > system cut and paste." > (interactive "r") > (if (eq last-command 'kill-region) > (kill-append (filter-buffer-substring beg end) (< end beg)) > (kill-new (filter-buffer-substring beg end))) > (if transient-mark-mode > (setq deactivate-mark t)) > nil) > > What is the "nil" doing at the end here? The syntax seems to be: > > (defun copy-region-as-kill (beg end) [...] nil) I think the nil makes sure the function returns nil and not anything killed in the function body or so. Its seems to be a function called only for its side-effects, not for its return value. -- cheers, Thorsten