diff options
| author | Benjamin Riefenstahl | 2019-01-12 15:36:24 +0100 |
|---|---|---|
| committer | Eli Zaretskii | 2019-01-25 10:26:37 +0200 |
| commit | 76e454fe5f3bb288590c7bc8eca786946bb19d7c (patch) | |
| tree | 8e1069b33b2df51f879520d81ecd0e8350ae7d1e | |
| parent | 7960951d5df714957bcfff82df77a94a6ee8960b (diff) | |
| download | emacs-76e454fe5f3bb288590c7bc8eca786946bb19d7c.tar.gz emacs-76e454fe5f3bb288590c7bc8eca786946bb19d7c.zip | |
image-mode: Make parameters buffer-local
Image parameters were treated as image specific, but because they
actually were global variables, their behaviour transfered to new
images.
* lisp/image-mode.el (image-transform-resize, image-transform-scale)
(image-transform-rotation): Declare with defvar-local. (Bug#33990)
| -rw-r--r-- | lisp/image-mode.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 3570c7cba4b..3be515d9143 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -53,7 +53,7 @@ See `image-mode-winprops'.") | |||
| 53 | It is called with one argument, the initial WINPROPS.") | 53 | It is called with one argument, the initial WINPROPS.") |
| 54 | 54 | ||
| 55 | ;; FIXME this doesn't seem mature yet. Document in manual when it is. | 55 | ;; FIXME this doesn't seem mature yet. Document in manual when it is. |
| 56 | (defvar image-transform-resize nil | 56 | (defvar-local image-transform-resize nil |
| 57 | "The image resize operation. | 57 | "The image resize operation. |
| 58 | Its value should be one of the following: | 58 | Its value should be one of the following: |
| 59 | - nil, meaning no resizing. | 59 | - nil, meaning no resizing. |
| @@ -61,10 +61,10 @@ Its value should be one of the following: | |||
| 61 | - `fit-width', meaning to fit the image to the window width. | 61 | - `fit-width', meaning to fit the image to the window width. |
| 62 | - A number, which is a scale factor (the default size is 1).") | 62 | - A number, which is a scale factor (the default size is 1).") |
| 63 | 63 | ||
| 64 | (defvar image-transform-scale 1.0 | 64 | (defvar-local image-transform-scale 1.0 |
| 65 | "The scale factor of the image being displayed.") | 65 | "The scale factor of the image being displayed.") |
| 66 | 66 | ||
| 67 | (defvar image-transform-rotation 0.0 | 67 | (defvar-local image-transform-rotation 0.0 |
| 68 | "Rotation angle for the image in the current Image mode buffer.") | 68 | "Rotation angle for the image in the current Image mode buffer.") |
| 69 | 69 | ||
| 70 | (defvar image-transform-right-angle-fudge 0.0001 | 70 | (defvar image-transform-right-angle-fudge 0.0001 |