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'.
This commit is contained in:
parent
907201af57
commit
cb882333c2
2 changed files with 37 additions and 28 deletions
|
@ -1,3 +1,20 @@
|
|||
2012-01-29 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* 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 <eliz@gnu.org>
|
||||
|
||||
* jka-cmpr-hook.el (jka-compr-compression-info-list): Support .lz
|
||||
|
@ -88,8 +105,8 @@
|
|||
|
||||
2012-01-28 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* 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 <jeremy.compostella@gmail.com>
|
||||
|
||||
* 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 <jay.p.belanger@gmail.com>
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -299,7 +299,7 @@ non-nil means only return a window whose window-parameter value
|
|||
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 @@ A valid configuration has to preserve the following invariant:
|
|||
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 @@ preferably only resize windows adjacent to EDGE."
|
|||
(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 @@ move it as far as possible in the desired direction."
|
|||
(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 @@ frame."
|
|||
(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 @@ means the buffer shown in window will be killed. Return non-nil
|
|||
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 @@ is non-nil."
|
|||
(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 @@ is non-nil."
|
|||
(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 @@ value can be also stored on disk and read back in a new session."
|
|||
"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 @@ windows can get as small as `window-safe-min-height' and
|
|||
(= (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 @@ selected rather than (as usual) some other window. See
|
|||
;; 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 @@ specified, e.g. by the user options `display-buffer-alist' or
|
|||
"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 @@ See `display-buffer' for the format of display actions."
|
|||
(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 @@ return the window used; otherwise return nil."
|
|||
(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 @@ at the front of the list of recently selected ones."
|
|||
(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.
|
||||
|
|
Loading…
Add table
Reference in a new issue