# HG changeset patch # User Karl Heuer # Date 779758270 0 # Node ID 6d8297d65d78b6f402a1f7670c27ca5544c0f688 # Parent 0e668dd3f1207fd6e4344dfd8aa21874731fcb45 (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. diff -r 0e668dd3f120 -r 6d8297d65d78 lisp/info.el --- 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-cease-edit] to return to info"))) + "Editing: Type \\\\[Info-cease-edit] to return to info"))) (defun Info-cease-edit () "Finish editing Info node; switch back to Info proper."