aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-09-16 23:31:10 +0000
committerKarl Heuer1994-09-16 23:31:10 +0000
commite82c28f9790d0199ae42ab0ed2270cacda65eb93 (patch)
tree42e2a003f2ea8f5cb512afc6c22d0c8c46b1ed3b
parent151ca1707130a0485038b3e6535503ebce465ad7 (diff)
downloademacs-e82c28f9790d0199ae42ab0ed2270cacda65eb93.tar.gz
emacs-e82c28f9790d0199ae42ab0ed2270cacda65eb93.zip
(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.
-rw-r--r--lisp/info.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 59416d79329..b07c8930c81 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1520,14 +1520,6 @@ Advanced commands:
1520Like text mode with the addition of `Info-cease-edit' 1520Like text mode with the addition of `Info-cease-edit'
1521which returns to Info mode for browsing. 1521which returns to Info mode for browsing.
1522\\{Info-edit-map}" 1522\\{Info-edit-map}"
1523 )
1524
1525(defun Info-edit ()
1526 "Edit the contents of this Info node.
1527Allowed only if variable `Info-enable-edit' is non-nil."
1528 (interactive)
1529 (or Info-enable-edit
1530 (error "Editing info nodes is not enabled"))
1531 (use-local-map Info-edit-map) 1523 (use-local-map Info-edit-map)
1532 (setq major-mode 'Info-edit-mode) 1524 (setq major-mode 'Info-edit-mode)
1533 (setq mode-name "Info Edit") 1525 (setq mode-name "Info Edit")
@@ -1535,8 +1527,18 @@ Allowed only if variable `Info-enable-edit' is non-nil."
1535 (setq buffer-read-only nil) 1527 (setq buffer-read-only nil)
1536 ;; Make mode line update. 1528 ;; Make mode line update.
1537 (set-buffer-modified-p (buffer-modified-p)) 1529 (set-buffer-modified-p (buffer-modified-p))
1530 (buffer-enable-undo (current-buffer))
1531 (run-hooks 'Info-edit-mode-hook))
1532
1533(defun Info-edit ()
1534 "Edit the contents of this Info node.
1535Allowed only if variable `Info-enable-edit' is non-nil."
1536 (interactive)
1537 (or Info-enable-edit
1538 (error "Editing info nodes is not enabled"))
1539 (Info-edit-mode)
1538 (message (substitute-command-keys 1540 (message (substitute-command-keys
1539 "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info"))) 1541 "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info")))
1540 1542
1541(defun Info-cease-edit () 1543(defun Info-cease-edit ()
1542 "Finish editing Info node; switch back to Info proper." 1544 "Finish editing Info node; switch back to Info proper."