diff -up ./man.el.emacs-27.2 ./man.el --- ./man.el.emacs-27.2 2021-11-10 23:42:07.068524389 +0000 +++ ./man.el 2021-11-10 23:42:52.858268643 +0000 @@ -1,6 +1,6 @@ ;;; man.el --- browse UNIX manual pages -*- lexical-binding: t -*- -;; Copyright (C) 1993-1994, 1996-1997, 2001-2021 Free Software +;; Copyright (C) 1993-1994, 1996-1997, 2001-2020 Free Software ;; Foundation, Inc. ;; Author: Barry A. Warsaw @@ -654,7 +654,7 @@ This is necessary if one wants to dump m (error "Malformed Man-filter-list")) phrase) pargs " "))) - (setq flist (cdr flist)))) + (setq flist (cdr flist)))) command)) @@ -1119,8 +1119,9 @@ Return the buffer in which the manpage w (concat " " (propertize (if Man-fontify-manpage-flag "[formatting...]" "[cleaning...]") - 'face 'mode-line-emphasis))) - (Man-start-calling + 'face 'mode-line-emphasis))) + (Man-start-calling + (progn (if (fboundp 'make-process) (let ((proc (start-process manual-program buffer @@ -1143,12 +1144,12 @@ Return the buffer in which the manpage w (setq msg (format "exited abnormally with code %d" exit-status))) - (setq msg exit-status)) - (if Man-fontify-manpage-flag - (Man-fontify-manpage) - (Man-cleanup-manpage)) - (Man-bgproc-sentinel bufname msg)))))) - buffer)) + (setq msg exit-status)) + (Man-bgproc-sentinel bufname msg)) + ) + ) + ) + buffer)))) (defun Man-update-manpage () "Reformat current manpage by calling the man command again synchronously." @@ -1413,10 +1414,11 @@ command is run. Second argument STRING (Man-previous-section 1) (point)) (point)) - (if Man-fontify-manpage-flag - (Man-fontify-manpage) - (Man-cleanup-manpage))) - (set-marker (process-mark process) (point-max))))))))) +;; (if Man-fontify-manpage-flag +;; (Man-fontify-manpage) +;; (Man-cleanup-manpage)) + ) + (set-marker (process-mark process) (point-max))))))))) (defun Man-bgproc-sentinel (process msg) "Manpage background process sentinel. @@ -1496,10 +1498,22 @@ manpage command." (setq message (format "Can't find the %s manpage" (Man-page-from-arguments args))))) - (if Man-fontify-manpage-flag - (setq message (format "%s man page formatted" - (Man-page-from-arguments Man-arguments))) - (setq message (format "%s man page cleaned up" + (if Man-fontify-manpage-flag + (progn + (let + ((buffer-read-only nil) + (inhibit-read-only t) + ) + (progn + (message "Calling Man-fontify-manpage") + (Man-fontify-manpage) + (Man-cleanup-manpage) + ) + ) + (setq message (format "%s man page formatted" + (Man-page-from-arguments Man-arguments))) + ) + (setq message (format "%s man page cleaned up" (Man-page-from-arguments Man-arguments)))) (unless (and (processp process) (not (eq (process-status process) 'exit))) @@ -1541,8 +1555,8 @@ The following man commands are available \\[man] Prompt to retrieve a new manpage. \\[Man-follow-manual-reference] Retrieve reference in SEE ALSO section. -\\[Man-next-manpage] Jump to next manpage in circular list. -\\[Man-previous-manpage] Jump to previous manpage in circular list. +\\[Man-next-manpage] Jump to next manpage in circular list. +\\[Man-previous-manpage] Jump to previous manpage in circular list. \\[Man-next-section] Jump to next manpage section. \\[Man-previous-section] Jump to previous manpage section. \\[Man-goto-section] Go to a manpage section.