emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107003: lisp/window.el: Remove unuse


From: Juanma Barranquero
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107003: lisp/window.el: Remove unused variables.
Date: Sun, 29 Jan 2012 22:52:14 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107003
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sun 2012-01-29 22:52:14 +0100
message:
  lisp/window.el: Remove unused variables.
  
  (window-with-parameter): Remove unused variable `windows'.
  (window--side-check): Remove unused variable `code'.
  (window--resize-siblings): Remove unused variable `first'.
  (adjust-window-trailing-edge): Remove unused variable `failed'.
  (window-deletable-p, window--delete): Remove unused variable `buffer'.
  Use `let', not `let*'.
  (balance-windows-2): Remove unused variable `found'.
  (window--state-put-2): Remove unused variable `splits'.
  (window-state-put): Remove unused variable `selected'.
  (same-window-p): Use `string-match-p'.
  (display-buffer-assq-regexp): Remove unused variable `value'.
  (display-buffer-pop-up-frame, display-buffer-pop-up-window):
  Mark argument ALIST as ignored.
  (pop-to-buffer): Remove unused variable `old-window'.
modified:
  lisp/ChangeLog
  lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-01-29 17:41:43 +0000
+++ b/lisp/ChangeLog    2012-01-29 21:52:14 +0000
@@ -1,3 +1,20 @@
+2012-01-29  Juanma Barranquero  <address@hidden>
+
+       * window.el (window-with-parameter): Remove unused variable `windows'.
+       (window--side-check): Remove unused variable `code'.
+       (window--resize-siblings): Remove unused variable `first'.
+       (adjust-window-trailing-edge): Remove unused variable `failed'.
+       (window-deletable-p, window--delete): Remove unused variable `buffer'.
+       Use `let', not `let*'.
+       (balance-windows-2): Remove unused variable `found'.
+       (window--state-put-2): Remove unused variable `splits'.
+       (window-state-put): Remove unused variable `selected'.
+       (same-window-p): Use `string-match-p'.
+       (display-buffer-assq-regexp): Remove unused variable `value'.
+       (display-buffer-pop-up-frame, display-buffer-pop-up-window):
+       Mark argument ALIST as ignored.
+       (pop-to-buffer): Remove unused variable `old-window'.
+
 2012-01-29  Eli Zaretskii  <address@hidden>
 
        * jka-cmpr-hook.el (jka-compr-compression-info-list): Support .lz
@@ -88,8 +105,8 @@
 
 2012-01-28  Chong Yidong  <address@hidden>
 
-       * emacs-lisp/package.el (package-maybe-load-descriptor): New
-       function, split from package-maybe-load-descriptor.
+       * emacs-lisp/package.el (package-maybe-load-descriptor):
+       New function, split from package-maybe-load-descriptor.
        (package-maybe-load-descriptor): Use it.
        (package-download-transaction): Fully load required packages
        inside the loop, so that `require' calls work (Bug#10593).
@@ -214,8 +231,8 @@
 
 2012-01-21  Jérémy Compostella  <address@hidden>
 
-       * windmove.el (windmove-reference-loc): Fix
-       windmove-reference-loc miscalculation.
+       * windmove.el (windmove-reference-loc):
+       Fix windmove-reference-loc miscalculation.
 
 2012-01-21  Jay Belanger  <address@hidden>
 
@@ -271,8 +288,8 @@
        Eliminate sluggishness and hangs in fontification of "semicolon
        deserts".
 
-       * progmodes/cc-engine.el (c-state-nonlit-pos-interval): change
-       value 10000 -> 3000.
+       * progmodes/cc-engine.el (c-state-nonlit-pos-interval):
+       Change value 10000 -> 3000.
        (c-state-safe-place): Reformulate so it doesn't stack up an
        infinite number of wrong entries in c-state-nonlit-pos-cache.
        (c-determine-limit-get-base, c-determine-limit): New functions to

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2012-01-25 14:52:10 +0000
+++ b/lisp/window.el    2012-01-29 21:52:14 +0000
@@ -299,7 +299,7 @@
 for PARAMETER equals VALUE (comparison is done with `equal').
 Optional argument ANY non-nil means consider internal windows
 too."
