Skip to content

Commit

Permalink
Move window-full-height-p up with other compatibility hacks
Browse files Browse the repository at this point in the history
- also check for (not (fboundp 'window-full-height-p)) instead
  of (featurep 'xemacs)
  • Loading branch information
joddie committed Oct 11, 2012
1 parent c3e13f0 commit 2dc71de
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions gnuplot.el
Expand Up @@ -391,6 +391,16 @@ real work."
'(gnuplot-comint-complete)))
(comint-dynamic-complete))))

;; Work around window-full-height-p
(if (not (fboundp 'window-full-height-p))
;; The below is taken from GNU Emacs window.el
(defun gnuplot-window-full-height-p (&optional window)
(unless window
(setq window (selected-window)))
(= (window-height window)
(window-height (frame-root-window (window-frame window)))))
(defalias 'gnuplot-window-full-height-p 'window-full-height-p))

;; Workaround for differing eval-after-load behavior
(defun gnuplot--run-after-load (fun)
(if (featurep 'gnuplot)
Expand Down Expand Up @@ -2883,15 +2893,6 @@ the frame."
(if gnuplot-xemacs-p (setq toolbar-info-frame gnuplot-info-frame))
(switch-to-buffer "*info*"))))))

;; XEmacs doesn't have window-full-height-p
(if (featurep 'xemacs)
;; The below is taken from GNU Emacs window.el
(defun gnuplot-window-full-height-p (&optional window)
(unless window
(setq window (selected-window)))
(= (window-height window)
(window-height (frame-root-window (window-frame window)))))
(defalias 'gnuplot-window-full-height-p 'window-full-height-p))

(defun gnuplot-insert (string)
"Insert STRING at point and display help for for STRING.
Expand Down

0 comments on commit 2dc71de

Please sign in to comment.