emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114381: Address some "unused lexical argument" warn


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114381: Address some "unused lexical argument" warnings in eshell
Date: Thu, 19 Sep 2013 02:28:24 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114381
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-18 19:28:20 -0700
message:
  Address some "unused lexical argument" warnings in eshell
  
  * eshell/em-ls.el (eshell-ls-use-in-dired): Use `symbol' arg.
  Fix (f)boundp mix-up.
  
  * eshell/em-smart.el (eshell-smart-scroll-window)
  (eshell-disable-after-change):
  * eshell/em-term.el (eshell-term-sentinel): Mark unused arg.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/eshell/em-ls.el           emls.el-20091113204419-o5vbwnq5f7feedwu-1858
  lisp/eshell/em-smart.el        emsmart.el-20091113204419-o5vbwnq5f7feedwu-1863
  lisp/eshell/em-term.el         emterm.el-20091113204419-o5vbwnq5f7feedwu-1864
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-09-18 20:47:37 +0000
+++ b/lisp/ChangeLog    2013-09-19 02:28:20 +0000
@@ -1,3 +1,12 @@
+2013-09-19  Glenn Morris  <address@hidden>
+
+       * eshell/em-ls.el (eshell-ls-use-in-dired): Use `symbol' arg.
+       Fix (f)boundp mix-up.
+
+       * eshell/em-smart.el (eshell-smart-scroll-window)
+       (eshell-disable-after-change):
+       * eshell/em-term.el (eshell-term-sentinel): Mark unused arg.
+
 2013-09-18  Alan Mackenzie  <address@hidden>
 
        Fix fontification of type when followed by "const".

=== modified file 'lisp/eshell/em-ls.el'
--- a/lisp/eshell/em-ls.el      2013-09-12 20:15:53 +0000
+++ b/lisp/eshell/em-ls.el      2013-09-19 02:28:20 +0000
@@ -50,9 +50,7 @@
 
 (defcustom eshell-ls-unload-hook
   (list
-   (function
-    (lambda ()
-      (fset 'insert-directory eshell-ls-orig-insert-directory))))
+   (lambda () (fset 'insert-directory eshell-ls-orig-insert-directory)))
   "When unloading `eshell-ls', restore the definition of `insert-directory'."
   :type 'hook
   :group 'eshell-ls)
@@ -77,17 +75,17 @@
   :type '(repeat :tag "Arguments" string)
   :group 'eshell-ls)
 
+;; FIXME should use advice, like ls-lisp.el does now.
 (defcustom eshell-ls-use-in-dired nil
-  "If non-nil, use `eshell-ls' to read directories in Dired."
+  "If non-nil, use `eshell-ls' to read directories in Dired.
+Changing this without using customize has no effect."
   :set (lambda (symbol value)
         (if value
-            (unless (and (boundp 'eshell-ls-use-in-dired)
-                         eshell-ls-use-in-dired)
-              (fset 'insert-directory 'eshell-ls-insert-directory))
-          (when (and (boundp 'eshell-ls-insert-directory)
-                     eshell-ls-use-in-dired)
-            (fset 'insert-directory eshell-ls-orig-insert-directory)))
-        (setq eshell-ls-use-in-dired value))
+            (or (bound-and-true-p eshell-ls-use-in-dired)
+                (fset 'insert-directory 'eshell-ls-insert-directory))
+          (and (fboundp 'eshell-ls-insert-directory) eshell-ls-use-in-dired
+               (fset 'insert-directory eshell-ls-orig-insert-directory)))
+        (set symbol value))
   :type 'boolean
   :require 'em-ls
   :group 'eshell-ls)

=== modified file 'lisp/eshell/em-smart.el'
--- a/lisp/eshell/em-smart.el   2013-09-12 20:15:53 +0000
+++ b/lisp/eshell/em-smart.el   2013-09-19 02:28:20 +0000
@@ -194,7 +194,8 @@
       (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)
@@ -237,7 +238,8 @@
   (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)

=== modified file 'lisp/eshell/em-term.el'
--- a/lisp/eshell/em-term.el    2013-09-12 20:15:53 +0000
+++ b/lisp/eshell/em-term.el    2013-09-19 02:28:20 +0000
@@ -189,7 +189,8 @@
          (term-set-escape-char ?\C-x))))
   nil)
 
-(defun eshell-term-sentinel (proc string)
+;; Process sentinels receive two arguments.
+(defun eshell-term-sentinel (proc _string)
   "Destroy the buffer visiting PROC."
   (let ((proc-buf (process-buffer proc)))
     (when (and proc-buf (buffer-live-p proc-buf)


reply via email to

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