From: Benjamin Riefenstahl Date: Sat, 12 Jan 2019 14:36:24 +0000 (+0100) Subject: image-mode: Make parameters buffer-local X-Git-Tag: emacs-27.0.90~3737 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76e454fe5f3bb288590c7bc8eca786946bb19d7c;p=emacs.git 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) --- 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'.") It is called with one argument, the initial WINPROPS.") ;; FIXME this doesn't seem mature yet. Document in manual when it is. -(defvar image-transform-resize nil +(defvar-local image-transform-resize nil "The image resize operation. Its value should be one of the following: - nil, meaning no resizing. @@ -61,10 +61,10 @@ Its value should be one of the following: - `fit-width', meaning to fit the image to the window width. - A number, which is a scale factor (the default size is 1).") -(defvar image-transform-scale 1.0 +(defvar-local image-transform-scale 1.0 "The scale factor of the image being displayed.") -(defvar image-transform-rotation 0.0 +(defvar-local image-transform-rotation 0.0 "Rotation angle for the image in the current Image mode buffer.") (defvar image-transform-right-angle-fudge 0.0001