From: Kaushal <kaushal.modi@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Understanding kill-ring-save
Date: Fri, 21 Aug 2015 17:09:49 +0000 [thread overview]
Message-ID: <CAFyQvY2SzPoFJWH1xuYgd8jXSO6nGH9BP05digeq9z+Nk5LKvg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
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)
[-- Attachment #2: Type: text/html, Size: 1047 bytes --]
next reply other threads:[~2015-08-21 17:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 17:09 Kaushal [this message]
2015-08-21 17:20 ` Understanding kill-ring-save Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFyQvY2SzPoFJWH1xuYgd8jXSO6nGH9BP05digeq9z+Nk5LKvg@mail.gmail.com \
--to=kaushal.modi@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).