181 |
(condition-case () |
(condition-case () |
182 |
(funcall (or default-major-mode 'fundamental-mode)) |
(funcall (or default-major-mode 'fundamental-mode)) |
183 |
(error nil)) |
(error nil)) |
184 |
|
|
185 |
(set-window-configuration config) |
(set-window-configuration config) |
186 |
(when bury |
(when bury |
187 |
;;>> Perhaps this shouldn't be done, |
;;>> Perhaps this shouldn't be done, |
211 |
(Electric-command-loop |
(Electric-command-loop |
212 |
'exit |
'exit |
213 |
(function (lambda () |
(function (lambda () |
214 |
(sit-for 0) ;necessary if last command was end-of-buffer or |
(sit-for 0) ;necessary if last command was end-of-buffer or |
215 |
;beginning-of-buffer - otherwise pos-visible-in-window-p |
;beginning-of-buffer - otherwise pos-visible-in-window-p |
216 |
;will yield a wrong result. |
;will yield a wrong result. |
217 |
(let ((min (pos-visible-in-window-p (point-min))) |
(let ((min (pos-visible-in-window-p (point-min))) |
218 |
(max (pos-visible-in-window-p (point-max)))) |
(max (pos-visible-in-window-p (point-max)))) |
343 |
|
|
344 |
|
|
345 |
|
|
346 |
;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then |
;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then |
347 |
;; continues with execute-extended-command. |
;; continues with execute-extended-command. |
348 |
(defun electric-help-execute-extended (prefixarg) |
(defun electric-help-execute-extended (prefixarg) |
349 |
(interactive "p") |
(interactive "p") |
407 |
(defvar ehelp-map ()) |
(defvar ehelp-map ()) |
408 |
(if ehelp-map |
(if ehelp-map |
409 |
nil |
nil |
410 |
(let ((map (copy-keymap help-map))) |
(let ((map (copy-keymap help-map))) |
411 |
(substitute-key-definition 'apropos 'electric-apropos map) |
(substitute-key-definition 'apropos 'electric-apropos map) |
412 |
(substitute-key-definition 'command-apropos 'electric-command-apropos map) |
(substitute-key-definition 'command-apropos 'electric-command-apropos map) |
413 |
(substitute-key-definition 'describe-key 'electric-describe-key map) |
(substitute-key-definition 'describe-key 'electric-describe-key map) |
421 |
(setq ehelp-map map) |
(setq ehelp-map map) |
422 |
(fset 'ehelp-command map))) |
(fset 'ehelp-command map))) |
423 |
|
|
424 |
(provide 'ehelp) |
(provide 'ehelp) |
425 |
|
|
426 |
;;; ehelp.el ends here |
;;; ehelp.el ends here |