Mercurial > emacs
changeset 68804:4ac434def21f
(ido-buffer-internal): Set mark for ido-insert-buffer.
Don't use insert-buffer; do insert-buffer-substring directly.
(ido-file-internal): Set mark for ido-insert-file. Use insert-file-1.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sat, 11 Feb 2006 20:30:49 +0000 |
parents | dfe0dd7deb35 |
children | 35f51c75918e |
files | lisp/ido.el |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ido.el Sat Feb 11 20:30:37 2006 +0000 +++ b/lisp/ido.el Sat Feb 11 20:30:49 2006 +0000 @@ -2022,9 +2022,10 @@ (if (eq method 'insert) (progn (ido-record-command 'insert-buffer buf) - (with-no-warnings - ;; we really want to run insert-buffer here - (insert-buffer buf))) + (push-mark + (save-excursion + (insert-buffer-substring (get-buffer buf)) + (point)))) (ido-visit-buffer buf method t))) ;; buffer doesn't exist @@ -2225,9 +2226,10 @@ (if ido-find-literal 'insert-file-literally 'insert-file) filename) (ido-record-work-directory) - (if ido-find-literal - (insert-file-contents-literally filename) - (insert-file-contents filename))) + (insert-file-1 filename + (if ido-find-literal + #'insert-file-contents-literally + #'insert-file-contents))) (filename (ido-record-work-file filename)