emacs-diffs
[Top][All Lists]
Advanced

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

master 7eb8596ff5f: ; Fix warnings in a tty-only build on MS-Windows


From: Eli Zaretskii
Subject: master 7eb8596ff5f: ; Fix warnings in a tty-only build on MS-Windows
Date: Sun, 5 Jan 2025 04:04:13 -0500 (EST)

branch: master
commit 7eb8596ff5f1964f91664a6b7cac3199a5af5ba7
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Fix warnings in a tty-only build on MS-Windows
    
    * lisp/org/org.el (dnd-open-local-file):
    * lisp/dired.el (tool-bar--image-expression):
    * lisp/term/android-win.el (x-handle-args): Declare.
    * lisp/w32-fns.el (w32-system-shells):
    (w32-allow-system-shell):
    * lisp/net/shr.el (image-scaling-factor):
    * lisp/net/eww.el (image-scaling-factor):
    * lisp/image.el (image-scaling-factor): Defvar.
    (image-recompute-map-p): Move to before the first use.
    Reported by Angelo Graziosi <angelo.g0@libero.it>.
---
 lisp/dired.el            |  1 +
 lisp/image.el            | 11 ++++++-----
 lisp/net/eww.el          |  1 +
 lisp/net/shr.el          |  1 +
 lisp/org/org.el          |  2 ++
 lisp/term/android-win.el |  1 +
 lisp/w32-fns.el          |  2 ++
 7 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/lisp/dired.el b/lisp/dired.el
index d8ad74d3fd1..bab5e833a76 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -5268,6 +5268,7 @@ Interactively with prefix argument, read FILE-NAME."
 (declare-function Man-getpage-in-background "man" (topic))
 (defvar Man-support-remote-systems) ; from man.el
 (defvar manual-program) ; from man.el
+(declare-function tool-bar--image-expression "tool-bar" (icon))
 
 (defun dired-do-man ()
   "In Dired, run `man' on this file."
diff --git a/lisp/image.el b/lisp/image.el
index 8174b898fef..40d1364430f 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -158,6 +158,11 @@ or \"ffmpeg\") is installed."
   :type 'boolean
   :version "27.1")
 
+(defcustom image-recompute-map-p t
+  "Recompute image map when scaling, rotating, or flipping an image."
+  :type 'boolean
+  :version "30.1")
+
 (define-error 'unknown-image-type "Unknown image type")
 
 (defvar-keymap image-slice-map
@@ -608,6 +613,7 @@ properties specific to certain image types."
   (declare (gv-setter image--set-property))
   (plist-get (cdr image) property))
 
+(defvar image-scaling-factor)
 (defun image-compute-scaling-factor (&optional scaling)
   "Compute the scaling factor based on SCALING.
 If a number, use that.  If it's `auto', compute the factor.
@@ -1416,11 +1422,6 @@ is recomputed to fit the newly transformed image."
 
 ;;; Map transformation
 
-(defcustom image-recompute-map-p t
-  "Recompute image map when scaling, rotating, or flipping an image."
-  :type 'boolean
-  :version "30.1")
-
 (defsubst image--compute-rotation (image)
   "Return the current rotation of IMAGE, or 0 if no rotation.
 Also return nil if rotation is not a multiples of 90 degrees (0, 90,
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 95513a67acd..0c23ebc19cd 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1422,6 +1422,7 @@ within text input fields."
 (declare-function imagep "image.c")
 (defvar text-scale-mode)
 (defvar text-scale-mode-amount)
+(defvar image-scaling-factor)
 (defun eww--rescale-images ()
   (let ((scaling (if text-scale-mode
                      (+ 1 (* text-scale-mode-amount 0.1))
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 24c779524dc..8cc95ea6966 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1276,6 +1276,7 @@ not, `imagemagick' is preferred if it's present."
       nil
     'imagemagick))
 
+(defvar image-scaling-factor)
 (defun shr-rescale-image (data content-type width height
                                &optional max-width max-height)
   "Rescale DATA, if too big, to fit the current buffer.
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 6a8a45a9e4f..a11eee94297 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -20917,6 +20917,8 @@ URLS is a list of file URL."
 
 (put 'org--dnd-multi-local-file-handler 'dnd-multiple-handler t)
 
+(declare-function dnd-open-local-file "dnd" (uri action))
+
 (defun org--dnd-local-file-handler (url action &optional separator)
   "Handle file URL as per ACTION.
 SEPARATOR is the string to insert after each link.  It may be nil
diff --git a/lisp/term/android-win.el b/lisp/term/android-win.el
index 3529124d2be..8e58f8911a0 100644
--- a/lisp/term/android-win.el
+++ b/lisp/term/android-win.el
@@ -42,6 +42,7 @@
 (add-to-list 'display-format-alist '(".*" . android))
 
 (declare-function android-get-connection "androidfns.c")
+(declare-function x-handle-args "common-win" (args))
 
 ;; Window system initialization.  This is extremely simple because all
 ;; initialization is done in android_term_init.
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index d7958d3762b..5a4c5f52ab4 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -49,6 +49,8 @@
       (and (fboundp 'w32-using-nt) (w32-using-nt) "cmd.exe")
       "command.com"))
 
+(defvar w32-system-shells)       ;; defined in w32-vars.el
+(defvar w32-allow-system-shell)  ;; defined in w32-vars.el
 (defun w32-system-shell-p (shell-name)
   (and shell-name
        (member (downcase (file-name-nondirectory shell-name))



reply via email to

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