diff options
| author | Miles Bader | 2000-10-20 12:21:30 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-10-20 12:21:30 +0000 |
| commit | ffb8fabb9ee0279f94d7781b0531bc9cc14b9ae5 (patch) | |
| tree | 60315394b36376330d36a323eb05069425a2afd0 /lisp | |
| parent | 8c6e4a58a3fec44eb11c3aded4d36d7ea742cda5 (diff) | |
| download | emacs-ffb8fabb9ee0279f94d7781b0531bc9cc14b9ae5.tar.gz emacs-ffb8fabb9ee0279f94d7781b0531bc9cc14b9ae5.zip | |
(height-affecting-face-attributes): Use `defconst'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/window.el | 23 |
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. |
| 274 | This is added to the sizes of windows in some cases to compensate for the | 274 | If non-nil, it should be the number of lines to add to the sizes of |
| 275 | extra height of mode-lines on graphic display, so they don't obscure the | 275 | windows to compensate for the extra height of the mode-line, so it |
| 276 | last line of text. | 276 | doesn't't obscure the last line of text. |
| 277 | 277 | ||
| 278 | If nil, an attempt is made to calculate reasonable value. | 278 | If 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. |
| 291 | On a non-graphic display, return 0. | 291 | On a non-graphic display, return 0. |
| 292 | 292 | ||
| 293 | If the variable `mode-line-window-height-fudge' has a non-nil value, it | ||
| 294 | is returned. Otherwise, the `mode-line' face is checked to see if it | ||
| 295 | contains any attributes that might affect its height; if it does, 1 is | ||
| 296 | returned, otherwise 0. | ||
| 297 | |||
| 298 | \[Because mode-lines on a graphics capable display may have a height | ||
| 299 | larger than a normal text line, a window who's size is calculated to | ||
| 300 | exactly show some text, including 1 line for the mode-line, may be | ||
| 301 | displayed with the last text line obscured by the mode-line. | ||
| 302 | |||
| 303 | To work-around this problem, call `mode-line-window-height-fudge', and | ||
| 304 | add the return value to the requested window size.] | ||
| 305 | |||
| 293 | This is a kluge." | 306 | This is a kluge." |
| 294 | (if (display-graphic-p) | 307 | (if (display-graphic-p) |
| 295 | (or | 308 | (or |