diff options
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/files.el | 45 |
2 files changed, 38 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 45ce93ecde1..4646adc3627 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,12 +1,19 @@ | |||
| 1 | 2008-11-22 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * files.el (switch-to-buffer-other-window) | ||
| 4 | (switch-to-buffer-other-frame): Rename buffer argument to | ||
| 5 | buffer-or-name. Reword and mention new option | ||
| 6 | confirm-nonexistent-file-or-buffer in doc-string. | ||
| 7 | |||
| 1 | 2008-11-22 Michael Kifer <kifer@cs.stonybrook.edu> | 8 | 2008-11-22 Michael Kifer <kifer@cs.stonybrook.edu> |
| 2 | 9 | ||
| 3 | * viper.el: date change. | 10 | * viper.el: date change. |
| 4 | 11 | ||
| 5 | * viper-cmd.el (viper-envelop-ESC-key): | 12 | * viper-cmd.el (viper-envelop-ESC-key): |
| 6 | viper-translate-all-ESC-keysequences is now a function. | 13 | viper-translate-all-ESC-keysequences is now a function. |
| 7 | 14 | ||
| 8 | * viper-init (viper-translate-all-ESC-keysequences): make this variable | 15 | * viper-init (viper-translate-all-ESC-keysequences): make this variable |
| 9 | 16 | ||
| 10 | 2008-11-22 Stefan Monnier <monnier@iro.umontreal.ca> | 17 | 2008-11-22 Stefan Monnier <monnier@iro.umontreal.ca> |
| 11 | 18 | ||
| 12 | * vc-hooks.el (vc-follow-link, vc-find-file-hook): | 19 | * vc-hooks.el (vc-follow-link, vc-find-file-hook): |
diff --git a/lisp/files.el b/lisp/files.el index 68f41115f05..f501e14b5f2 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1120,40 +1120,49 @@ and default values." | |||
| 1120 | (read-buffer prompt (other-buffer (current-buffer)) | 1120 | (read-buffer prompt (other-buffer (current-buffer)) |
| 1121 | (if confirm-nonexistent-file-or-buffer 'confirm-only))))) | 1121 | (if confirm-nonexistent-file-or-buffer 'confirm-only))))) |
| 1122 | 1122 | ||
| 1123 | (defun switch-to-buffer-other-window (buffer &optional norecord) | 1123 | (defun switch-to-buffer-other-window (buffer-or-name &optional norecord) |
| 1124 | "Select buffer BUFFER in another window. | 1124 | "Select the buffer specified by BUFFER-OR-NAME in another window. |
| 1125 | If BUFFER does not identify an existing buffer, then this function | 1125 | BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or |
| 1126 | creates a buffer with that name. | 1126 | nil. Return the buffer switched to. |
| 1127 | 1127 | ||
| 1128 | When called from Lisp, BUFFER can be a buffer, a string \(a buffer name), | 1128 | If BUFFER-OR-NAME is a string and does not identify an existing |
| 1129 | or nil. If BUFFER is nil, then this function chooses a buffer | 1129 | buffer, create a new buffer with that name. Interactively, if |
| 1130 | using `other-buffer'. | 1130 | `confirm-nonexistent-file-or-buffer' is non-nil, request |
| 1131 | Optional second arg NORECORD non-nil means do not put this | 1131 | confirmation before creating a new buffer. If BUFFER-OR-NAME is |
| 1132 | nil, switch to buffer returned by `other-buffer'. | ||
| 1133 | |||
| 1134 | Optional second argument NORECORD non-nil means do not put this | ||
| 1132 | buffer at the front of the list of recently selected ones. | 1135 | buffer at the front of the list of recently selected ones. |
| 1133 | This function returns the buffer it switched to. | ||
| 1134 | 1136 | ||
| 1135 | This uses the function `display-buffer' as a subroutine; see its | 1137 | This uses the function `display-buffer' as a subroutine; see its |
| 1136 | documentation for additional customization information." | 1138 | documentation for additional customization information." |
| 1137 | (interactive | 1139 | (interactive |
| 1138 | (list (read-buffer-to-switch "Switch to buffer in other window: "))) | 1140 | (list (read-buffer-to-switch "Switch to buffer in other window: "))) |
| 1139 | (let ((pop-up-windows t) | 1141 | (let ((pop-up-windows t) |
| 1140 | ;; Don't let these interfere. | ||
| 1141 | same-window-buffer-names same-window-regexps) | 1142 | same-window-buffer-names same-window-regexps) |
| 1142 | (pop-to-buffer buffer t norecord))) | 1143 | (pop-to-buffer buffer-or-name t norecord))) |
| 1144 | |||
| 1145 | (defun switch-to-buffer-other-frame (buffer-or-name &optional norecord) | ||
| 1146 | "Switch to buffer BUFFER-OR-NAME in another frame. | ||
| 1147 | BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or | ||
| 1148 | nil. Return the buffer switched to. | ||
| 1149 | |||
| 1150 | If BUFFER-OR-NAME is a string and does not identify an existing | ||
| 1151 | buffer, create a new buffer with that name. Interactively, if | ||
| 1152 | `confirm-nonexistent-file-or-buffer' is non-nil, request | ||
| 1153 | confirmation before creating a new buffer. If BUFFER-OR-NAME is | ||
| 1154 | nil, switch to buffer returned by `other-buffer'. | ||
| 1143 | 1155 | ||
| 1144 | (defun switch-to-buffer-other-frame (buffer &optional norecord) | ||
| 1145 | "Switch to buffer BUFFER in another frame. | ||
| 1146 | Optional second arg NORECORD non-nil means do not put this | 1156 | Optional second arg NORECORD non-nil means do not put this |
| 1147 | buffer at the front of the list of recently selected ones. | 1157 | buffer at the front of the list of recently selected ones. |
| 1148 | This function returns the buffer it switched to. | ||
| 1149 | 1158 | ||
| 1150 | This uses the function `display-buffer' as a subroutine; see | 1159 | This uses the function `display-buffer' as a subroutine; see its |
| 1151 | its documentation for additional customization information." | 1160 | documentation for additional customization information." |
| 1152 | (interactive | 1161 | (interactive |
| 1153 | (list (read-buffer-to-switch "Switch to buffer in other frame: "))) | 1162 | (list (read-buffer-to-switch "Switch to buffer in other frame: "))) |
| 1154 | (let ((pop-up-frames t) | 1163 | (let ((pop-up-frames t) |
| 1155 | same-window-buffer-names same-window-regexps) | 1164 | same-window-buffer-names same-window-regexps) |
| 1156 | (pop-to-buffer buffer t norecord))) | 1165 | (pop-to-buffer buffer-or-name t norecord))) |
| 1157 | 1166 | ||
| 1158 | (defun display-buffer-other-frame (buffer) | 1167 | (defun display-buffer-other-frame (buffer) |
| 1159 | "Display buffer BUFFER in another frame. | 1168 | "Display buffer BUFFER in another frame. |