emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master deb8839: Move Info-edit-* commands from info.el to


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master deb8839: Move Info-edit-* commands from info.el to obsolete/info-edit.el
Date: Fri, 17 May 2019 07:55:58 -0400 (EDT)

branch: master
commit deb88392c61d9cdf99f2fbe432c16d995541e2c0
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Move Info-edit-* commands from info.el to obsolete/info-edit.el
    
    * lisp/info.el: Move Info-edit-* commands to obsolete/info-edit.el.
    
    * lisp/obsolete/info-edit.el: New file.
---
 lisp/info.el               | 59 --------------------------------
 lisp/obsolete/info-edit.el | 83 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 59 deletions(-)

diff --git a/lisp/info.el b/lisp/info.el
index 2882262..c211887 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -380,12 +380,6 @@ with wrapping around the current Info node."
   :type 'hook
   :group 'info)
 
-(defvar Info-edit-mode-hook nil
-  "Hook run when `Info-edit-mode' is activated.")
-
-(make-obsolete-variable 'Info-edit-mode-hook
-                       "editing Info nodes by hand is not recommended." "24.4")
-
 (defvar-local 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.
@@ -4384,59 +4378,6 @@ Advanced commands:
                  (copy-marker (marker-position m)))
              (make-marker))))))
 
-(define-obsolete-variable-alias 'Info-edit-map 'Info-edit-mode-map "24.1")
-(defvar Info-edit-mode-map (let ((map (make-sparse-keymap)))
-                             (set-keymap-parent map text-mode-map)
-                             (define-key map "\C-c\C-c" 'Info-cease-edit)
-                             map)
-  "Local keymap used within `e' command of Info.")
-
-(make-obsolete-variable 'Info-edit-mode-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)
-
-(define-derived-mode Info-edit-mode text-mode "Info Edit"
-  "Major mode for editing the contents of an Info node.
-Like text mode with the addition of `Info-cease-edit'
-which returns to Info mode for browsing."
-  (setq buffer-read-only nil)
-  (force-mode-line-update)
-  (buffer-enable-undo (current-buffer)))
-
-(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."
-  (interactive)
-  (Info-edit-mode)
-  (message "%s" (substitute-command-keys
-                "Editing: Type \\<Info-edit-mode-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)
-  ;; Do this first, so nothing has changed if user C-g's at query.
-  (and (buffer-modified-p)
-       (y-or-n-p "Save the file? ")
-       (save-buffer))
-  (Info-mode)
-  (force-mode-line-update)
-  (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")
diff --git a/lisp/obsolete/info-edit.el b/lisp/obsolete/info-edit.el
new file mode 100644
index 0000000..b64e840
--- /dev/null
+++ b/lisp/obsolete/info-edit.el
@@ -0,0 +1,83 @@
+;; info-edit.el --- Editing info files  -*- lexical-binding:t -*-
+
+;; Copyright (C) 1985-1986, 1992-2019 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+;; Keywords: help
+;; Obsolete-since: 24.4
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'info)
+
+(defvar Info-edit-mode-hook nil
+  "Hook run when `Info-edit-mode' is activated.")
+
+(make-obsolete-variable 'Info-edit-mode-hook
+                       "editing Info nodes by hand is not recommended." "24.4")
+
+(define-obsolete-variable-alias 'Info-edit-map 'Info-edit-mode-map "24.1")
+(defvar Info-edit-mode-map (let ((map (make-sparse-keymap)))
+                             (set-keymap-parent map text-mode-map)
+                             (define-key map "\C-c\C-c" 'Info-cease-edit)
+                             map)
+  "Local keymap used within `e' command of Info.")
+
+(make-obsolete-variable 'Info-edit-mode-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)
+
+(define-derived-mode Info-edit-mode text-mode "Info Edit"
+  "Major mode for editing the contents of an Info node.
+Like text mode with the addition of `Info-cease-edit'
+which returns to Info mode for browsing."
+  (setq buffer-read-only nil)
+  (force-mode-line-update)
+  (buffer-enable-undo (current-buffer)))
+
+(defun Info-edit ()
+  "Edit the contents of this Info node."
+  (interactive)
+  (Info-edit-mode)
+  (message "%s" (substitute-command-keys
+                "Editing: Type \\<Info-edit-mode-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.")
+
+(defun Info-cease-edit ()
+  "Finish editing Info node; switch back to Info proper."
+  (interactive)
+  ;; Do this first, so nothing has changed if user C-g's at query.
+  (and (buffer-modified-p)
+       (y-or-n-p "Save the file? ")
+       (save-buffer))
+  (Info-mode)
+  (force-mode-line-update)
+  (and (marker-position Info-tag-table-marker)
+       (buffer-modified-p)
+       (message "Tags may have changed.  Use Info-tagify if necessary")))
+
+(provide 'info-edit)
+
+;;; info-edit.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]