-  (let (this-value windows)
+  (let (this-value)
     (catch 'found
       (walk-window-tree
        (lambda (window)
@@ -435,7 +435,7 @@
   parent whose window-side parameter is nil and there must be no
   leaf window whose window-side parameter is nil."
   (let (normal none left top right bottom
-       side parent parent-side code)
+       side parent parent-side)
     (when (or (catch 'reset
                (walk-window-tree
                 (lambda (window)
@@ -1807,8 +1807,7 @@
       (if (window-combined-p sub horizontal)
          ;; In an iso-combination try to extract DELTA from WINDOW's
          ;; siblings.
-         (let ((first sub)
-               (skip (eq trail 'after))
+         (let ((skip (eq trail 'after))
                this-delta other-delta)
            ;; Decide which windows shall be left alone.
            (while sub
@@ -1993,7 +1992,7 @@
   (setq window (window-normalize-window window))
   (let ((frame (window-frame window))
        (right window)
-       left this-delta min-delta max-delta failed)
+       left this-delta min-delta max-delta)
     ;; Find the edge we want to move.
     (while (and (or (not (window-combined-p right horizontal))
                    (not (window-right right)))
@@ -2309,9 +2308,8 @@
     (when (window-parameter window 'window-atom)
       (setq window (window-atom-root window))))
 
-  (let* ((parent (window-parent window))
-        (frame (window-frame window))
-        (buffer (window-buffer window)))
+  (let ((parent (window-parent window))
+        (frame (window-frame window)))
     (cond
      ((frame-root-window-p window)
       ;; WINDOW's frame can be deleted only if there are other frames
@@ -2798,8 +2796,7 @@
 if WINDOW gets deleted or its frame is auto-hidden."
   (setq window (window-normalize-window window t))
   (unless (and dedicated-only (not (window-dedicated-p window)))
-    (let* ((buffer (window-buffer window))
-          (deletable (window-deletable-p window)))
+    (let ((deletable (window-deletable-p window)))
       (cond
        ((eq deletable 'frame)
        (let ((frame (window-frame window)))
@@ -3355,7 +3352,7 @@
         (number-of-children 0)
         (parent-size (window-new-total window))
         (total-sum parent-size)
-        found failed size sub-total sub-delta sub-amount rest)
+        failed size sub-total sub-delta sub-amount rest)
     (while sub
       (setq number-of-children (1+ number-of-children))
       (when (window-size-fixed-p sub horizontal)
@@ -3372,7 +3369,6 @@
       (while (and sub (not failed))
        ;; Ignore child windows that should be ignored or are stuck.
        (unless (window--resize-child-windows-skip-p sub)
-         (setq found t)
          (setq sub-total (window-total-size sub horizontal))
          (setq sub-delta (- size sub-total))
          (setq sub-amount
@@ -3736,7 +3732,6 @@
   "Helper function for `window-state-put'."
   (dolist (item window-state-put-list)
     (let ((window (car item))
-         (splits (cdr (assq 'splits item)))
          (combination-limit (cdr (assq 'combination-limit item)))
          (parameters (cdr (assq 'parameters item)))
          (state (cdr (assq 'buffer item))))
@@ -3826,8 +3821,7 @@
               (= (window-total-size window t)
                  (cdr (assq 'total-width state)))))
         (min-height (cdr (assq 'min-height head)))
-        (min-width (cdr (assq 'min-width head)))
-        selected)
+        (min-width (cdr (assq 'min-width head))))
     (if (and (not totals)
             (or (> min-height (window-total-size window))
                 (> min-width (window-total-size window t)))
@@ -4244,7 +4238,7 @@
        ;; The elements of `same-window-regexps' can be regexps
        ;; or cons cells whose cars are regexps.
        (when (or (and (stringp regexp)
-                      (string-match regexp buffer-name))
+                      (string-match-p regexp buffer-name))
                  (and (consp regexp) (stringp (car regexp))
                       (string-match-p (car regexp) buffer-name)))
          (throw 'found t)))))))
@@ -4602,8 +4596,7 @@
   "Retrieve ALIST entry corresponding to BUFFER-NAME."
   (catch 'match
     (dolist (entry alist)
-      (let ((key (car entry))
-           (value (cdr entry)))
+      (let ((key (car entry)))
        (when (or (and (stringp key)
                       (string-match-p key buffer-name))
                  (and (symbolp key) (functionp key)
@@ -4792,7 +4785,7 @@
                           (funcall special-display-function
                                    buffer ',(if (listp pars) pars)))))))))
 
-(defun display-buffer-pop-up-frame (buffer alist)
+(defun display-buffer-pop-up-frame (buffer _alist)
   "Display BUFFER in a new frame.
 This works by calling `pop-up-frame-function'.  If successful,
 return the window used; otherwise return nil."
@@ -4807,7 +4800,7 @@
       (set-window-prev-buffers window nil)
       window)))
 
-(defun display-buffer-pop-up-window (buffer alist)
+(defun display-buffer-pop-up-window (buffer _alist)
   "Display BUFFER by popping up a new window.
 The new window is created on the selected frame, or in
 `last-nonminibuffer-frame' if no windows can be created there.
@@ -4910,8 +4903,7 @@
                     (if current-prefix-arg t)))
   (setq buffer (window-normalize-buffer-to-switch-to buffer))
   (set-buffer buffer)
-  (let* ((old-window (selected-window))
-        (old-frame (selected-frame))
+  (let* ((old-frame (selected-frame))
         (window (display-buffer buffer action))
         (frame (window-frame window)))
     ;; If we chose another frame, make sure it gets input focus.


reply via email to

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