aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2000-10-20 12:21:30 +0000
committerMiles Bader2000-10-20 12:21:30 +0000
commitffb8fabb9ee0279f94d7781b0531bc9cc14b9ae5 (patch)
tree60315394b36376330d36a323eb05069425a2afd0 /lisp
parent8c6e4a58a3fec44eb11c3aded4d36d7ea742cda5 (diff)
downloademacs-ffb8fabb9ee0279f94d7781b0531bc9cc14b9ae5.tar.gz
emacs-ffb8fabb9ee0279f94d7781b0531bc9cc14b9ae5.zip
(height-affecting-face-attributes): Use `defconst'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/window.el23
1 files changed, 18 insertions, 5 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 71d66c551d0..e2d871c7033 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -270,10 +270,10 @@ to the window's right, if any. No arg means split equally."
270 (split-window-save-restore-data (split-window nil size t) old-w))) 270 (split-window-save-restore-data (split-window nil size t) old-w)))
271 271
272(defcustom mode-line-window-height-fudge nil 272(defcustom mode-line-window-height-fudge nil
273 "*Amount returned by `mode-line-window-height-fudge' on graphic displays. 273 "*Fudge factor returned by `mode-line-window-height-fudge' on graphic displays.
274This is added to the sizes of windows in some cases to compensate for the 274If non-nil, it should be the number of lines to add to the sizes of
275extra height of mode-lines on graphic display, so they don't obscure the 275windows to compensate for the extra height of the mode-line, so it
276last line of text. 276doesn't't obscure the last line of text.
277 277
278If nil, an attempt is made to calculate reasonable value. 278If nil, an attempt is made to calculate reasonable value.
279 279
@@ -283,13 +283,26 @@ This is a kluge."
283 :group 'windows) 283 :group 'windows)
284 284
285;; List of face attributes that might change a face's height 285;; List of face attributes that might change a face's height
286(defvar height-affecting-face-attributes 286(defconst height-affecting-face-attributes
287 '(:family :height :box :font :inherit)) 287 '(:family :height :box :font :inherit))
288 288
289(defsubst mode-line-window-height-fudge () 289(defsubst mode-line-window-height-fudge ()
290 "Return a fudge factor to compensate for the extra height of graphic mode-lines. 290 "Return a fudge factor to compensate for the extra height of graphic mode-lines.
291On a non-graphic display, return 0. 291On a non-graphic display, return 0.
292 292
293If the variable `mode-line-window-height-fudge' has a non-nil value, it
294is returned. Otherwise, the `mode-line' face is checked to see if it
295contains any attributes that might affect its height; if it does, 1 is
296returned, otherwise 0.
297
298\[Because mode-lines on a graphics capable display may have a height
299larger than a normal text line, a window who's size is calculated to
300exactly show some text, including 1 line for the mode-line, may be
301displayed with the last text line obscured by the mode-line.
302
303To work-around this problem, call `mode-line-window-height-fudge', and
304add the return value to the requested window size.]
305
293This is a kluge." 306This is a kluge."
294 (if (display-graphic-p) 307 (if (display-graphic-p)
295 (or 308 (or