emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Understanding kill-ring-save


From: Kaushal
Subject: Understanding kill-ring-save
Date: Fri, 21 Aug 2015 17:09:49 +0000

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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]