summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-02-11 20:30:49 +0000
committerKim F. Storm <storm@cua.dk>2006-02-11 20:30:49 +0000
commit2d13e5880dc28c2036be0832c49d78a5ae1138e5 (patch)
tree2701b6bc8f52bff783c7099f26ca6b0d205de62b /lisp
parented0965431aa82b63558033ecff13ce36e9a34ce0 (diff)
downloademacs-2d13e5880dc28c2036be0832c49d78a5ae1138e5.tar.gz
emacs-2d13e5880dc28c2036be0832c49d78a5ae1138e5.tar.bz2
emacs-2d13e5880dc28c2036be0832c49d78a5ae1138e5.zip
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ido.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 9c1a3bbbaa6..77479de04d8 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -2022,9 +2022,10 @@ If INITIAL is non-nil, it specifies the initial input string."
(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 INITIAL is non-nil, it specifies the initial input string."
(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)