diff options
| author | Juanma Barranquero | 2012-01-29 22:52:14 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2012-01-29 22:52:14 +0100 |
| commit | cb882333c285fa0d18d87245207cb50b2f67b439 (patch) | |
| tree | d5d2f86bac9224e59ccfda959e4be8313288ff7c | |
| parent | 907201af573ee79e2b448b2e80713203e9799e2e (diff) | |
| download | emacs-cb882333c285fa0d18d87245207cb50b2f67b439.tar.gz emacs-cb882333c285fa0d18d87245207cb50b2f67b439.zip | |
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'.
| -rw-r--r-- | lisp/ChangeLog | 29 | ||||
| -rw-r--r-- | lisp/window.el | 36 |
2 files changed, 37 insertions, 28 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 894d5e40e55..bc41a796ad5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2012-01-29 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * window.el (window-with-parameter): Remove unused variable `windows'. | ||
| 4 | (window--side-check): Remove unused variable `code'. | ||
| 5 | (window--resize-siblings): Remove unused variable `first'. | ||
| 6 | (adjust-window-trailing-edge): Remove unused variable `failed'. | ||
| 7 | (window-deletable-p, window--delete): Remove unused variable `buffer'. | ||
| 8 | Use `let', not `let*'. | ||
| 9 | (balance-windows-2): Remove unused variable `found'. | ||
| 10 | (window--state-put-2): Remove unused variable `splits'. | ||
| 11 | (window-state-put): Remove unused variable `selected'. | ||
| 12 | (same-window-p): Use `string-match-p'. | ||
| 13 | (display-buffer-assq-regexp): Remove unused variable `value'. | ||
| 14 | (display-buffer-pop-up-frame, display-buffer-pop-up-window): | ||
| 15 | Mark argument ALIST as ignored. | ||
| 16 | (pop-to-buffer): Remove unused variable `old-window'. | ||
| 17 | |||
| 1 | 2012-01-29 Eli Zaretskii <eliz@gnu.org> | 18 | 2012-01-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 19 | ||
| 3 | * jka-cmpr-hook.el (jka-compr-compression-info-list): Support .lz | 20 | * jka-cmpr-hook.el (jka-compr-compression-info-list): Support .lz |
| @@ -88,8 +105,8 @@ | |||
| 88 | 105 | ||
| 89 | 2012-01-28 Chong Yidong <cyd@gnu.org> | 106 | 2012-01-28 Chong Yidong <cyd@gnu.org> |
| 90 | 107 | ||
| 91 | * emacs-lisp/package.el (package-maybe-load-descriptor): New | 108 | * emacs-lisp/package.el (package-maybe-load-descriptor): |
| 92 | function, split from package-maybe-load-descriptor. | 109 | New function, split from package-maybe-load-descriptor. |
| 93 | (package-maybe-load-descriptor): Use it. | 110 | (package-maybe-load-descriptor): Use it. |
| 94 | (package-download-transaction): Fully load required packages | 111 | (package-download-transaction): Fully load required packages |
| 95 | inside the loop, so that `require' calls work (Bug#10593). | 112 | inside the loop, so that `require' calls work (Bug#10593). |
| @@ -214,8 +231,8 @@ | |||
| 214 | 231 | ||
| 215 | 2012-01-21 Jérémy Compostella <jeremy.compostella@gmail.com> | 232 | 2012-01-21 Jérémy Compostella <jeremy.compostella@gmail.com> |
| 216 | 233 | ||
| 217 | * windmove.el (windmove-reference-loc): Fix | 234 | * windmove.el (windmove-reference-loc): |
| 218 | windmove-reference-loc miscalculation. | 235 | Fix windmove-reference-loc miscalculation. |
| 219 | 236 | ||
| 220 | 2012-01-21 Jay Belanger <jay.p.belanger@gmail.com> | 237 | 2012-01-21 Jay Belanger <jay.p.belanger@gmail.com> |
| 221 | 238 | ||
| @@ -271,8 +288,8 @@ | |||
| 271 | Eliminate sluggishness and hangs in fontification of "semicolon | 288 | Eliminate sluggishness and hangs in fontification of "semicolon |
| 272 | deserts". | 289 | deserts". |
| 273 | 290 | ||
| 274 | * progmodes/cc-engine.el (c-state-nonlit-pos-interval): change | 291 | * progmodes/cc-engine.el (c-state-nonlit-pos-interval): |
| 275 | value 10000 -> 3000. | 292 | Change value 10000 -> 3000. |
| 276 | (c-state-safe-place): Reformulate so it doesn't stack up an | 293 | (c-state-safe-place): Reformulate so it doesn't stack up an |
| 277 | infinite number of wrong entries in c-state-nonlit-pos-cache. | 294 | infinite number of wrong entries in c-state-nonlit-pos-cache. |
| 278 | (c-determine-limit-get-base, c-determine-limit): New functions to | 295 | (c-determine-limit-get-base, c-determine-limit): New functions to |
diff --git a/lisp/window.el b/lisp/window.el index 8e2c9451168..c9bddba942c 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -299,7 +299,7 @@ non-nil means only return a window whose window-parameter value | |||
| 299 | for PARAMETER equals VALUE (comparison is done with `equal'). | 299 | for PARAMETER equals VALUE (comparison is done with `equal'). |
| 300 | Optional argument ANY non-nil means consider internal windows | 300 | Optional argument ANY non-nil means consider internal windows |
| 301 | too." | 301 | too." |
| 302 | (let (this-value windows) | 302 | (let (this-value) |
| 303 | (catch 'found | 303 | (catch 'found |
| 304 | (walk-window-tree | 304 | (walk-window-tree |
| 305 | (lambda (window) | 305 | (lambda (window) |
| @@ -435,7 +435,7 @@ A valid configuration has to preserve the following invariant: | |||
| 435 | parent whose window-side parameter is nil and there must be no | 435 | parent whose window-side parameter is nil and there must be no |
| 436 | leaf window whose window-side parameter is nil." | 436 | leaf window whose window-side parameter is nil." |
| 437 | (let (normal none left top right bottom | 437 | (let (normal none left top right bottom |
| 438 | side parent parent-side code) | 438 | side parent parent-side) |
| 439 | (when (or (catch 'reset | 439 | (when (or (catch 'reset |
| 440 | (walk-window-tree | 440 | (walk-window-tree |
| 441 | (lambda (window) | 441 | (lambda (window) |
| @@ -1807,8 +1807,7 @@ preferably only resize windows adjacent to EDGE." | |||
| 1807 | (if (window-combined-p sub horizontal) | 1807 | (if (window-combined-p sub horizontal) |
| 1808 | ;; In an iso-combination try to extract DELTA from WINDOW's | 1808 | ;; In an iso-combination try to extract DELTA from WINDOW's |
| 1809 | ;; siblings. | 1809 | ;; siblings. |
| 1810 | (let ((first sub) | 1810 | (let ((skip (eq trail 'after)) |
| 1811 | (skip (eq trail 'after)) | ||
| 1812 | this-delta other-delta) | 1811 | this-delta other-delta) |
| 1813 | ;; Decide which windows shall be left alone. | 1812 | ;; Decide which windows shall be left alone. |
| 1814 | (while sub | 1813 | (while sub |
| @@ -1993,7 +1992,7 @@ move it as far as possible in the desired direction." | |||
| 1993 | (setq window (window-normalize-window window)) | 1992 | (setq window (window-normalize-window window)) |
| 1994 | (let ((frame (window-frame window)) | 1993 | (let ((frame (window-frame window)) |
| 1995 | (right window) | 1994 | (right window) |
| 1996 | left this-delta min-delta max-delta failed) | 1995 | left this-delta min-delta max-delta) |
| 1997 | ;; Find the edge we want to move. | 1996 | ;; Find the edge we want to move. |
| 1998 | (while (and (or (not (window-combined-p right horizontal)) | 1997 | (while (and (or (not (window-combined-p right horizontal)) |
| 1999 | (not (window-right right))) | 1998 | (not (window-right right))) |
| @@ -2309,9 +2308,8 @@ frame." | |||
| 2309 | (when (window-parameter window 'window-atom) | 2308 | (when (window-parameter window 'window-atom) |
| 2310 | (setq window (window-atom-root window)))) | 2309 | (setq window (window-atom-root window)))) |
| 2311 | 2310 | ||
| 2312 | (let* ((parent (window-parent window)) | 2311 | (let ((parent (window-parent window)) |
| 2313 | (frame (window-frame window)) | 2312 | (frame (window-frame window))) |
| 2314 | (buffer (window-buffer window))) | ||
| 2315 | (cond | 2313 | (cond |
| 2316 | ((frame-root-window-p window) | 2314 | ((frame-root-window-p window) |
| 2317 | ;; WINDOW's frame can be deleted only if there are other frames | 2315 | ;; WINDOW's frame can be deleted only if there are other frames |
| @@ -2798,8 +2796,7 @@ means the buffer shown in window will be killed. Return non-nil | |||
| 2798 | if WINDOW gets deleted or its frame is auto-hidden." | 2796 | if WINDOW gets deleted or its frame is auto-hidden." |
| 2799 | (setq window (window-normalize-window window t)) | 2797 | (setq window (window-normalize-window window t)) |
| 2800 | (unless (and dedicated-only (not (window-dedicated-p window))) | 2798 | (unless (and dedicated-only (not (window-dedicated-p window))) |
| 2801 | (let* ((buffer (window-buffer window)) | 2799 | (let ((deletable (window-deletable-p window))) |
| 2802 | (deletable (window-deletable-p window))) | ||
| 2803 | (cond | 2800 | (cond |
| 2804 | ((eq deletable 'frame) | 2801 | ((eq deletable 'frame) |
| 2805 | (let ((frame (window-frame window))) | 2802 | (let ((frame (window-frame window))) |
| @@ -3355,7 +3352,7 @@ is non-nil." | |||
| 3355 | (number-of-children 0) | 3352 | (number-of-children 0) |
| 3356 | (parent-size (window-new-total window)) | 3353 | (parent-size (window-new-total window)) |
| 3357 | (total-sum parent-size) | 3354 | (total-sum parent-size) |
| 3358 | found failed size sub-total sub-delta sub-amount rest) | 3355 | failed size sub-total sub-delta sub-amount rest) |
| 3359 | (while sub | 3356 | (while sub |
| 3360 | (setq number-of-children (1+ number-of-children)) | 3357 | (setq number-of-children (1+ number-of-children)) |
| 3361 | (when (window-size-fixed-p sub horizontal) | 3358 | (when (window-size-fixed-p sub horizontal) |
| @@ -3372,7 +3369,6 @@ is non-nil." | |||
| 3372 | (while (and sub (not failed)) | 3369 | (while (and sub (not failed)) |
| 3373 | ;; Ignore child windows that should be ignored or are stuck. | 3370 | ;; Ignore child windows that should be ignored or are stuck. |
| 3374 | (unless (window--resize-child-windows-skip-p sub) | 3371 | (unless (window--resize-child-windows-skip-p sub) |
| 3375 | (setq found t) | ||
| 3376 | (setq sub-total (window-total-size sub horizontal)) | 3372 | (setq sub-total (window-total-size sub horizontal)) |
| 3377 | (setq sub-delta (- size sub-total)) | 3373 | (setq sub-delta (- size sub-total)) |
| 3378 | (setq sub-amount | 3374 | (setq sub-amount |
| @@ -3736,7 +3732,6 @@ value can be also stored on disk and read back in a new session." | |||
| 3736 | "Helper function for `window-state-put'." | 3732 | "Helper function for `window-state-put'." |
| 3737 | (dolist (item window-state-put-list) | 3733 | (dolist (item window-state-put-list) |
| 3738 | (let ((window (car item)) | 3734 | (let ((window (car item)) |
| 3739 | (splits (cdr (assq 'splits item))) | ||
| 3740 | (combination-limit (cdr (assq 'combination-limit item))) | 3735 | (combination-limit (cdr (assq 'combination-limit item))) |
| 3741 | (parameters (cdr (assq 'parameters item))) | 3736 | (parameters (cdr (assq 'parameters item))) |
| 3742 | (state (cdr (assq 'buffer item)))) | 3737 | (state (cdr (assq 'buffer item)))) |
| @@ -3826,8 +3821,7 @@ windows can get as small as `window-safe-min-height' and | |||
| 3826 | (= (window-total-size window t) | 3821 | (= (window-total-size window t) |
| 3827 | (cdr (assq 'total-width state))))) | 3822 | (cdr (assq 'total-width state))))) |
| 3828 | (min-height (cdr (assq 'min-height head))) | 3823 | (min-height (cdr (assq 'min-height head))) |
| 3829 | (min-width (cdr (assq 'min-width head))) | 3824 | (min-width (cdr (assq 'min-width head)))) |
| 3830 | selected) | ||
| 3831 | (if (and (not totals) | 3825 | (if (and (not totals) |
| 3832 | (or (> min-height (window-total-size window)) | 3826 | (or (> min-height (window-total-size window)) |
| 3833 | (> min-width (window-total-size window t))) | 3827 | (> min-width (window-total-size window t))) |
| @@ -4244,7 +4238,7 @@ selected rather than (as usual) some other window. See | |||
| 4244 | ;; The elements of `same-window-regexps' can be regexps | 4238 | ;; The elements of `same-window-regexps' can be regexps |
| 4245 | ;; or cons cells whose cars are regexps. | 4239 | ;; or cons cells whose cars are regexps. |
| 4246 | (when (or (and (stringp regexp) | 4240 | (when (or (and (stringp regexp) |
| 4247 | (string-match regexp buffer-name)) | 4241 | (string-match-p regexp buffer-name)) |
| 4248 | (and (consp regexp) (stringp (car regexp)) | 4242 | (and (consp regexp) (stringp (car regexp)) |
| 4249 | (string-match-p (car regexp) buffer-name))) | 4243 | (string-match-p (car regexp) buffer-name))) |
| 4250 | (throw 'found t))))))) | 4244 | (throw 'found t))))))) |
| @@ -4602,8 +4596,7 @@ specified, e.g. by the user options `display-buffer-alist' or | |||
| 4602 | "Retrieve ALIST entry corresponding to BUFFER-NAME." | 4596 | "Retrieve ALIST entry corresponding to BUFFER-NAME." |
| 4603 | (catch 'match | 4597 | (catch 'match |
| 4604 | (dolist (entry alist) | 4598 | (dolist (entry alist) |
| 4605 | (let ((key (car entry)) | 4599 | (let ((key (car entry))) |
| 4606 | (value (cdr entry))) | ||
| 4607 | (when (or (and (stringp key) | 4600 | (when (or (and (stringp key) |
| 4608 | (string-match-p key buffer-name)) | 4601 | (string-match-p key buffer-name)) |
| 4609 | (and (symbolp key) (functionp key) | 4602 | (and (symbolp key) (functionp key) |
| @@ -4792,7 +4785,7 @@ See `display-buffer' for the format of display actions." | |||
| 4792 | (funcall special-display-function | 4785 | (funcall special-display-function |
| 4793 | buffer ',(if (listp pars) pars))))))))) | 4786 | buffer ',(if (listp pars) pars))))))))) |
| 4794 | 4787 | ||
| 4795 | (defun display-buffer-pop-up-frame (buffer alist) | 4788 | (defun display-buffer-pop-up-frame (buffer _alist) |
| 4796 | "Display BUFFER in a new frame. | 4789 | "Display BUFFER in a new frame. |
| 4797 | This works by calling `pop-up-frame-function'. If successful, | 4790 | This works by calling `pop-up-frame-function'. If successful, |
| 4798 | return the window used; otherwise return nil." | 4791 | return the window used; otherwise return nil." |
| @@ -4807,7 +4800,7 @@ return the window used; otherwise return nil." | |||
| 4807 | (set-window-prev-buffers window nil) | 4800 | (set-window-prev-buffers window nil) |
| 4808 | window))) | 4801 | window))) |
| 4809 | 4802 | ||
| 4810 | (defun display-buffer-pop-up-window (buffer alist) | 4803 | (defun display-buffer-pop-up-window (buffer _alist) |
| 4811 | "Display BUFFER by popping up a new window. | 4804 | "Display BUFFER by popping up a new window. |
| 4812 | The new window is created on the selected frame, or in | 4805 | The new window is created on the selected frame, or in |
| 4813 | `last-nonminibuffer-frame' if no windows can be created there. | 4806 | `last-nonminibuffer-frame' if no windows can be created there. |
| @@ -4910,8 +4903,7 @@ at the front of the list of recently selected ones." | |||
| 4910 | (if current-prefix-arg t))) | 4903 | (if current-prefix-arg t))) |
| 4911 | (setq buffer (window-normalize-buffer-to-switch-to buffer)) | 4904 | (setq buffer (window-normalize-buffer-to-switch-to buffer)) |
| 4912 | (set-buffer buffer) | 4905 | (set-buffer buffer) |
| 4913 | (let* ((old-window (selected-window)) | 4906 | (let* ((old-frame (selected-frame)) |
| 4914 | (old-frame (selected-frame)) | ||
| 4915 | (window (display-buffer buffer action)) | 4907 | (window (display-buffer buffer action)) |
| 4916 | (frame (window-frame window))) | 4908 | (frame (window-frame window))) |
| 4917 | ;; If we chose another frame, make sure it gets input focus. | 4909 | ;; If we chose another frame, make sure it gets input focus. |