1578 |
|
|
1579 |
(defun preview-at-point () |
(defun preview-at-point () |
1580 |
"Do the appropriate preview thing at point. |
"Do the appropriate preview thing at point. |
1581 |
If point is positioned on or inside of a preview area, this |
If point is positioned on or inside of an unmodified preview area, |
1582 |
toggles its visibility, regenerating the preview if necessary. |
its visibility is toggled. |
1583 |
If not, it will run the surroundings through preview. The |
|
1584 |
surroundings include all areas up to the next valid preview, |
If not, the surroundings are run through preview. The |
1585 |
unless invalid previews occur before, in which case the area will |
surroundings don't extend into unmodified previews or past |
1586 |
include the last such preview. And overriding any other |
contiguous previews invalidated by modifications. |
1587 |
action, if a region is active (`transient-mark-mode' or |
|
1588 |
`zmacs-regions'), it is run through `preview-region'." |
Overriding any other action, if a region is |
1589 |
|
active (`transient-mark-mode' or `zmacs-regions'), it is run |
1590 |
|
through `preview-region'." |
1591 |
(interactive) |
(interactive) |
1592 |
(if (TeX-active-mark) |
(if (TeX-active-mark) |
1593 |
(preview-region (region-beginning) (region-end)) |
(preview-region (region-beginning) (region-end)) |
1596 |
(min (point-max) (1+ (point))))) |
(min (point-max) (1+ (point))))) |
1597 |
(let ((preview-state (overlay-get ovr 'preview-state))) |
(let ((preview-state (overlay-get ovr 'preview-state))) |
1598 |
(when preview-state |
(when preview-state |
1599 |
(if (eq preview-state 'disabled) |
(unless (eq preview-state 'disabled) |
1600 |
(preview-regenerate ovr) |
(preview-toggle ovr 'toggle) |
1601 |
(preview-toggle ovr 'toggle)) |
(throw 'exit t))))) |
|
(throw 'exit t)))) |
|
1602 |
(preview-region (preview-next-border t) |
(preview-region (preview-next-border t) |
1603 |
(preview-next-border nil))))) |
(preview-next-border nil))))) |
1604 |
|
|