* buff-menu.el (Buffer-menu-switch-other-window)
(Buffer-menu-2-window): Use buffer display specifiers.
+ * cus-edit.el (top-level): Remove autoloaded add-hook for
+ same-window-regexps.
+ (customize-group, customize-face): New optional argument
+ OTHER-WINDOW. Use buffer display specifiers. Call
+ custom-buffer-create with OTHER-WINDOW argument t.
+ (customize-group-other-window): Call customize-group with
+ OTHER-WINDOW argument t.
+ (customize-face-other-window): Call customize-face with
+ OTHER-WINDOW argument t.
+ (custom-buffer-create): New optional argument OTHER-WINDOW.
+ (custom-buffer-create-other-window): Call
+ pop-to-buffer-other-window.
+ (customize-browse): Call pop-to-buffer-same-window.
+
+ * play/decipher.el (decipher-display-range): Use
+ pop-to-buffer-other-window.
+ (decipher-display-stats-buffer): Use
+ display-buffer-other-window.
+
+ * vc/ediff-util.el (ediff-clone-buffer-for-region-comparison):
+ Use pop-to-buffer-other-window.
+
+ * ehelp.el (with-electric-help): Use pop-to-buffer-other-window.
+
2010-11-02 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-names): Describe `not-this-window' and
(const :tag "none" nil))
:group 'custom-menu)
-;;;###autoload (add-hook 'same-window-regexps (purecopy "\\`\\*Customiz.*\\*\\'"))
-
(defun custom-sort-items (items sort-alphabetically order-groups)
"Return a sorted copy of ITEMS.
ITEMS should be a `custom-group' property.
t)))
;;;###autoload
-(defun customize-group (&optional group)
- "Customize GROUP, which must be a customization group."
+(defun customize-group (&optional group other-window)
+ "Customize GROUP, which must be a customization group.
+OTHER-WINDOW non-nil means do this in another window."
(interactive (list (customize-read-group)))
(when (stringp group)
(if (string-equal "" group)
(let ((name (format "*Customize Group: %s*"
(custom-unlispify-tag-name group))))
(if (get-buffer name)
- (pop-to-buffer name)
+ (if other-window
+ (pop-to-buffer-other-window name)
+ (pop-to-buffer-same-window name))
(custom-buffer-create
(list (list group 'custom-group))
name
(concat " for group "
- (custom-unlispify-tag-name group))))))
+ (custom-unlispify-tag-name group))
+ other-window))))
;;;###autoload
(defun customize-group-other-window (&optional group)
"Customize GROUP, which must be a customization group, in another window."
(interactive (list (customize-read-group)))
- (let ((pop-up-windows t)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (customize-group group)))
+ (customize-group group t))
;;;###autoload
(defalias 'customize-variable 'customize-option)
(< minor1 minor2)))))
;;;###autoload
-(defun customize-face (&optional face)
+(defun customize-face (&optional face other-window)
"Customize FACE, which should be a face name or nil.
+OTHER-WINDOW non-nil means do this in another window.
+
If FACE is nil, customize all faces. If FACE is actually a
face-alias, customize the face it is aliased to.
(custom-sort-items
(mapcar (lambda (s) (list s 'custom-face)) face)
t nil)
- "*Customize Faces*")
+ "*Customize Faces*" other-window)
;; If FACE is actually an alias, customize the face it is aliased to.
(if (get face 'face-alias)
(setq face (get face 'face-alias)))
(custom-buffer-create
(list (list face 'custom-face))
(format "*Customize Face: %s*"
- (custom-unlispify-tag-name face)))))
+ (custom-unlispify-tag-name face))
+ nil other-window)))
;;;###autoload
(defun customize-face-other-window (&optional face)
Interactively, when point is on text which has a face specified,
suggest to customize that face, if it's customizable."
(interactive (list (read-face-name "Customize face" "all faces" t)))
- (let ((pop-up-windows t)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (customize-face face)))
+ (customize-face face t))
(defalias 'customize-customized 'customize-unsaved)
buf))))
;;;###autoload
-(defun custom-buffer-create (options &optional name description)
+(defun custom-buffer-create (options &optional name description other-window)
"Create a buffer containing OPTIONS.
Optional NAME is the name of the buffer.
OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
SYMBOL is a customization option, and WIDGET is a widget for editing
that option."
- (pop-to-buffer (custom-get-fresh-buffer (or name "*Customization*")))
+ (if other-window
+ (pop-to-buffer-other-window
+ (custom-get-fresh-buffer (or name "*Customization*")))
+ (pop-to-buffer-same-window
+ (custom-get-fresh-buffer (or name "*Customization*"))))
(custom-buffer-create-internal options description))
;;;###autoload
SYMBOL is a customization option, and WIDGET is a widget for editing
that option."
(unless name (setq name "*Customization*"))
- (let ((pop-up-windows t)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (pop-to-buffer (custom-get-fresh-buffer name))
- (custom-buffer-create-internal options description)))
+ (pop-to-buffer-other-window (custom-get-fresh-buffer name))
+ (custom-buffer-create-internal options description))
(defcustom custom-reset-button-menu nil
"If non-nil, only show a single reset button in customize buffers.
(unless group
(setq group 'emacs))
(let ((name "*Customize Browser*"))
- (pop-to-buffer (custom-get-fresh-buffer name)))
+ (pop-to-buffer-same-window (custom-get-fresh-buffer name)))
(Custom-mode)
(widget-insert (format "\
%s buttons; type RET or click mouse-1
statistics buffer visible and sizes the window to just fit the
displayed text, but leaves the current window selected."
(let ((stats-buffer (decipher-stats-buffer))
- (current-window (selected-window))
- (pop-up-windows t))
+ (current-window (selected-window)))
(or (eq (current-buffer) stats-buffer)
- (pop-to-buffer stats-buffer))
+ (pop-to-buffer-other-window stats-buffer))
(goto-char start)
(or (one-window-p t)
(enlarge-window (- (1+ (count-lines start end)) (window-height))))
(defun decipher-display-stats-buffer ()
"Make the statistics buffer visible, but do not select it."
- (let ((stats-buffer (decipher-stats-buffer))
- (current-window (selected-window)))
+ (let ((stats-buffer (decipher-stats-buffer)))
(or (eq (current-buffer) stats-buffer)
- (progn
- (pop-to-buffer stats-buffer)
- (select-window current-window)))))
+ (display-buffer-other-window stats-buffer))))
(defun decipher-stats-buffer (&optional create)
"Return the buffer used for decipher statistics.