From: Richard M. Stallman Date: Tue, 29 Mar 2005 20:54:04 +0000 (+0000) Subject: (copy-to-register, append-to-register, prepend-to-register): X-Git-Tag: ttn-vms-21-2-B4~1378 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=13191e3233268b1ff9d948e9caae347fca30a7bb;p=emacs.git (copy-to-register, append-to-register, prepend-to-register): Use filter-buffer-substring. --- diff --git a/lisp/register.el b/lisp/register.el index 253207c3140..eaa53446c56 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -277,7 +277,7 @@ Interactively, second arg is non-nil if prefix arg is supplied." Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. START and END are buffer positions indicating what to copy." (interactive "cCopy to register: \nr\nP") - (set-register register (buffer-substring start end)) + (set-register register (filter-buffer-substring start end)) (if delete-flag (delete-region start end))) (defun append-to-register (register start end &optional delete-flag) @@ -289,7 +289,7 @@ START and END are buffer positions indicating what to append." (or (stringp (get-register register)) (error "Register does not contain text")) (set-register register (concat (get-register register) - (buffer-substring start end))) + (filter-buffer-substring start end))) (if delete-flag (delete-region start end))) (defun prepend-to-register (register start end &optional delete-flag) @@ -300,7 +300,7 @@ START and END are buffer positions indicating what to prepend." (interactive "cPrepend to register: \nr\nP") (or (stringp (get-register register)) (error "Register does not contain text")) - (set-register register (concat (buffer-substring start end) + (set-register register (concat (filter-buffer-substring start end) (get-register register))) (if delete-flag (delete-region start end)))