Mercurial > emacs
comparison lisp/ido.el @ 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 | 3bd95f4f2941 |
children | e14bc51fc1eb d57ee9eab157 |
comparison
equal
deleted
inserted
replaced
68803:dfe0dd7deb35 | 68804:4ac434def21f |
---|---|
2020 ;; View buffer if it exists | 2020 ;; View buffer if it exists |
2021 ((get-buffer buf) | 2021 ((get-buffer buf) |
2022 (if (eq method 'insert) | 2022 (if (eq method 'insert) |
2023 (progn | 2023 (progn |
2024 (ido-record-command 'insert-buffer buf) | 2024 (ido-record-command 'insert-buffer buf) |
2025 (with-no-warnings | 2025 (push-mark |
2026 ;; we really want to run insert-buffer here | 2026 (save-excursion |
2027 (insert-buffer buf))) | 2027 (insert-buffer-substring (get-buffer buf)) |
2028 (point)))) | |
2028 (ido-visit-buffer buf method t))) | 2029 (ido-visit-buffer buf method t))) |
2029 | 2030 |
2030 ;; buffer doesn't exist | 2031 ;; buffer doesn't exist |
2031 ((eq ido-create-new-buffer 'never) | 2032 ((eq ido-create-new-buffer 'never) |
2032 (message "no buffer matching `%s'" buf)) | 2033 (message "no buffer matching `%s'" buf)) |
2223 (setq filename (concat ido-current-directory filename)) | 2224 (setq filename (concat ido-current-directory filename)) |
2224 (ido-record-command | 2225 (ido-record-command |
2225 (if ido-find-literal 'insert-file-literally 'insert-file) | 2226 (if ido-find-literal 'insert-file-literally 'insert-file) |
2226 filename) | 2227 filename) |
2227 (ido-record-work-directory) | 2228 (ido-record-work-directory) |
2228 (if ido-find-literal | 2229 (insert-file-1 filename |
2229 (insert-file-contents-literally filename) | 2230 (if ido-find-literal |
2230 (insert-file-contents filename))) | 2231 #'insert-file-contents-literally |
2232 #'insert-file-contents))) | |
2231 | 2233 |
2232 (filename | 2234 (filename |
2233 (ido-record-work-file filename) | 2235 (ido-record-work-file filename) |
2234 (setq filename (concat ido-current-directory filename)) | 2236 (setq filename (concat ido-current-directory filename)) |
2235 (ido-record-command 'find-file filename) | 2237 (ido-record-command 'find-file filename) |