diff options
| author | Eli Zaretskii | 2015-11-13 11:23:35 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-13 21:58:24 +0200 |
| commit | e0d2dc5fd7205dcfd9125a35a7dc4468d9f6b2af (patch) | |
| tree | 2dad6ce86cf4554fede26ead8ebe2cbada4862f7 | |
| parent | f8d8e0b7aac45706354dd0e4c8044ba4103ff208 (diff) | |
| download | emacs-e0d2dc5fd7205dcfd9125a35a7dc4468d9f6b2af.tar.gz emacs-e0d2dc5fd7205dcfd9125a35a7dc4468d9f6b2af.zip | |
Fix last change in shr.el
* lisp/net/shr.el (shr--have-one-fringe-p): Rename from
have-fringes-p. All callers changed. Doc fix. (Bug#21895)
Backport.
| -rw-r--r-- | lisp/net/shr.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 23e2dc1f874..a48d098fe26 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -203,9 +203,8 @@ cid: URL as the argument.") | |||
| 203 | (goto-char begin) | 203 | (goto-char begin) |
| 204 | (shr-insert-document dom)))) | 204 | (shr-insert-document dom)))) |
| 205 | 205 | ||
| 206 | (defun have-fringes-p () | 206 | (defun shr--have-one-fringe-p () |
| 207 | "Return t if fringe-columns is bound, and either (fringe-columns 'left) or | 207 | "Return non-nil if we know at least one of the fringes has non-zero width." |
| 208 | \(fringe-columns 'right) returns nonzero." | ||
| 209 | (and (fboundp 'fringe-columns) | 208 | (and (fboundp 'fringe-columns) |
| 210 | (or (not (zerop (fringe-columns 'right))) | 209 | (or (not (zerop (fringe-columns 'right))) |
| 211 | (not (zerop (fringe-columns 'left)))))) | 210 | (not (zerop (fringe-columns 'left)))))) |
| @@ -237,13 +236,13 @@ DOM should be a parse tree as generated by | |||
| 237 | (if (not shr-use-fonts) | 236 | (if (not shr-use-fonts) |
| 238 | (- (window-body-width) 1 | 237 | (- (window-body-width) 1 |
| 239 | (if (and (null shr-width) | 238 | (if (and (null shr-width) |
| 240 | (not (have-fringes-p))) | 239 | (not (shr--have-one-fringe-p))) |
| 241 | 0 | 240 | 0 |
| 242 | 1)) | 241 | 1)) |
| 243 | (- (window-body-width nil t) | 242 | (- (window-body-width nil t) |
| 244 | (* 2 (frame-char-width)) | 243 | (* 2 (frame-char-width)) |
| 245 | (if (and (null shr-width) | 244 | (if (and (null shr-width) |
| 246 | (not (have-fringes-p))) | 245 | (not (shr--have-one-fringe-p))) |
| 247 | (* (frame-char-width) 2) | 246 | (* (frame-char-width) 2) |
| 248 | 0)))))) | 247 | 0)))))) |
| 249 | (shr-descend dom) | 248 | (shr-descend dom) |
| @@ -467,7 +466,7 @@ size, and full-buffer size." | |||
| 467 | ;; to usurp one column for the | 466 | ;; to usurp one column for the |
| 468 | ;; continuation glyph. | 467 | ;; continuation glyph. |
| 469 | (if (and (null shr-width) | 468 | (if (and (null shr-width) |
| 470 | (not (have-fringes-p))) | 469 | (not (shr--have-one-fringe-p))) |
| 471 | (* (frame-char-width) 2) | 470 | (* (frame-char-width) 2) |
| 472 | 0)))) | 471 | 0)))) |
| 473 | (shr-insert text) | 472 | (shr-insert text) |