Mercurial > emacs
comparison lisp/ehelp.el @ 49588:37645a051842
Trailing whitespace deleted.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 04 Feb 2003 11:26:42 +0000 |
parents | ca2938d86ae9 |
children | 96f6726bae4d d7ddb3e565de |
comparison
equal
deleted
inserted
replaced
49587:e82b3fe06d4c | 49588:37645a051842 |
---|---|
179 ;; afterwards. It's also not clear that `help-mode' is always | 179 ;; afterwards. It's also not clear that `help-mode' is always |
180 ;; the right thing, maybe we should add an optional parameter. | 180 ;; the right thing, maybe we should add an optional parameter. |
181 (condition-case () | 181 (condition-case () |
182 (funcall (or default-major-mode 'fundamental-mode)) | 182 (funcall (or default-major-mode 'fundamental-mode)) |
183 (error nil)) | 183 (error nil)) |
184 | 184 |
185 (set-window-configuration config) | 185 (set-window-configuration config) |
186 (when bury | 186 (when bury |
187 ;;>> Perhaps this shouldn't be done, | 187 ;;>> Perhaps this shouldn't be done, |
188 ;; so that when we say "Press space to bury" we mean it | 188 ;; so that when we say "Press space to bury" we mean it |
189 (replace-buffer-in-windows buffer) | 189 (replace-buffer-in-windows buffer) |
209 (eq (key-binding "r") | 209 (eq (key-binding "r") |
210 'electric-help-retain)))) | 210 'electric-help-retain)))) |
211 (Electric-command-loop | 211 (Electric-command-loop |
212 'exit | 212 'exit |
213 (function (lambda () | 213 (function (lambda () |
214 (sit-for 0) ;necessary if last command was end-of-buffer or | 214 (sit-for 0) ;necessary if last command was end-of-buffer or |
215 ;beginning-of-buffer - otherwise pos-visible-in-window-p | 215 ;beginning-of-buffer - otherwise pos-visible-in-window-p |
216 ;will yield a wrong result. | 216 ;will yield a wrong result. |
217 (let ((min (pos-visible-in-window-p (point-min))) | 217 (let ((min (pos-visible-in-window-p (point-min))) |
218 (max (pos-visible-in-window-p (point-max)))) | 218 (max (pos-visible-in-window-p (point-max)))) |
219 (cond (isearch-mode 'noprompt) | 219 (cond (isearch-mode 'noprompt) |
220 ((and min max) | 220 ((and min max) |
341 (set-buffer-modified-p m)))))) | 341 (set-buffer-modified-p m)))))) |
342 (with-electric-help 'ignore name t)))) | 342 (with-electric-help 'ignore name t)))) |
343 | 343 |
344 | 344 |
345 | 345 |
346 ;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then | 346 ;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then |
347 ;; continues with execute-extended-command. | 347 ;; continues with execute-extended-command. |
348 (defun electric-help-execute-extended (prefixarg) | 348 (defun electric-help-execute-extended (prefixarg) |
349 (interactive "p") | 349 (interactive "p") |
350 (setq electric-help-form-to-execute '(execute-extended-command nil)) | 350 (setq electric-help-form-to-execute '(execute-extended-command nil)) |
351 (electric-help-retain)) | 351 (electric-help-retain)) |
405 ;;;; ehelp-map | 405 ;;;; ehelp-map |
406 | 406 |
407 (defvar ehelp-map ()) | 407 (defvar ehelp-map ()) |
408 (if ehelp-map | 408 (if ehelp-map |
409 nil | 409 nil |
410 (let ((map (copy-keymap help-map))) | 410 (let ((map (copy-keymap help-map))) |
411 (substitute-key-definition 'apropos 'electric-apropos map) | 411 (substitute-key-definition 'apropos 'electric-apropos map) |
412 (substitute-key-definition 'command-apropos 'electric-command-apropos map) | 412 (substitute-key-definition 'command-apropos 'electric-command-apropos map) |
413 (substitute-key-definition 'describe-key 'electric-describe-key map) | 413 (substitute-key-definition 'describe-key 'electric-describe-key map) |
414 (substitute-key-definition 'describe-mode 'electric-describe-mode map) | 414 (substitute-key-definition 'describe-mode 'electric-describe-mode map) |
415 (substitute-key-definition 'view-lossage 'electric-view-lossage map) | 415 (substitute-key-definition 'view-lossage 'electric-view-lossage map) |
419 (substitute-key-definition 'describe-syntax 'electric-describe-syntax map) | 419 (substitute-key-definition 'describe-syntax 'electric-describe-syntax map) |
420 | 420 |
421 (setq ehelp-map map) | 421 (setq ehelp-map map) |
422 (fset 'ehelp-command map))) | 422 (fset 'ehelp-command map))) |
423 | 423 |
424 (provide 'ehelp) | 424 (provide 'ehelp) |
425 | 425 |
426 ;;; ehelp.el ends here | 426 ;;; ehelp.el ends here |