Mercurial > emacs
comparison lisp/ido.el @ 90751:52a7f3f50b89
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 624-636)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 200-201)
- Merge from emacs--devo--0
- Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser.
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-171
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 13 Feb 2007 12:14:16 +0000 |
parents | 95d0cdf160ea 514805720b93 |
children | dd7c098af727 |
comparison
equal
deleted
inserted
replaced
90750:f8cc067aba62 | 90751:52a7f3f50b89 |
---|---|
2401 ;;; COMPLETION CODE | 2401 ;;; COMPLETION CODE |
2402 | 2402 |
2403 (defun ido-set-common-completion () | 2403 (defun ido-set-common-completion () |
2404 ;; Find common completion of `ido-text' in `ido-matches' | 2404 ;; Find common completion of `ido-text' in `ido-matches' |
2405 ;; The result is stored in `ido-common-match-string' | 2405 ;; The result is stored in `ido-common-match-string' |
2406 (let* (val) | 2406 (let (val) |
2407 (setq ido-common-match-string nil) | 2407 (setq ido-common-match-string nil) |
2408 (if (and ido-matches | 2408 (if (and ido-matches |
2409 (not ido-enable-regexp) ;; testing | 2409 (not ido-enable-regexp) ;; testing |
2410 (stringp ido-text) | 2410 (stringp ido-text) |
2411 (> (length ido-text) 0)) | 2411 (> (length ido-text) 0)) |
2412 (if (setq val (ido-find-common-substring ido-matches ido-text)) | 2412 (if (setq val (ido-find-common-substring ido-matches ido-text)) |
3937 | 3937 |
3938 ;;;###autoload | 3938 ;;;###autoload |
3939 (defun ido-switch-buffer-other-window () | 3939 (defun ido-switch-buffer-other-window () |
3940 "Switch to another buffer and show it in another window. | 3940 "Switch to another buffer and show it in another window. |
3941 The buffer name is selected interactively by typing a substring. | 3941 The buffer name is selected interactively by typing a substring. |
3942 For details of keybindings, do `\\[describe-function] ido'." | 3942 For details of keybindings, see `ido-switch-buffer'." |
3943 (interactive) | 3943 (interactive) |
3944 (ido-buffer-internal 'other-window 'switch-to-buffer-other-window)) | 3944 (ido-buffer-internal 'other-window 'switch-to-buffer-other-window)) |
3945 | 3945 |
3946 ;;;###autoload | 3946 ;;;###autoload |
3947 (defun ido-display-buffer () | 3947 (defun ido-display-buffer () |
3948 "Display a buffer in another window but don't select it. | 3948 "Display a buffer in another window but don't select it. |
3949 The buffer name is selected interactively by typing a substring. | 3949 The buffer name is selected interactively by typing a substring. |
3950 For details of keybindings, do `\\[describe-function] ido'." | 3950 For details of keybindings, see `ido-switch-buffer'." |
3951 (interactive) | 3951 (interactive) |
3952 (ido-buffer-internal 'display 'display-buffer nil nil nil 'ignore)) | 3952 (ido-buffer-internal 'display 'display-buffer nil nil nil 'ignore)) |
3953 | 3953 |
3954 ;;;###autoload | 3954 ;;;###autoload |
3955 (defun ido-kill-buffer () | 3955 (defun ido-kill-buffer () |
3956 "Kill a buffer. | 3956 "Kill a buffer. |
3957 The buffer name is selected interactively by typing a substring. | 3957 The buffer name is selected interactively by typing a substring. |
3958 For details of keybindings, do `\\[describe-function] ido'." | 3958 For details of keybindings, see `ido-switch-buffer'." |
3959 (interactive) | 3959 (interactive) |
3960 (ido-buffer-internal 'kill 'kill-buffer "Kill buffer: " (buffer-name (current-buffer)) nil 'ignore)) | 3960 (ido-buffer-internal 'kill 'kill-buffer "Kill buffer: " (buffer-name (current-buffer)) nil 'ignore)) |
3961 | 3961 |
3962 ;;;###autoload | 3962 ;;;###autoload |
3963 (defun ido-insert-buffer () | 3963 (defun ido-insert-buffer () |
3964 "Insert contents of a buffer in current buffer after point. | 3964 "Insert contents of a buffer in current buffer after point. |
3965 The buffer name is selected interactively by typing a substring. | 3965 The buffer name is selected interactively by typing a substring. |
3966 For details of keybindings, do `\\[describe-function] ido'." | 3966 For details of keybindings, see `ido-switch-buffer'." |
3967 (interactive) | 3967 (interactive) |
3968 (ido-buffer-internal 'insert 'insert-buffer "Insert buffer: " nil nil 'ido-enter-insert-file)) | 3968 (ido-buffer-internal 'insert 'insert-buffer "Insert buffer: " nil nil 'ido-enter-insert-file)) |
3969 | 3969 |
3970 ;;;###autoload | 3970 ;;;###autoload |
3971 (defun ido-switch-buffer-other-frame () | 3971 (defun ido-switch-buffer-other-frame () |
3972 "Switch to another buffer and show it in another frame. | 3972 "Switch to another buffer and show it in another frame. |
3973 The buffer name is selected interactively by typing a substring. | 3973 The buffer name is selected interactively by typing a substring. |
3974 For details of keybindings, do `\\[describe-function] ido'." | 3974 For details of keybindings, see `ido-switch-buffer'." |
3975 (interactive) | 3975 (interactive) |
3976 (if ido-mode | 3976 (if ido-mode |
3977 (ido-buffer-internal 'other-frame) | 3977 (ido-buffer-internal 'other-frame) |
3978 (call-interactively 'switch-to-buffer-other-frame))) | 3978 (call-interactively 'switch-to-buffer-other-frame))) |
3979 | 3979 |
4032 | 4032 |
4033 ;;;###autoload | 4033 ;;;###autoload |
4034 (defun ido-find-file-other-window () | 4034 (defun ido-find-file-other-window () |
4035 "Switch to another file and show it in another window. | 4035 "Switch to another file and show it in another window. |
4036 The file name is selected interactively by typing a substring. | 4036 The file name is selected interactively by typing a substring. |
4037 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4037 For details of keybindings, see `ido-find-file'." |
4038 (interactive) | 4038 (interactive) |
4039 (ido-file-internal 'other-window 'find-file-other-window)) | 4039 (ido-file-internal 'other-window 'find-file-other-window)) |
4040 | 4040 |
4041 ;;;###autoload | 4041 ;;;###autoload |
4042 (defun ido-find-alternate-file () | 4042 (defun ido-find-alternate-file () |
4043 "Switch to another file and show it in another window. | 4043 "Switch to another file and show it in another window. |
4044 The file name is selected interactively by typing a substring. | 4044 The file name is selected interactively by typing a substring. |
4045 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4045 For details of keybindings, see `ido-find-file'." |
4046 (interactive) | 4046 (interactive) |
4047 (ido-file-internal 'alt-file 'find-alternate-file nil "Find alternate file: ")) | 4047 (ido-file-internal 'alt-file 'find-alternate-file nil "Find alternate file: ")) |
4048 | 4048 |
4049 ;;;###autoload | 4049 ;;;###autoload |
4050 (defun ido-find-file-read-only () | 4050 (defun ido-find-file-read-only () |
4051 "Edit file read-only with name obtained via minibuffer. | 4051 "Edit file read-only with name obtained via minibuffer. |
4052 The file name is selected interactively by typing a substring. | 4052 The file name is selected interactively by typing a substring. |
4053 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4053 For details of keybindings, see `ido-find-file'." |
4054 (interactive) | 4054 (interactive) |
4055 (ido-file-internal 'read-only 'find-file-read-only nil "Find file read-only: ")) | 4055 (ido-file-internal 'read-only 'find-file-read-only nil "Find file read-only: ")) |
4056 | 4056 |
4057 ;;;###autoload | 4057 ;;;###autoload |
4058 (defun ido-find-file-read-only-other-window () | 4058 (defun ido-find-file-read-only-other-window () |
4059 "Edit file read-only in other window with name obtained via minibuffer. | 4059 "Edit file read-only in other window with name obtained via minibuffer. |
4060 The file name is selected interactively by typing a substring. | 4060 The file name is selected interactively by typing a substring. |
4061 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4061 For details of keybindings, see `ido-find-file'." |
4062 (interactive) | 4062 (interactive) |
4063 (ido-file-internal 'read-only 'find-file-read-only-other-window nil "Find file read-only other window: ")) | 4063 (ido-file-internal 'read-only 'find-file-read-only-other-window nil "Find file read-only other window: ")) |
4064 | 4064 |
4065 ;;;###autoload | 4065 ;;;###autoload |
4066 (defun ido-find-file-read-only-other-frame () | 4066 (defun ido-find-file-read-only-other-frame () |
4067 "Edit file read-only in other frame with name obtained via minibuffer. | 4067 "Edit file read-only in other frame with name obtained via minibuffer. |
4068 The file name is selected interactively by typing a substring. | 4068 The file name is selected interactively by typing a substring. |
4069 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4069 For details of keybindings, see `ido-find-file'." |
4070 (interactive) | 4070 (interactive) |
4071 (ido-file-internal 'read-only 'find-file-read-only-other-frame nil "Find file read-only other frame: ")) | 4071 (ido-file-internal 'read-only 'find-file-read-only-other-frame nil "Find file read-only other frame: ")) |
4072 | 4072 |
4073 ;;;###autoload | 4073 ;;;###autoload |
4074 (defun ido-display-file () | 4074 (defun ido-display-file () |
4075 "Display a file in another window but don't select it. | 4075 "Display a file in another window but don't select it. |
4076 The file name is selected interactively by typing a substring. | 4076 The file name is selected interactively by typing a substring. |
4077 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4077 For details of keybindings, see `ido-find-file'." |
4078 (interactive) | 4078 (interactive) |
4079 (ido-file-internal 'display nil nil nil nil nil 'ignore)) | 4079 (ido-file-internal 'display nil nil nil nil nil 'ignore)) |
4080 | 4080 |
4081 ;;;###autoload | 4081 ;;;###autoload |
4082 (defun ido-find-file-other-frame () | 4082 (defun ido-find-file-other-frame () |
4083 "Switch to another file and show it in another frame. | 4083 "Switch to another file and show it in another frame. |
4084 The file name is selected interactively by typing a substring. | 4084 The file name is selected interactively by typing a substring. |
4085 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4085 For details of keybindings, see `ido-find-file'." |
4086 (interactive) | 4086 (interactive) |
4087 (ido-file-internal 'other-frame 'find-file-other-frame)) | 4087 (ido-file-internal 'other-frame 'find-file-other-frame)) |
4088 | 4088 |
4089 ;;;###autoload | 4089 ;;;###autoload |
4090 (defun ido-write-file () | 4090 (defun ido-write-file () |
4091 "Write current buffer to a file. | 4091 "Write current buffer to a file. |
4092 The file name is selected interactively by typing a substring. | 4092 The file name is selected interactively by typing a substring. |
4093 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4093 For details of keybindings, see `ido-find-file'." |
4094 (interactive) | 4094 (interactive) |
4095 (let ((ido-process-ignore-lists t) | 4095 (let ((ido-process-ignore-lists t) |
4096 (ido-work-directory-match-only nil) | 4096 (ido-work-directory-match-only nil) |
4097 (ido-ignore-files (cons "[^/]\\'" ido-ignore-files)) | 4097 (ido-ignore-files (cons "[^/]\\'" ido-ignore-files)) |
4098 (ido-report-no-match nil) | 4098 (ido-report-no-match nil) |
4102 | 4102 |
4103 ;;;###autoload | 4103 ;;;###autoload |
4104 (defun ido-insert-file () | 4104 (defun ido-insert-file () |
4105 "Insert contents of file in current buffer. | 4105 "Insert contents of file in current buffer. |
4106 The file name is selected interactively by typing a substring. | 4106 The file name is selected interactively by typing a substring. |
4107 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4107 For details of keybindings, see `ido-find-file'." |
4108 (interactive) | 4108 (interactive) |
4109 (ido-file-internal 'insert 'insert-file nil "Insert file: " nil nil 'ido-enter-insert-buffer)) | 4109 (ido-file-internal 'insert 'insert-file nil "Insert file: " nil nil 'ido-enter-insert-buffer)) |
4110 | 4110 |
4111 ;;;###autoload | 4111 ;;;###autoload |
4112 (defun ido-dired () | 4112 (defun ido-dired () |
4113 "Call `dired' the ido way. | 4113 "Call `dired' the ido way. |
4114 The directory is selected interactively by typing a substring. | 4114 The directory is selected interactively by typing a substring. |
4115 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4115 For details of keybindings, see `ido-find-file'." |
4116 (interactive) | 4116 (interactive) |
4117 (let ((ido-report-no-match nil) | 4117 (let ((ido-report-no-match nil) |
4118 (ido-auto-merge-work-directories-length -1)) | 4118 (ido-auto-merge-work-directories-length -1)) |
4119 (ido-file-internal 'dired 'dired nil "Dired: " 'dir))) | 4119 (ido-file-internal 'dired 'dired nil "Dired: " 'dir))) |
4120 | 4120 |
4121 (defun ido-list-directory () | 4121 (defun ido-list-directory () |
4122 "Call `list-directory' the ido way. | 4122 "Call `list-directory' the ido way. |
4123 The directory is selected interactively by typing a substring. | 4123 The directory is selected interactively by typing a substring. |
4124 For details of keybindings, do `\\[describe-function] ido-find-file'." | 4124 For details of keybindings, see `ido-find-file'." |
4125 (interactive) | 4125 (interactive) |
4126 (let ((ido-report-no-match nil) | 4126 (let ((ido-report-no-match nil) |
4127 (ido-auto-merge-work-directories-length -1)) | 4127 (ido-auto-merge-work-directories-length -1)) |
4128 (ido-file-internal 'list-directory 'list-directory nil "List directory: " 'dir))) | 4128 (ido-file-internal 'list-directory 'list-directory nil "List directory: " 'dir))) |
4129 | 4129 |