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

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

[elpa] externals/diminish 96b47cf903 17/22: Replace cl with cl-lib (Fix


From: ELPA Syncer
Subject: [elpa] externals/diminish 96b47cf903 17/22: Replace cl with cl-lib (Fix #8)
Date: Fri, 28 Jan 2022 02:57:55 -0500 (EST)

branch: externals/diminish
commit 96b47cf90360e4bd19138fe82dc59bfa86c7bf7d
Author: muffinmad <andreyk.mad@gmail.com>
Commit: Martin Yrjölä <martin.yrjola@gmail.com>

    Replace cl with cl-lib (Fix #8)
    
    1. Reuquire Emacs 24.3. According to package-lint:
    ```
    You should depend on (emacs "24.3") or the cl-lib package if you need 
`cl-lib'.
    ```
    
    2. `callf` and `callf2` replaced by `cl-callf` and `cl-callf2` accordingly.
    
    3. Fixed package URL. package-lint again:
    ```
    Package URLs should be a single HTTPS or HTTP URL.
    ```
---
 diminish.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/diminish.el b/diminish.el
index 6aa45e4c89..bb5731d7ed 100644
--- a/diminish.el
+++ b/diminish.el
@@ -4,9 +4,10 @@
 
 ;; Author: Will Mengarini <seldon@eskimo.com>
 ;; Maintainer: Martin Yrjölä <martin.yrjola@gmail.com>
-;; URL: <https://github.com/myrjola/diminish.el>
+;; URL: https://github.com/myrjola/diminish.el
 ;; Created: Th 19 Feb 98
 ;; Version: 0.45
+;; Package-Requires: ((emacs "24.3"))
 ;; Keywords: extensions, diminish, minor, codeprose
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -105,7 +106,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 (defvar diminish-must-not-copy-minor-mode-alist nil
   "Non-nil means loading diminish.el won't (copy-alist minor-mode-alist).
@@ -116,7 +117,7 @@ try to diminish abbrev-mode under GNU Emacs 19.34, you'll 
get the error
 message \"Attempt to modify read-only object\".")
 
 (or diminish-must-not-copy-minor-mode-alist
-    (callf copy-alist minor-mode-alist))
+    (cl-callf copy-alist minor-mode-alist))
 
 (defvar diminished-mode-alist nil
   "The original `minor-mode-alist' value of all (diminish)ed modes.")
@@ -177,11 +178,11 @@ to TO-WHAT if it's > 1 char long & doesn't already begin 
with a space."
                       nil nil nil 'diminish-history-names)))
   (let ((minor (assq mode minor-mode-alist)))
     (when minor
-        (progn (callf or to-what "")
+        (progn (cl-callf or to-what "")
                (when (and (stringp to-what)
                           (> (length to-what) 1))
                  (or (= (string-to-char to-what) ?\ )
-                     (callf2 concat " " to-what)))
+                     (cl-callf2 concat " " to-what)))
                (or (assq mode diminished-mode-alist)
                    (push (copy-sequence minor) diminished-mode-alist))
                (setcdr minor (list to-what))))))
@@ -223,7 +224,7 @@ the arg must be quoted as a symbol, as in (diminish-undo 
'diminished-modes)."
       (let ((diminished-modes diminished-mode-alist))
         (while diminished-modes
           (diminish-undo (caar diminished-modes))
-          (callf cdr diminished-modes)))
+          (cl-callf cdr diminished-modes)))
     (let ((minor      (assq mode      minor-mode-alist))
           (diminished (assq mode diminished-mode-alist)))
       (or minor
@@ -260,14 +261,14 @@ what diminished modes would be on the mode-line if they 
were still minor."
           (when (symbolp minor-name)
             ;; This minor mode uses symbol indirection in the cdr
             (let ((symbols-seen (list minor-name)))
-              (while (and (symbolp (callf symbol-value minor-name))
+              (while (and (symbolp (cl-callf symbol-value minor-name))
                           (not (memq minor-name symbols-seen)))
                 (push minor-name symbols-seen))))
           (push minor-name message)))
-      (callf cdr minor-modes))
+      (cl-callf cdr minor-modes))
     (setq message (mapconcat 'identity (nreverse message) ""))
     (when (= (string-to-char message) ?\ )
-      (callf substring message 1))
+      (cl-callf substring message 1))
     (message "%s" message)))
 
 ;; A human mind is a Black Forest of diminished modes.  Some are dangerous;



reply via email to

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