Mercurial > emacs
changeset 8805:6d8297d65d78
(Info-edit): Move the customary mode-initialization calls out of here.
(Info-edit-mode): Put them here. Also enable undo, and call
Info-edit-mode-hook.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 16 Sep 1994 23:31:10 +0000 |
parents | 0e668dd3f120 |
children | 2d3bfce2e1f0 |
files | lisp/info.el |
diffstat | 1 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/info.el Fri Sep 16 23:20:51 1994 +0000 +++ b/lisp/info.el Fri Sep 16 23:31:10 1994 +0000 @@ -1520,7 +1520,15 @@ Like text mode with the addition of `Info-cease-edit' which returns to Info mode for browsing. \\{Info-edit-map}" - ) + (use-local-map Info-edit-map) + (setq major-mode 'Info-edit-mode) + (setq mode-name "Info Edit") + (kill-local-variable 'mode-line-buffer-identification) + (setq buffer-read-only nil) + ;; Make mode line update. + (set-buffer-modified-p (buffer-modified-p)) + (buffer-enable-undo (current-buffer)) + (run-hooks 'Info-edit-mode-hook)) (defun Info-edit () "Edit the contents of this Info node. @@ -1528,15 +1536,9 @@ (interactive) (or Info-enable-edit (error "Editing info nodes is not enabled")) - (use-local-map Info-edit-map) - (setq major-mode 'Info-edit-mode) - (setq mode-name "Info Edit") - (kill-local-variable 'mode-line-buffer-identification) - (setq buffer-read-only nil) - ;; Make mode line update. - (set-buffer-modified-p (buffer-modified-p)) + (Info-edit-mode) (message (substitute-command-keys - "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info"))) + "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info"))) (defun Info-cease-edit () "Finish editing Info node; switch back to Info proper."