; Eliminate compile warnings

This commit is contained in:
Chris Feng 2016-07-31 13:16:51 +08:00
parent a3dba8edd9
commit fc542bbcc9
2 changed files with 10 additions and 5 deletions

View file

@ -135,6 +135,7 @@ This value should always be overwritten.")
(declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el") (declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el")
(declare-function exwm-workspace-switch "exwm-workspace.el" (declare-function exwm-workspace-switch "exwm-workspace.el"
(frame-or-index &optional force)) (frame-or-index &optional force))
(declare-function exwm-workspace--workspace-p "exwm-workspace.el" (workspace))
(defun exwm-input--update-focus (window) (defun exwm-input--update-focus (window)
"Update input focus." "Update input focus."
@ -209,7 +210,6 @@ This value should always be overwritten.")
(declare-function exwm-floating--start-moveresize "exwm-floating.el" (declare-function exwm-floating--start-moveresize "exwm-floating.el"
(id &optional type)) (id &optional type))
(declare-function exwm-workspace--position "exwm-workspace.el" (frame)) (declare-function exwm-workspace--position "exwm-workspace.el" (frame))
(declare-function exwm-workspace--workspace-p "exwm-workspace.el" (workspace))
(defvar exwm-workspace--list) (defvar exwm-workspace--list)

View file

@ -571,7 +571,8 @@ before it."
(eq (elt exwm-workspace--list nth) (eq (elt exwm-workspace--list nth)
exwm-workspace--current))) exwm-workspace--current)))
;; Do the move. ;; Do the move.
(pop (nthcdr pos exwm-workspace--list)) (with-no-warnings ;For Emacs 24.
(pop (nthcdr pos exwm-workspace--list)))
(push workspace (nthcdr nth exwm-workspace--list)) (push workspace (nthcdr nth exwm-workspace--list))
;; Update the _NET_WM_DESKTOP property of each X window affected. ;; Update the _NET_WM_DESKTOP property of each X window affected.
(setq start (min pos nth) (setq start (min pos nth)
@ -994,9 +995,13 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
;; frame is the 'selected frame'. `get-buffer-window' will ;; frame is the 'selected frame'. `get-buffer-window' will
;; fail to retrieve the correct window. It's likely there are ;; fail to retrieve the correct window. It's likely there are
;; other related issues. ;; other related issues.
(let ((window (get-buffer-window "*Completions*" exwm-workspace--current))) ;; This is not required by Emacs 24.
(when window (when (fboundp 'window-preserve-size)
(fit-window-to-buffer window nil nil nil nil t)))) (let ((window (get-buffer-window "*Completions*"
exwm-workspace--current)))
(when window
(fit-window-to-buffer window)
(window-preserve-size window)))))
(defun exwm-workspace--on-minibuffer-exit () (defun exwm-workspace--on-minibuffer-exit ()
"Run in minibuffer-exit-hook to hide the minibuffer container." "Run in minibuffer-exit-hook to hide the minibuffer container."