Address some "unused lexical argument" warnings in eshell
[bpt/emacs.git] / lisp / eshell / em-smart.el
index f08fec8..8d60444 100644 (file)
@@ -1,6 +1,6 @@
-;;; em-smart.el --- smart display of output
+;;; em-smart.el --- smart display of output  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
 
 ;;; Code:
 
+(require 'esh-mode)
 (eval-when-compile (require 'eshell))
 
 ;;;###autoload
-(eshell-defgroup eshell-smart nil
+(progn
+(defgroup eshell-smart nil
   "This module combines the facility of normal, modern shells with
 some of the edit/review concepts inherent in the design of Plan 9's
 9term.  See the docs for more details.
@@ -80,7 +82,7 @@ Most likely you will have to turn this option on and play around with
 it to get a real sense of how it works."
   :tag "Smart display of output"
   ;; :link '(info-link "(eshell)Smart display of output")
-  :group 'eshell-module)
+  :group 'eshell-module))
 
 ;;; User Variables:
 
@@ -120,6 +122,7 @@ only if that output can be presented in its entirely in the Eshell window."
 (defcustom eshell-smart-display-navigate-list
   '(insert-parentheses
     mouse-yank-at-click
+    mouse-yank-primary
     mouse-yank-secondary
     yank-pop
     yank-rectangle
@@ -191,7 +194,8 @@ The options are `begin', `after' or `end'."
       (add-hook 'eshell-post-command-hook
                'eshell-smart-maybe-jump-to-end nil t))))
 
-(defun eshell-smart-scroll-window (wind start)
+;; This is called by window-scroll-functions with two arguments.
+(defun eshell-smart-scroll-window (wind _start)
   "Scroll the given Eshell window accordingly."
   (unless eshell-currently-handling-window
     (let ((inhibit-point-motion-hooks t)
@@ -234,7 +238,8 @@ The options are `begin', `after' or `end'."
   (add-hook 'pre-command-hook 'eshell-smart-display-move nil t)
   (eshell-refresh-windows))
 
-(defun eshell-disable-after-change (b e l)
+;; Called from after-change-functions with 3 arguments.
+(defun eshell-disable-after-change (_b _e _l)
   "Disable smart display mode if the buffer changes in any way."
   (when eshell-smart-command-done
     (remove-hook 'pre-command-hook 'eshell-smart-display-move t)