From 49a053fc5b27c7d1a32c42301fc66657dfc396ae Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 17 Sep 2013 21:48:00 -0400 Subject: [PATCH] Address some "unused lexical variable" warnings * lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare. * lisp/eshell/esh-io.el (x-select-enable-clipboard): Declare. * lisp/erc/erc-button.el (erc-button-add-buttons): * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): * lisp/eshell/em-hist.el (eshell/history, eshell-isearch-backward): * lisp/eshell/em-pred.el (eshell-parse-modifiers, eshell-pred-file-time): Remove unused local variables. --- lisp/ChangeLog | 9 +++++++++ lisp/dframe.el | 3 +++ lisp/erc/ChangeLog | 4 ++++ lisp/erc/erc-button.el | 2 +- lisp/eshell/em-cmpl.el | 2 +- lisp/eshell/em-hist.el | 7 +++---- lisp/eshell/em-pred.el | 4 ++-- lisp/eshell/esh-io.el | 2 ++ 8 files changed, 25 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4f150317e3..439b1db7d5f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,14 @@ 2013-09-18 Glenn Morris + * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare. + + * eshell/em-cmpl.el (eshell-complete-parse-arguments): + * eshell/em-hist.el (eshell/history, eshell-isearch-backward): + * eshell/em-pred.el (eshell-parse-modifiers, eshell-pred-file-time): + Remove unused local variables. + + * eshell/esh-io.el (x-select-enable-clipboard): Declare. + * textmodes/two-column.el: Make 2C-split work for --without-x. (scroll-bar-columns): Autoload. (top-level): Require fringe when compiling. diff --git a/lisp/dframe.el b/lisp/dframe.el index 3ef30d055b6..c75287bbc32 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -243,6 +243,9 @@ Local to those buffers, as a function called that created it.") "Return non-nil if FRAME is currently available." (and frame (frame-live-p frame) (frame-visible-p frame))) +(defvar x-sensitive-text-pointer-shape) +(defvar x-pointer-shape) + (defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name local-mode-fn &optional diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 2c10f7fef22..413969c31ec 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,7 @@ +2013-09-18 Glenn Morris + + * erc-button.el (erc-button-add-buttons): Remove unused local vars. + 2013-09-14 Vivek Dasmohapatra * erc.el (erc-update-mode-line-buffer): diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index ac8600c57fd..0edb771438a 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -267,7 +267,7 @@ specified by `erc-button-alist'." (inhibit-point-motion-hooks t) (inhibit-field-text-motion t) (alist erc-button-alist) - entry regexp data) + regexp) (erc-button-remove-old-buttons) (dolist (entry alist) (if (equal (car entry) (quote (quote nicknames))) diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index a940eb5cd36..5cb5d931700 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -370,7 +370,7 @@ to writing a completion function." (cl-assert (= (length args) (length posns))) (let ((a args) (i 0) - l final) + l) (while a (if (and (consp (car a)) (eq (caar a) 'eshell-operator)) diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 8e56de251a1..12ec8ce1f35 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -330,7 +330,7 @@ unless a different file is specified on the command line.") (and (or (not (ring-p eshell-history-ring)) (ring-empty-p eshell-history-ring)) (error "No history")) - (let (length command file) + (let (length file) (when (and args (string-match "^[0-9]+$" (car args))) (setq length (min (eshell-convert (car args)) (ring-length eshell-history-ring)) @@ -346,8 +346,7 @@ unless a different file is specified on the command line.") (write-history (eshell-write-history file)) (append-history (eshell-write-history file t)) (t - (let* ((history nil) - (index (1- (or length (ring-length eshell-history-ring)))) + (let* ((index (1- (or length (ring-length eshell-history-ring)))) (ref (- (ring-length eshell-history-ring) index))) ;; We have to build up a list ourselves from the ring vector. (while (>= index 0) @@ -945,7 +944,7 @@ If N is negative, search backwards for the -Nth previous match." (defun eshell-isearch-backward (&optional invert) "Do incremental regexp search backward through past commands." (interactive) - (let ((inhibit-read-only t) end) + (let ((inhibit-read-only t)) (eshell-prepare-for-search) (goto-char (point-max)) (set-marker eshell-last-output-end (point)) diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index f7d7605107f..a3aebc23faa 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -306,7 +306,7 @@ predicate functions. MOD-FUNC-LIST is a list of result modifier functions. PRED-FUNCS take a filename and return t if the test succeeds; MOD-FUNCS take any string and preform a modification, returning the resultant string." - (let (result negate follow preds mods) + (let (negate follow preds mods) (condition-case nil (while (not (eobp)) (let ((char (char-after))) @@ -399,7 +399,7 @@ returning the resultant string." (defun eshell-pred-file-time (mod-char mod-type attr-index) "Return a predicate to test whether a file matches a certain time." (let* ((quantum 86400) - qual amount when open close end) + qual when open close end) (when (memq (char-after) '(?M ?w ?h ?m ?s)) (setq quantum (char-after)) (cond diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index c4c0bd43790..90b1f8ec972 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -118,6 +118,8 @@ from executing while Emacs is redisplaying." :type 'integer :group 'eshell-io) +(defvar x-select-enable-clipboard) ; term/common-win + (defcustom eshell-virtual-targets '(("/dev/eshell" eshell-interactive-print nil) ("/dev/kill" (lambda (mode) -- 2.39.2