From 24c1c1d5c3bc14cccdeb41f5de39a8d11993c566 Mon Sep 17 00:00:00 2001 From: Ari Roponen Date: Sat, 20 Feb 2016 18:57:44 +1100 Subject: [PATCH] Use pop-to-buffer-same-window in woman.el * lisp/woman.el (woman-really-find-file): Work around going to the wrong buffer by using `pop-to-buffer-same-window' (bug#22332). (WoMan-find-buffer): Ditto. --- lisp/woman.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/woman.el b/lisp/woman.el index 28a47986c2f..a4a0da209cb 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1654,7 +1654,7 @@ Do not call directly!" (setq woman-frame (make-frame))))) (set-buffer (get-buffer-create bufname)) (condition-case nil - (display-buffer (current-buffer)) + (pop-to-buffer-same-window (current-buffer)) (error (pop-to-buffer (current-buffer)))) (buffer-disable-undo) (setq buffer-read-only nil) @@ -2064,14 +2064,14 @@ alist in `woman-buffer-alist' and return nil." (if (zerop woman-buffer-number) (let ((buffer (get-buffer (cdr (car woman-buffer-alist))))) (if buffer - (display-buffer buffer) + (pop-to-buffer-same-window buffer) ;; Delete alist element: (setq woman-buffer-alist (cdr woman-buffer-alist)) nil)) (let* ((prev-ptr (nthcdr (1- woman-buffer-number) woman-buffer-alist)) (buffer (get-buffer (cdr (car (cdr prev-ptr)))))) (if buffer - (display-buffer buffer) + (pop-to-buffer-same-window buffer) ;; Delete alist element: (setcdr prev-ptr (cdr (cdr prev-ptr))) (if (>= woman-buffer-number (length woman-buffer-alist)) -- 2.39.5