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

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

[nongnu] elpa/golden-ratio 375c9f287d 3/3: Merge pull request #91 from p


From: ELPA Syncer
Subject: [nongnu] elpa/golden-ratio 375c9f287d 3/3: Merge pull request #91 from pataquets/use-cl-lib
Date: Tue, 12 Sep 2023 15:59:36 -0400 (EDT)

branch: elpa/golden-ratio
commit 375c9f287dfad68829582c1e0a67d0c18119dab9
Merge: 749b313cf2 d50d2aab3e
Author: Roman Gonzalez <roman@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #91 from pataquets/use-cl-lib
    
    Switch from 'cl' to 'cl-lib' to supress warnings.
---
 golden-ratio.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/golden-ratio.el b/golden-ratio.el
index 671e06d241..b13117a376 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -32,7 +32,7 @@
 ;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 (defconst golden-ratio--value 1.618
   "The golden ratio value itself.")
@@ -155,8 +155,8 @@ will prevent the window to be resized to the golden ratio."
 (defun golden-ratio--resize-window (dimensions &optional window)
   (with-selected-window (or window (selected-window))
     (let* ((m (window-margins))
-           (nrow  (floor (- (first  dimensions) (window-height))))
-           (ncol  (floor (- (second dimensions) (+ (window-width) (or (car m) 
0) (or (cdr m) 0))))))
+           (nrow  (floor (- (cl-first  dimensions) (window-height))))
+           (ncol  (floor (- (cl-second dimensions) (+ (window-width) (or (car 
m) 0) (or (cdr m) 0))))))
       (when (and (> nrow golden-ratio-minimal-height-change)
                  (window-resizable-p (selected-window) nrow))
         (enlarge-window nrow))
@@ -181,11 +181,11 @@ will prevent the window to be resized to the golden 
ratio."
               (member (buffer-name)
                       golden-ratio-exclude-buffer-names)
               (and golden-ratio-exclude-buffer-regexp
-                (loop for r in golden-ratio-exclude-buffer-regexp
+                (cl-loop for r in golden-ratio-exclude-buffer-regexp
                          thereis (string-match r (buffer-name))))
               (and golden-ratio-inhibit-functions
-                   (loop for fun in golden-ratio-inhibit-functions
-                         thereis (funcall fun))))
+                   (cl-loop for fun in golden-ratio-inhibit-functions
+                            thereis (funcall fun))))
     (let ((dims (golden-ratio--dimensions))
           (golden-ratio-mode nil))
       ;; Always disable `golden-ratio-mode' to avoid
@@ -210,9 +210,9 @@ will prevent the window to be resized to the golden ratio."
 (defun golden-ratio--post-command-hook ()
   (when (or (memq this-command golden-ratio-extra-commands)
             (and (consp this-command) ; A lambda form.
-                 (loop for com in golden-ratio-extra-commands
-                       thereis (or (member com this-command)
-                                   (member (car-safe com) this-command)))))
+                 (cl-loop for com in golden-ratio-extra-commands
+                          thereis (or (member com this-command)
+                                      (member (car-safe com) this-command)))))
     ;; This is needed in emacs-25 to avoid this error from `recenter':
     ;; `recenter'ing a window that does not display current-buffer.
     ;; This doesn't happen in emacs-24.4 and previous versions.



reply via email to

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