From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Newsgroups: gmane.emacs.devel Subject: Understanding kill-ring-save Date: Fri, 21 Aug 2015 17:09:49 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013a14ea7e9eef051dd556e6 X-Trace: ger.gmane.org 1440177014 19035 80.91.229.3 (21 Aug 2015 17:10:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2015 17:10:14 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 21 19:10:08 2015 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 1ZSppP-0007bK-5g for ged-emacs-devel@m.gmane.org; Fri, 21 Aug 2015 19:10:07 +0200 Original-Received: from localhost ([::1]:42914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSppO-0004s6-CA for ged-emacs-devel@m.gmane.org; Fri, 21 Aug 2015 13:10:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSppK-0004rS-5l for emacs-devel@gnu.org; Fri, 21 Aug 2015 13:10:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSppJ-0000Yp-9j for emacs-devel@gnu.org; Fri, 21 Aug 2015 13:10:02 -0400 Original-Received: from mail-ob0-x22c.google.com ([2607:f8b0:4003:c01::22c]:36225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSppJ-0000YS-20 for emacs-devel@gnu.org; Fri, 21 Aug 2015 13:10:01 -0400 Original-Received: by obkg7 with SMTP id g7so63857537obk.3 for ; Fri, 21 Aug 2015 10:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=9IHjbUxuDubiZInLFNhnM1p/k4JFyuQJ1f967rGGJEQ=; b=Pu6es1ZtT+ysknBs2diWOMYHVM+jELkUtOA23JkwJGHQqW1PhBPa7RZpUNSgN17BDn dwhZ8jud68wsrfQCTnIc9z1NX7xYfHkgDMcimSQsw2l62T2Ejcw92tpPeOgkDbGWN6WR RMW1ZDB72et7Udex9aVI777SFYS5viAx2P+KKUy21FodEUOCCcCuyUOKRp7pCkbSGIWp EWWb45LW6kJkgA9vw3IzNSf+V5puHuIi7/cOUbKAhxZ9iRBSf/RdBXunkKhor9CEGTgD W7oo4Sk2fPnqgEgEXEyuaBYFeEKs8sOq/n2JwG9G84kHRxmqBQyxkef7/ckW+Q/qwDmY hBHw== X-Received: by 10.60.36.202 with SMTP id s10mr9043868oej.0.1440176999929; Fri, 21 Aug 2015 10:09:59 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22c 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:189051 Archived-At: --089e013a14ea7e9eef051dd556e6 Content-Type: text/plain; charset=UTF-8 Hi all, I was trying to understand the basic function `kill-ring-save` and came up with this question on emacs.SE: http://emacs.stackexchange.com/q/14937/115 I will reiterate the question(s) that arose over here: - kill-ring-save has an optional argument REGION - That arg is set internally as (prefix-numeric-value current-prefix-arg) - So whether or not I use C-u, REGION will be a non-nil value, either 1 (if I simply do M-w) or 4 (if I do C-u M-w). Questions: - Under what circumstances will the REGION value stay nil? - When can `prefix-numeric-value` function return nil? Or can it? If the answers to the above 2 questions are never, never and no, why do we have the REGION argument? Or can that be set only in elisp? Example: (kill-ring-save (region-beginning) (region-end) nil) --089e013a14ea7e9eef051dd556e6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I was trying to understand the = basic function `kill-ring-save` and came up with this question on emacs.SE:= =C2=A0http://emacs.s= tackexchange.com/q/14937/115

I will reiterate = the question(s) that arose over here:

- kill-ring-= save has an optional argument REGION
- That arg is set internally= as=C2=A0(prefix-numeric-value current-prefix-arg)
- So whether o= r not I use C-u, REGION will be a non-nil value, either 1 (if I simply do M= -w) or 4 (if I do C-u M-w).

Questions:
<= br>
- Under what circumstances will the REGION value stay nil?
- When can `prefix-numeric-value` function return nil? Or can it?

If the answers to the above 2 questions are never, = never and no, why do we have the REGION argument? Or can that be set only i= n elisp? Example: (kill-ring-save (region-beginning) (region-end) nil)
--089e013a14ea7e9eef051dd556e6--