]> code.delx.au - gnu-emacs/blobdiff - lisp/man.el
(comint-postoutput-scroll-to-bottom): Cope with unset
[gnu-emacs] / lisp / man.el
index 2c8acac2c8290a57b89a7338fc6aa2f5857dabf6..47475d28b2d00d09b8e6b57f891d49274c3e3bf7 100644 (file)
@@ -583,6 +583,9 @@ If a buffer already exists for this man page, it will display immediately."
        (setq Man-original-frame (selected-frame))
        (setq Man-arguments man-args))
       (let ((process-environment (copy-sequence process-environment))
+           ;; The following is so Awk script gets \n intact
+           ;; But don't prevent decoding of the outside.
+           (coding-system-for-write 'raw-text-unix)
            ;; Avoid possible error by using a directory that always exists.
            (default-directory "/"))
        ;; Prevent any attempt to use display terminal fanciness.
@@ -619,8 +622,9 @@ See the variable `Man-notify-method' for the different notification behaviors."
       ;; can't rely on the editor command loop to reselect the
       ;; selected window's buffer.
       (save-excursion
-       (set-buffer man-buffer)
-       (make-frame Man-frame-parameters)))
+       (let ((frame (make-frame Man-frame-parameters)))
+         (set-window-buffer (frame-selected-window frame) man-buffer)
+          (set-window-dedicated-p (frame-selected-window frame) t))))
      ((eq Man-notify-method 'pushy)
       (switch-to-buffer man-buffer))
      ((eq Man-notify-method 'bully)
@@ -1063,26 +1067,12 @@ Specify which reference to use; default is based on word at point."
 (defun Man-kill ()
   "Kill the buffer containing the manpage."
   (interactive)
-  (let ((buff (current-buffer)))
-    (delete-windows-on buff)
-    (kill-buffer buff))
-  (if (and window-system
-          (or (eq Man-notify-method 'newframe)
-              (and pop-up-frames
-                   (eq Man-notify-method 'bully))))
-      (delete-frame)))
+  (quit-window t))
 
 (defun Man-quit ()
   "Bury the buffer containing the manpage."
   (interactive)
-  (let ((buff (current-buffer)))
-    (delete-windows-on buff)
-    (bury-buffer buff))
-  (if (and window-system
-          (or (eq Man-notify-method 'newframe)
-              (and pop-up-frames
-                   (eq Man-notify-method 'bully))))
-      (delete-frame)))
+  (quit-window))
 
 (defun Man-goto-page (page)
   "Go to the manual page on page PAGE."