diff options
| author | Karl Heuer | 1996-02-21 21:25:01 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-02-21 21:25:01 +0000 |
| commit | d8fc5f64984669b61f21bc7c14c442ea5d326ccd (patch) | |
| tree | f481c7ee50f3415e3f984f11130254525736354f | |
| parent | 7bf5350d2dfabe3fb130735b06091b0a2cf92a20 (diff) | |
| download | emacs-d8fc5f64984669b61f21bc7c14c442ea5d326ccd.tar.gz emacs-d8fc5f64984669b61f21bc7c14c442ea5d326ccd.zip | |
(ps-generate-postscript-with-faces):
Handle buffer-invisibility-spec when interpreting the invisible prop.
| -rw-r--r-- | lisp/ps-print.el | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index b1b13ccc2a1..1f64b51c974 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -1760,8 +1760,20 @@ EndDSCPage\n")) | |||
| 1760 | (min (next-overlay-change from) to))) | 1760 | (min (next-overlay-change from) to))) |
| 1761 | (setq position | 1761 | (setq position |
| 1762 | (min property-change overlay-change)) | 1762 | (min property-change overlay-change)) |
| 1763 | ;; The code below is not quite correct, | ||
| 1764 | ;; because a non-nil overlay invisible property | ||
| 1765 | ;; which is inactive according to the current value | ||
| 1766 | ;; of buffer-invisibility-spec nonetheless overrides | ||
| 1767 | ;; a face text property. | ||
| 1763 | (setq face | 1768 | (setq face |
| 1764 | (cond ((get-text-property from 'invisible) nil) | 1769 | (cond ((let ((prop (get-text-property from 'invisible))) |
| 1770 | ;; Decide whether this invisible property | ||
| 1771 | ;; really makes the text invisible. | ||
| 1772 | (if (eq buffer-invisibility-spec t) | ||
| 1773 | (not (null prop)) | ||
| 1774 | (or (memq prop buffer-invisibility-spec) | ||
| 1775 | (assq prop buffer-invisibility-spec)))) | ||
| 1776 | nil) | ||
| 1765 | ((get-text-property from 'face)) | 1777 | ((get-text-property from 'face)) |
| 1766 | (t 'default))) | 1778 | (t 'default))) |
| 1767 | (let ((overlays (overlays-at from)) | 1779 | (let ((overlays (overlays-at from)) |
| @@ -1775,7 +1787,11 @@ EndDSCPage\n")) | |||
| 1775 | 0))) | 1787 | 0))) |
| 1776 | (if (and (or overlay-invisible overlay-face) | 1788 | (if (and (or overlay-invisible overlay-face) |
| 1777 | (> overlay-priority face-priority)) | 1789 | (> overlay-priority face-priority)) |
| 1778 | (setq face (cond (overlay-invisible nil) | 1790 | (setq face (cond ((if (eq buffer-invisibility-spec t) |
| 1791 | (not (null overlay-invisible)) | ||
| 1792 | (or (memq overlay-invisible buffer-invisibility-spec) | ||
| 1793 | (assq overlay-invisible buffer-invisibility-spec))) | ||
| 1794 | nil) | ||
| 1779 | ((and face overlay-face))) | 1795 | ((and face overlay-face))) |
| 1780 | face-priority overlay-priority))) | 1796 | face-priority overlay-priority))) |
| 1781 | (setq overlays (cdr overlays)))) | 1797 | (setq overlays (cdr overlays)))) |