comparison lisp/ehelp.el @ 14781:b4879ed5b5c3

(with-electric-help): Make buffer read-only as last thing.
author Richard M. Stallman <rms@gnu.org>
date Thu, 07 Mar 1996 18:15:59 +0000
parents 799da4d5aeb7
children 2c44547d2364
comparison
equal deleted inserted replaced
14780:1d10e4a2fb51 14781:b4879ed5b5c3
132 (save-excursion 132 (save-excursion
133 (set-buffer buffer) 133 (set-buffer buffer)
134 (if (and minheight (< (window-height) minheight)) 134 (if (and minheight (< (window-height) minheight))
135 (enlarge-window (- minheight (window-height)))) 135 (enlarge-window (- minheight (window-height))))
136 (electric-help-mode) 136 (electric-help-mode)
137 (setq buffer-read-only nil)
137 (or noerase 138 (or noerase
138 (let ((inhibit-read-only t)) 139 (erase-buffer)))
139 (erase-buffer))))
140 (let ((standard-output buffer)) 140 (let ((standard-output buffer))
141 (if (not (funcall thunk)) 141 (if (not (funcall thunk))
142 (progn 142 (progn
143 (set-buffer buffer) 143 (set-buffer buffer)
144 (set-buffer-modified-p nil) 144 (set-buffer-modified-p nil)
145 (goto-char (point-min)) 145 (goto-char (point-min))
146 (if one (shrink-window-if-larger-than-buffer (selected-window)))))) 146 (if one (shrink-window-if-larger-than-buffer (selected-window))))))
147 (set-buffer buffer) 147 (set-buffer buffer)
148 (run-hooks 'electric-help-mode-hook) 148 (run-hooks 'electric-help-mode-hook)
149 (setq buffer-read-only t)
149 (if (eq (car-safe (electric-help-command-loop)) 150 (if (eq (car-safe (electric-help-command-loop))
150 'retain) 151 'retain)
151 (setq config (current-window-configuration)) 152 (setq config (current-window-configuration))
152 (setq bury t))) 153 (setq bury t)))
153 (message "") 154 (message "")