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

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

[nongnu] elpa/eglot-inactive-regions 437d09e552 53/66: revert to depreca


From: ELPA Syncer
Subject: [nongnu] elpa/eglot-inactive-regions 437d09e552 53/66: revert to deprecated eglot functions
Date: Fri, 6 Dec 2024 06:59:57 -0500 (EST)

branch: elpa/eglot-inactive-regions
commit 437d09e5526ff25eccb0b161b38a967039740264
Author: Filippo Argiolas <filippo.argiolas@gmail.com>
Commit: Filippo Argiolas <filippo.argiolas@gmail.com>

    revert to deprecated eglot functions
    
    keep using private eglot obsolete aliases for 29.1 backwards compat
---
 eglot-inactive-regions.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/eglot-inactive-regions.el b/eglot-inactive-regions.el
index 20b230b6b6..2e3dd984c9 100644
--- a/eglot-inactive-regions.el
+++ b/eglot-inactive-regions.el
@@ -49,12 +49,13 @@
 (require 'color)
 (require 'font-lock)
 
-(defgroup inactive-regions nil "Eglot Inactive Regions."
+(defgroup inactive-regions nil
+  "Eglot Inactive Regions."
   :group 'tools
   :prefix "eglot-inactive-regions-")
 
 (defun eglot-inactive-regions--set-and-refresh (sym val)
-  "Set custom variable SYM to value VAL trigger a refresh of all active 
buffers."
+  "Set custom variable SYM to value VAL and trigger a refresh of all active 
buffers."
   (set sym val)
   (when (fboundp 'eglot-inactive-regions-refresh-all)
     (eglot-inactive-regions-refresh-all)))
@@ -77,7 +78,7 @@ background face.  The higher the less visible the shading 
will be."
   :group 'inactive-regions)
 
 (defcustom eglot-inactive-regions-method 'darken-foreground
-    "Shading method to apply to the inactive code regions.
+  "Shading method to apply to the inactive code regions.
 Allowed methods:
 - darken-foreground: dim foreground color
 - shade-background: shade background color
@@ -159,9 +160,9 @@ factor."
         (to-rgb (color-name-to-rgb to-color))
         (alpha (min 1.0 (max 0.0 alpha))))
     (if (and from-rgb to-rgb)
-      (apply 'color-rgb-to-hex
-             (cl-mapcar #'(lambda (a b) (+ (* a alpha) (* b (- 1.0 alpha))))
-                        from-rgb to-rgb))
+        (apply 'color-rgb-to-hex
+               (cl-mapcar #'(lambda (a b) (+ (* a alpha) (* b (- 1.0 alpha))))
+                          from-rgb to-rgb))
       'unspecified)))
 
 (defun eglot-inactive-regions-cleanup ()
@@ -321,7 +322,7 @@ Useful to update colors after a face or theme change."
 
 (defun eglot-inactive-regions--handle-notification (uri regions)
   "Update inactive REGIONS for the buffer corresponding to URI."
-  (if-let* ((path (expand-file-name (eglot-uri-to-path uri)))
+  (if-let* ((path (expand-file-name (eglot--uri-to-path uri)))
             (buffer (find-buffer-visiting path)))
       (with-current-buffer buffer
         (when eglot-inactive-regions-mode
@@ -330,7 +331,7 @@ Useful to update colors after a face or theme change."
           (setq eglot-inactive-regions--ranges '())
           (cl-loop
            for r across regions
-           for (beg . end) = (eglot-range-region r)
+           for (beg . end) = (eglot--range-region r)
            do
            (push (cons beg end) eglot-inactive-regions--ranges))
           (eglot-inactive-regions-refresh)))))



reply via email to

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