diff options
| author | Dave Love | 1999-10-13 17:38:18 +0000 |
|---|---|---|
| committer | Dave Love | 1999-10-13 17:38:18 +0000 |
| commit | 10e2102e561718aea1592224686a8fd8ca77dd3d (patch) | |
| tree | 413947656d0ee202b052bb39d2c15a60c8a0d7be | |
| parent | 8af8a9ca7c03bde417e6275c26a1b6898da29e0a (diff) | |
| download | emacs-10e2102e561718aea1592224686a8fd8ca77dd3d.tar.gz emacs-10e2102e561718aea1592224686a8fd8ca77dd3d.zip | |
(insert-image): Copy the image spec and add an intangible property.
| -rw-r--r-- | lisp/image.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/image.el b/lisp/image.el index bcbb91e365d..1e4aea4d709 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -132,10 +132,13 @@ means display it in the right marginal area." | |||
| 132 | (setq image (list (list 'margin area) image))) | 132 | (setq image (list (list 'margin area) image))) |
| 133 | (let ((start (point))) | 133 | (let ((start (point))) |
| 134 | (insert string) | 134 | (insert string) |
| 135 | ;; Copy `image' so that inserting it twice in a row (adjacently) | ||
| 136 | ;; displays two copies of the image. | ||
| 135 | (add-text-properties start (point) | 137 | (add-text-properties start (point) |
| 136 | (list 'display image | 138 | (list 'display (copy-sequence image) |
| 139 | 'intangible (list t) ; something unique | ||
| 137 | 'rear-nonsticky (list 'display))))) | 140 | 'rear-nonsticky (list 'display))))) |
| 138 | 141 | ||
| 139 | 142 | ||
| 140 | ;;;###autoload | 143 | ;;;###autoload |
| 141 | (defun remove-images (start end &optional buffer) | 144 | (defun remove-images (start end &optional buffer) |