]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-rebind.el
* completion.el (add-completion-to-head, add-completion): Doc fixes.
[gnu-emacs] / lisp / eshell / em-rebind.el
index 4caae2da425278d22ce4fe299f97bf970b381d23..064eb08bb6610623edd256403aa1765a6406e1c6 100644 (file)
@@ -1,13 +1,16 @@
-;;; em-rebind --- rebind keys when point is at current input
+;;; em-rebind.el --- rebind keys when point is at current input
 
-;; Copyright (C) 1999, 2000 Free Software Foundation
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
+
+;; Author: John Wiegley <johnw@gnu.org>
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; 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 2, or (at your option)
-;; any later version.
+;; 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
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-(provide 'em-rebind)
+;;; Commentary:
+
+;;; Code:
 
-(eval-when-compile (require 'esh-maint))
+(eval-when-compile (require 'eshell))
 
-(defgroup eshell-rebind nil
+;;;###autoload
+(eshell-defgroup eshell-rebind nil
   "This module allows for special keybindings that only take effect
 while the point is in a region of input text.  By default, it binds
 C-a to move to the beginning of the input text (rather than just the
@@ -36,8 +40,6 @@ the behavior of normal shells while the user editing new input text."
   :tag "Rebind keys at input"
   :group 'eshell-module)
 
-;;; Commentary:
-
 ;;; User Variables:
 
 (defcustom eshell-rebind-load-hook '(eshell-rebind-initialize)
@@ -125,7 +127,6 @@ This is default behavior of shells like bash."
     forward-word
     backward-word
     forward-line
-    backward-line
     previous-line
     next-line
     forward-visible-line
@@ -146,12 +147,9 @@ This is default behavior of shells like bash."
 (defun eshell-rebind-initialize ()
   "Initialize the inputing code."
   (unless eshell-non-interactive-p
-    (make-local-hook 'eshell-mode-hook)
     (add-hook 'eshell-mode-hook 'eshell-setup-input-keymap nil t)
-    (make-local-hook 'pre-command-hook)
     (make-local-variable 'eshell-previous-point)
     (add-hook 'pre-command-hook 'eshell-save-previous-point nil t)
-    (make-local-hook 'post-command-hook)
     (make-local-variable 'overriding-local-map)
     (add-hook 'post-command-hook 'eshell-rebind-input-map nil t)
     (set (make-local-variable 'eshell-lock-keymap) nil)
@@ -243,6 +241,11 @@ input."
          (eshell-life-is-too-much)))
       (eshell-delete-backward-char (- arg)))))
 
-;;; Code:
+(provide 'em-rebind)
+
+;; Local Variables:
+;; generated-autoload-file: "esh-groups.el"
+;; End:
 
+;; arch-tag: 76d84f12-cc56-4d67-9b7d-c6b44ad20530
 ;;; em-rebind.el ends here