aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/proof-utils.el
diff options
context:
space:
mode:
authorGravatar Stefan Monnier <monnier@iro.umontreal.ca>2018-12-11 18:48:51 -0500
committerGravatar Clément Pit-Claudel <clement.pitclaudel@live.com>2018-12-12 12:28:39 -0500
commita921439a4eb5b0d96182748e779c78e2f6a41a5f (patch)
treea887ed306e13a0bcf21a939166322819bf669281 /generic/proof-utils.el
parent05df29f7ff065d8da45b81691c602b6cf075e4a0 (diff)
Cleanup patch; Moving defvar to toplevel
Move `defvar`s used to silence warnings outside of eval-when-compile. Make sure they don't actually give a value to the var. * pg-init.el: Simplify. Use (if t ...) to avoid running `require` at compile-time. Don't add subdirs to load-path here since this code is never used. (pg-init--script-full-path, pg-init--pg-root): Inline their definition into their sole user. * generic/proof-utils.el (proof-resize-window-tofit): Inline definitions of window-leftmost-p and window-rightmost-p previously in proof-compat.el. * lib/proof-compat.el (proof-running-on-win32): Remove, not used. (mac-key-mode): Remove, there's no carbon-emacs-package-version in Emacs≥24.3. (pg-custom-undeclare-variable): Use dolist. (save-selected-frame): Remove, save-selected-window also saves&restores the selected frame at the same time. Update all users (which already used save-selected-window around it). (window-leftmost-p, window-rightmost-p, window-bottom-p) (find-coding-system): Remove, unused. * hol-light/hol-light.el (caml-font-lock-keywords): Don't try to defvar it to a dummy value and... (hol-light): ...check its existence before using it instead. * coq/coq.el (coq-may-use-prettify): Simplify initialization.
Diffstat (limited to 'generic/proof-utils.el')
-rw-r--r--generic/proof-utils.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index b4e7e0d1..a2c29824 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -3,7 +3,7 @@
;; This file is part of Proof General.
;; Portions © Copyright 1994-2012 David Aspinall and University of Edinburgh
-;; Portions © Copyright 2003, 2012, 2014 Free Software Foundation, Inc.
+;; Portions © Copyright 2003-2018 Free Software Foundation, Inc.
;; Portions © Copyright 2001-2017 Pierre Courtieu
;; Portions © Copyright 2010, 2016 Erik Martin-Dorel
;; Portions © Copyright 2011-2013, 2016-2017 Hendrik Tews
@@ -40,7 +40,7 @@
(if (or (not (boundp 'emacs-major-version))
(< emacs-major-version 23)
- (string-match "XEmacs" emacs-version))
+ (featurep 'xemacs))
(error "Proof General is not compatible with Emacs %s" emacs-version))
(unless (equal pg-compiled-for (pg-emacs-version-cookie))
@@ -399,8 +399,9 @@ or if the window is the only window of its frame."
(select-window window))))
;; the window is the full width, right?
;; [if not, we may be in horiz-split scheme, problematic]
- (not (window-leftmost-p window))
- (not (window-rightmost-p window)))
+ (not (zerop (car (window-edges window)))) ;not leftmost
+ (not (>= (nth 2 (window-edges window)) ;not rightmost
+ (frame-width (window-frame window)))))
;; OK, we're not going to adjust the height here. Moreover,
;; we'll make sure the height can be changed elsewhere.
(setq window-size-fixed nil)