emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/scanner 43cf030 5/5: explicitly set variables modified


From: Stefan Monnier
Subject: [elpa] externals/scanner 43cf030 5/5: explicitly set variables modified with plist-put
Date: Mon, 15 Mar 2021 22:22:23 -0400 (EDT)

branch: externals/scanner
commit 43cf030c7338d59f42b90c2d45e2eb7755623447
Author: Raffael Stocker <r.stocker@mnet-mail.de>
Commit: Raffael Stocker <r.stocker@mnet-mail.de>

    explicitly set variables modified with plist-put
    
    ‘plist-put’ doesn't guarantee to keep the structure of a plist intact, so we
    explicitly set the list to its value to be sure.
    * scanner.el (scanner-set-image-resolution): explicitly set 
scanner-resolution
             (scanner-set-document-resolution): ditto
---
 scanner.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scanner.el b/scanner.el
index 5a755d7..422b652 100644
--- a/scanner.el
+++ b/scanner.el
@@ -529,13 +529,15 @@ them.  Otherwise, return nil."
 (defun scanner-set-image-resolution (resolution)
   "Set the RESOLUTION for scanning images."
   (interactive "NImage scan resolution: ")
-  (plist-put scanner-resolution :image resolution))
+  (setq scanner-resolution
+               (plist-put scanner-resolution :image resolution)))
 
 ;;;###autoload
 (defun scanner-set-document-resolution (resolution)
   "Set the RESOLUTION for scanning documents."
   (interactive "NDocument scan resolution: ")
-  (plist-put scanner-resolution :doc resolution))
+  (setq scanner-resolution
+               (plist-put scanner-resolution :doc resolution)))
 
 ;;;###autoload
 (defun scanner-select-device (device)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]