]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-rebind.el
Update copyright year to 2015
[gnu-emacs] / lisp / eshell / em-rebind.el
index a459f3a17760b024e13b091c091e869fa1b91e2f..3ac746474092bf4359b156171362d64fd79085bd 100644 (file)
@@ -1,7 +1,6 @@
-;;; em-rebind.el --- rebind keys when point is at current input
+;;; em-rebind.el --- rebind keys when point is at current input  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008, 2009, 2010, 2011, 2012  Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
 
 ;;; Code:
 
+(require 'esh-mode)
 (eval-when-compile (require 'eshell))
 
 ;;;###autoload
-(eshell-defgroup eshell-rebind nil
+(progn
+(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
@@ -38,12 +39,13 @@ commands to cause the point to leave the input area, such as
 `backward-word', `previous-line', etc.  This module intends to mimic
 the behavior of normal shells while the user editing new input text."
   :tag "Rebind keys at input"
-  :group 'eshell-module)
+  :group 'eshell-module))
 
 ;;; User Variables:
 
-(defcustom eshell-rebind-load-hook '(eshell-rebind-initialize)
-  "*A list of functions to call when loading `eshell-rebind'."
+(defcustom eshell-rebind-load-hook nil
+  "A list of functions to call when loading `eshell-rebind'."
+  :version "24.1"                      ; removed eshell-rebind-initialize
   :type 'hook
   :group 'eshell-rebind)
 
@@ -55,14 +57,14 @@ the behavior of normal shells while the user editing new input text."
     ([delete]       . eshell-delete-backward-char)
     ([(control ?w)] . backward-kill-word)
     ([(control ?u)] . eshell-kill-input))
-  "*Bind some keys differently if point is in input text."
+  "Bind some keys differently if point is in input text."
   :type '(repeat (cons (vector :tag "Keys to bind"
                               (repeat :inline t sexp))
                       (function :tag "Command")))
   :group 'eshell-rebind)
 
 (defcustom eshell-confine-point-to-input t
-  "*If non-nil, do not allow the point to leave the current input.
+  "If non-nil, do not allow the point to leave the current input.
 This is more difficult to do nicely in Emacs than one might think.
 Basically, the `point-left' attribute is added to the input text, and
 a function is placed on that hook to take the point back to
@@ -77,13 +79,13 @@ people will left the point alone in the Eshell buffer.  Sigh."
   :group 'eshell-rebind)
 
 (defcustom eshell-error-if-move-away t
-  "*If non-nil, consider it an error to try to move outside current input.
+  "If non-nil, consider it an error to try to move outside current input.
 This is default behavior of shells like bash."
   :type 'boolean
   :group 'eshell-rebind)
 
 (defcustom eshell-remap-previous-input t
-  "*If non-nil, remap input keybindings on previous prompts as well."
+  "If non-nil, remap input keybindings on previous prompts as well."
   :type 'boolean
   :group 'eshell-rebind)
 
@@ -91,7 +93,6 @@ This is default behavior of shells like bash."
   '(beginning-of-line-text
     beginning-of-line
     move-to-column
-    move-to-column-force
     move-to-left-margin
     move-to-tab-stop
     forward-char
@@ -132,7 +133,7 @@ This is default behavior of shells like bash."
     forward-visible-line
     forward-comment
     forward-thing)
-  "*A list of commands that cannot leave the input area."
+  "A list of commands that cannot leave the input area."
   :type '(repeat function)
   :group 'eshell-rebind)
 
@@ -145,7 +146,7 @@ This is default behavior of shells like bash."
 ;;; Functions:
 
 (defun eshell-rebind-initialize ()
-  "Initialize the inputing code."
+  "Initialize the inputting code."
   (unless eshell-non-interactive-p
     (add-hook 'eshell-mode-hook 'eshell-setup-input-keymap nil t)
     (make-local-variable 'eshell-previous-point)
@@ -217,7 +218,7 @@ lock it at that."
        (cdar bindings))
       (setq bindings (cdr bindings)))))
 
-(defun eshell-delete-backward-char (n &optional killflag)
+(defun eshell-delete-backward-char (n)
   "Delete the last character, unless it's part of the output."
   (interactive "P")
   (let ((count (prefix-numeric-value n)))
@@ -247,5 +248,4 @@ input."
 ;; generated-autoload-file: "esh-groups.el"
 ;; End:
 
-;; arch-tag: 76d84f12-cc56-4d67-9b7d-c6b44ad20530
 ;;; em-rebind.el ends here