[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A mess in kill-region?
From: |
Marcin Borkowski |
Subject: |
A mess in kill-region? |
Date: |
Mon, 19 Oct 2015 19:53:15 +0200 |
Hi there,
I don't have the time now to study this deeper, but if this something
non-obvious, I can try to dig into it (maybe in a few days).
Here's the problem. This is taken from `kill-region':
(if region
(funcall region-extract-function 'delete)
(filter-buffer-substring beg end 'delete))
But this is the definition of `region-extract-function':
(defvar region-extract-function
(lambda (delete)
(when (region-beginning)
(if (eq delete 'delete-only)
(delete-region (region-beginning) (region-end))
(filter-buffer-substring (region-beginning) (region-end) delete))))
"Function to get the region's content.
Called with one argument DELETE.
If DELETE is `delete-only', then only delete the region and the return value
is undefined. If DELETE is nil, just return the content as a string.
If anything else, delete the region and return its content as a string.")
So I guess that the argument of 'delete in `kill-region' is misleading
at least and maybe buggy.
And btw: what exactly is the meaning of the third argument to
`kill-region'? The "explanation" is the docstring looks like a joke to
me;-).
PS. GNU Emacs 25.0.50.1 (i686-pc-linux-gnu, GTK+ Version 3.10.8) of 2015-01-02
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- A mess in kill-region?,
Marcin Borkowski <=