aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMartin Rudalics2008-11-22 11:42:00 +0000
committerMartin Rudalics2008-11-22 11:42:00 +0000
commit3ad96b4d0afa2e8bebd4a31fbf3b9a30fdf50226 (patch)
tree74b730227453ba634caf7fdefa90e21cde68c34c /lisp
parentee50ff07eb4e1d1e40268e13c0925f6814c0c0bc (diff)
downloademacs-3ad96b4d0afa2e8bebd4a31fbf3b9a30fdf50226.tar.gz
emacs-3ad96b4d0afa2e8bebd4a31fbf3b9a30fdf50226.zip
(switch-to-buffer-other-window, switch-to-buffer-other-frame):
Rename buffer argument to buffer-or-name. Reword and mention new option confirm-nonexistent-file-or-buffer in doc-string.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/files.el45
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 @@
12008-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
12008-11-22 Michael Kifer <kifer@cs.stonybrook.edu> 82008-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
102008-11-22 Stefan Monnier <monnier@iro.umontreal.ca> 172008-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.
1125If BUFFER does not identify an existing buffer, then this function 1125BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or
1126creates a buffer with that name. 1126nil. Return the buffer switched to.
1127 1127
1128When called from Lisp, BUFFER can be a buffer, a string \(a buffer name), 1128If BUFFER-OR-NAME is a string and does not identify an existing
1129or nil. If BUFFER is nil, then this function chooses a buffer 1129buffer, create a new buffer with that name. Interactively, if
1130using `other-buffer'. 1130`confirm-nonexistent-file-or-buffer' is non-nil, request
1131Optional second arg NORECORD non-nil means do not put this 1131confirmation before creating a new buffer. If BUFFER-OR-NAME is
1132nil, switch to buffer returned by `other-buffer'.
1133
1134Optional second argument NORECORD non-nil means do not put this
1132buffer at the front of the list of recently selected ones. 1135buffer at the front of the list of recently selected ones.
1133This function returns the buffer it switched to.
1134 1136
1135This uses the function `display-buffer' as a subroutine; see its 1137This uses the function `display-buffer' as a subroutine; see its
1136documentation for additional customization information." 1138documentation 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.
1147BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or
1148nil. Return the buffer switched to.
1149
1150If BUFFER-OR-NAME is a string and does not identify an existing
1151buffer, create a new buffer with that name. Interactively, if
1152`confirm-nonexistent-file-or-buffer' is non-nil, request
1153confirmation before creating a new buffer. If BUFFER-OR-NAME is
1154nil, 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.
1146Optional second arg NORECORD non-nil means do not put this 1156Optional second arg NORECORD non-nil means do not put this
1147buffer at the front of the list of recently selected ones. 1157buffer at the front of the list of recently selected ones.
1148This function returns the buffer it switched to.
1149 1158
1150This uses the function `display-buffer' as a subroutine; see 1159This uses the function `display-buffer' as a subroutine; see its
1151its documentation for additional customization information." 1160documentation 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.