Make Info-edit obsolete

Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00374.html
(Warning: interminable bikeshedding in thread)

* lisp/info.el (Info-enable-edit): Remove.
(Info-edit): Disable it rather than using Info-enable.
(Info-edit-mode-hook, Info-edit-map, Info-edit-mode, Info-edit)
(Info-cease-edit): Make editing of Info files obsolete.

* etc/NEWS: Mention this.
This commit is contained in:
Glenn Morris 2013-02-20 22:55:19 -08:00
parent bed1791adc
commit 5313bbc771
3 changed files with 29 additions and 13 deletions

View file

@ -218,6 +218,10 @@ are obsolete. Customize the `woman-* faces instead.
+++
*** yow.el is obsolete; use fortune.el or cookie1.el instead.
---
*** The Info-edit command is obsolete. Editing Info nodes by hand
has not been relevant for some time.
* New Modes and Packages in Emacs 24.4
** New nadvice.el package offering lighter-weight advice facilities.

View file

@ -1,5 +1,10 @@
2013-02-21 Glenn Morris <rgm@gnu.org>
* info.el (Info-enable-edit): Remove.
(Info-edit): Disable it rather than using Info-enable.
(Info-edit-mode-hook, Info-edit-map, Info-edit-mode, Info-edit)
(Info-cease-edit): Make editing of Info files obsolete.
* informat.el (Info-tagify):
Handle buffers not visiting files. (Bug#13763)

View file

@ -59,15 +59,6 @@ to the user."
:group 'info
:version "24.1")
(defcustom Info-enable-edit nil
"Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit the current node.
This is convenient if you want to write Info files by hand.
However, we recommend that you not do this.
It is better to write a Texinfo file and generate the Info file from that,
because that gives you a printed manual as well."
:type 'boolean
:group 'info)
(defvar Info-enable-active-nodes nil
"Non-nil allows Info to execute Lisp code associated with nodes.
The Lisp code is executed when the node is selected.")
@ -375,6 +366,9 @@ with wrapping around the current Info node."
(defvar Info-edit-mode-hook nil
"Hooks run when `Info-edit-mode' is called.")
(make-obsolete-variable 'Info-edit-mode-hook
"editing Info nodes by hand is not recommended." "24.4")
(defvar Info-current-file nil
"Info file that Info is now looking at, or nil.
This is the name that was specified in Info, not the actual file name.
@ -4253,6 +4247,10 @@ Advanced commands:
map)
"Local keymap used within `e' command of Info.")
(make-obsolete-variable 'Info-edit-map
"editing Info nodes by hand is not recommended."
"24.4")
;; Info-edit mode is suitable only for specially formatted data.
(put 'Info-edit-mode 'mode-class 'special)
@ -4270,16 +4268,22 @@ which returns to Info mode for browsing.
(buffer-enable-undo (current-buffer))
(run-mode-hooks 'Info-edit-mode-hook))
(make-obsolete 'Info-edit-mode
"editing Info nodes by hand is not recommended." "24.4")
(defun Info-edit ()
"Edit the contents of this Info node.
Allowed only if variable `Info-enable-edit' is non-nil."
"Edit the contents of this Info node."
(interactive)
(or Info-enable-edit
(error "Editing Info nodes is not enabled"))
(Info-edit-mode)
(message "%s" (substitute-command-keys
"Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info")))
(put 'Info-edit 'disabled "Editing Info nodes by hand is not recommended.
This feature will be removed in future.")
(make-obsolete 'Info-edit
"editing Info nodes by hand is not recommended." "24.4")
(defun Info-cease-edit ()
"Finish editing Info node; switch back to Info proper."
(interactive)
@ -4296,6 +4300,9 @@ Allowed only if variable `Info-enable-edit' is non-nil."
(and (marker-position Info-tag-table-marker)
(buffer-modified-p)
(message "Tags may have changed. Use Info-tagify if necessary")))
(make-obsolete 'Info-cease-edit
"editing Info nodes by hand is not recommended." "24.4")
(defvar Info-file-list-for-emacs
'("ediff" "eudc" "forms" "gnus" "info" ("Info" . "info") ("mh" . "mh-e")