aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-09-18 19:28:20 -0700
committerGlenn Morris2013-09-18 19:28:20 -0700
commitce5033129f16b6554b922a63ef0d499ced55a223 (patch)
treeadf1eef255cb344ee0a6684630bd03888d08420b
parenta022856b0f99e19a51caff163b477f22faf6418f (diff)
downloademacs-ce5033129f16b6554b922a63ef0d499ced55a223.tar.gz
emacs-ce5033129f16b6554b922a63ef0d499ced55a223.zip
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.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/eshell/em-ls.el20
-rw-r--r--lisp/eshell/em-smart.el6
-rw-r--r--lisp/eshell/em-term.el3
4 files changed, 24 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 49f5d73442e..736df0d05f6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12013-09-19 Glenn Morris <rgm@gnu.org>
2
3 * eshell/em-ls.el (eshell-ls-use-in-dired): Use `symbol' arg.
4 Fix (f)boundp mix-up.
5
6 * eshell/em-smart.el (eshell-smart-scroll-window)
7 (eshell-disable-after-change):
8 * eshell/em-term.el (eshell-term-sentinel): Mark unused arg.
9
12013-09-18 Alan Mackenzie <acm@muc.de> 102013-09-18 Alan Mackenzie <acm@muc.de>
2 11
3 Fix fontification of type when followed by "const". 12 Fix fontification of type when followed by "const".
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 0e10d984f88..c2334d7bd74 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -50,9 +50,7 @@ properties to colorize its output based on the setting of
50 50
51(defcustom eshell-ls-unload-hook 51(defcustom eshell-ls-unload-hook
52 (list 52 (list
53 (function 53 (lambda () (fset 'insert-directory eshell-ls-orig-insert-directory)))
54 (lambda ()
55 (fset 'insert-directory eshell-ls-orig-insert-directory))))
56 "When unloading `eshell-ls', restore the definition of `insert-directory'." 54 "When unloading `eshell-ls', restore the definition of `insert-directory'."
57 :type 'hook 55 :type 'hook
58 :group 'eshell-ls) 56 :group 'eshell-ls)
@@ -77,17 +75,17 @@ This is useful for enabling human-readable format (-h), for example."
77 :type '(repeat :tag "Arguments" string) 75 :type '(repeat :tag "Arguments" string)
78 :group 'eshell-ls) 76 :group 'eshell-ls)
79 77
78;; FIXME should use advice, like ls-lisp.el does now.
80(defcustom eshell-ls-use-in-dired nil 79(defcustom eshell-ls-use-in-dired nil
81 "If non-nil, use `eshell-ls' to read directories in Dired." 80 "If non-nil, use `eshell-ls' to read directories in Dired.
81Changing this without using customize has no effect."
82 :set (lambda (symbol value) 82 :set (lambda (symbol value)
83 (if value 83 (if value
84 (unless (and (boundp 'eshell-ls-use-in-dired) 84 (or (bound-and-true-p eshell-ls-use-in-dired)
85 eshell-ls-use-in-dired) 85 (fset 'insert-directory 'eshell-ls-insert-directory))
86 (fset 'insert-directory 'eshell-ls-insert-directory)) 86 (and (fboundp 'eshell-ls-insert-directory) eshell-ls-use-in-dired
87 (when (and (boundp 'eshell-ls-insert-directory) 87 (fset 'insert-directory eshell-ls-orig-insert-directory)))
88 eshell-ls-use-in-dired) 88 (set symbol value))
89 (fset 'insert-directory eshell-ls-orig-insert-directory)))
90 (setq eshell-ls-use-in-dired value))
91 :type 'boolean 89 :type 'boolean
92 :require 'em-ls 90 :require 'em-ls
93 :group 'eshell-ls) 91 :group 'eshell-ls)
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el
index e6fa463aec3..8d60444a889 100644
--- a/lisp/eshell/em-smart.el
+++ b/lisp/eshell/em-smart.el
@@ -194,7 +194,8 @@ The options are `begin', `after' or `end'."
194 (add-hook 'eshell-post-command-hook 194 (add-hook 'eshell-post-command-hook
195 'eshell-smart-maybe-jump-to-end nil t)))) 195 'eshell-smart-maybe-jump-to-end nil t))))
196 196
197(defun eshell-smart-scroll-window (wind start) 197;; This is called by window-scroll-functions with two arguments.
198(defun eshell-smart-scroll-window (wind _start)
198 "Scroll the given Eshell window accordingly." 199 "Scroll the given Eshell window accordingly."
199 (unless eshell-currently-handling-window 200 (unless eshell-currently-handling-window
200 (let ((inhibit-point-motion-hooks t) 201 (let ((inhibit-point-motion-hooks t)
@@ -237,7 +238,8 @@ The options are `begin', `after' or `end'."
237 (add-hook 'pre-command-hook 'eshell-smart-display-move nil t) 238 (add-hook 'pre-command-hook 'eshell-smart-display-move nil t)
238 (eshell-refresh-windows)) 239 (eshell-refresh-windows))
239 240
240(defun eshell-disable-after-change (b e l) 241;; Called from after-change-functions with 3 arguments.
242(defun eshell-disable-after-change (_b _e _l)
241 "Disable smart display mode if the buffer changes in any way." 243 "Disable smart display mode if the buffer changes in any way."
242 (when eshell-smart-command-done 244 (when eshell-smart-command-done
243 (remove-hook 'pre-command-hook 'eshell-smart-display-move t) 245 (remove-hook 'pre-command-hook 'eshell-smart-display-move t)
diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el
index 71329f083ee..bfc810f2d2a 100644
--- a/lisp/eshell/em-term.el
+++ b/lisp/eshell/em-term.el
@@ -189,7 +189,8 @@ allowed."
189 (term-set-escape-char ?\C-x)))) 189 (term-set-escape-char ?\C-x))))
190 nil) 190 nil)
191 191
192(defun eshell-term-sentinel (proc string) 192;; Process sentinels receive two arguments.
193(defun eshell-term-sentinel (proc _string)
193 "Destroy the buffer visiting PROC." 194 "Destroy the buffer visiting PROC."
194 (let ((proc-buf (process-buffer proc))) 195 (let ((proc-buf (process-buffer proc)))
195 (when (and proc-buf (buffer-live-p proc-buf) 196 (when (and proc-buf (buffer-live-p proc-buf)