[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 26 Jul 2011 21:45:40 +0200
Mozilla/5.0 (X11; U; Linux i686; de; rv:126.96.36.199) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11
Am 26.07.2011 21:35, schrieb Teemu Likonen:
* 2011-07-26T21:24:03+02:00 * Andreas Röhler wrote:
Am 26.07.2011 21:19, schrieb Teemu Likonen:
Please tell us what you want. How should the command work? How do you
want to execute it and what should it do?
It's in the docstring: repeat last yank resp. to numerical arg. Also I
want in some cases have a newline added - ie insert yanks vertically.
Yes, but how do you want to execute those "some cases"? For example, you
could make the command ask:
(defun yank-repeat-newline (arg&optional nl)
"With numerical ARG, repeat last yank ARG times.
With optional arg NL, also insert newlines. "
(interactive (list (prefix-numeric-value current-prefix-arg)
(y-or-n-p "Add a newline? ")))
(dotimes (i arg)
(insert (car kill-ring))
(if nl (insert "\n"))))
Hi Teemu, hi Drew,
thanks a lot both.
Can still only one argument specify in example above.
Drew presented a solution indeed.
However, after all think Emacs could make a better use of these both
interactive codes by separating it. It's a kind of interference with "P"
"p" which makes things more complex then needed and doesn't contribute -
Will present the matter at emacs-devel.
RE: yank-repeat-newline, Drew Adams, 2011/07/26