diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-07-31T05·16+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-07-31T05·16+0800 |
commit | fc542bbcc9e703f7e187045f3620f08b46320be4 (patch) | |
tree | e5a1cc718407582c5779ee81f77ed5849c76bfe0 /exwm-workspace.el | |
parent | a3dba8edd9001e89e24c204b9186fdf8b444e78c (diff) |
; Eliminate compile warnings
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r-- | exwm-workspace.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el index 3e2fe1abb591..7c2601a3bc14 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -571,7 +571,8 @@ before it." (eq (elt exwm-workspace--list nth) exwm-workspace--current))) ;; 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)) ;; Update the _NET_WM_DESKTOP property of each X window affected. (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 ;; fail to retrieve the correct window. It's likely there are ;; other related issues. - (let ((window (get-buffer-window "*Completions*" exwm-workspace--current))) - (when window - (fit-window-to-buffer window nil nil nil nil t)))) + ;; This is not required by Emacs 24. + (when (fboundp 'window-preserve-size) + (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 () "Run in minibuffer-exit-hook to hide the minibuffer container." |