]> git.eshelyaron.com Git - emacs.git/commitdiff
Use pop-to-buffer-same-window in woman.el
authorAri Roponen <ari.roponen@gmail.com>
Sat, 20 Feb 2016 07:57:44 +0000 (18:57 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 20 Feb 2016 07:58:44 +0000 (18:58 +1100)
* 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

index 28a47986c2f5ac25350c1cfbdd607a7920934423..a4a0da209cb0a61bcbea37cf680d08d946769935 100644 (file)
@@ -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))