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

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

[nongnu] elpa/swsw 444873d9bd 114/146: Fix names of some internal and so


From: ELPA Syncer
Subject: [nongnu] elpa/swsw 444873d9bd 114/146: Fix names of some internal and some external functions
Date: Wed, 25 May 2022 02:59:53 -0400 (EDT)

branch: elpa/swsw
commit 444873d9bd4bd8dad08f5f18cbd91edeba286e3a
Author: Daniel Semyonov <daniel@dsemy.com>
Commit: Daniel Semyonov <daniel@dsemy.com>

    Fix names of some internal and some external functions
    
    * swsw.el (swsw-id-chars, swsw-scope, swsw--update, swsw-mode): Rename
    'swsw-update' to 'swsw--update'.
    (swsw--update-window, swsw--update): Rename 'swsw-update-window' to
    'swsw--update-window'.
    (swsw-run-window-command, swsw-select, swsw-delete):
    * swsw.texi (Window Commands): Rename 'swsw--run-window-command' to
    'swsw-run-window-command'.
---
 swsw.el   | 38 +++++++++++++++++++-------------------
 swsw.texi |  2 +-
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/swsw.el b/swsw.el
index 60e056bf5f..c223610a75 100644
--- a/swsw.el
+++ b/swsw.el
@@ -88,8 +88,8 @@ This list should contain at least two characters."
            (user-error
             "`swsw-id-chars' should contain at least two characters"))
          (set-default sym chars)
-         (when (fboundp 'swsw-update)
-           (swsw-update)))
+         (when (fboundp 'swsw--update)
+           (swsw--update)))
   :risky t
   :package-version '(swsw . 1.0))
 
@@ -110,8 +110,8 @@ t means consider all windows on all existing frames.
                  current))
   :set (lambda (sym scope)
          (set-default sym scope)
-         (when (fboundp 'swsw-update)
-           (swsw-update)))
+         (when (fboundp 'swsw--update)
+           (swsw--update)))
   :risky t
   :package-version '(swsw . 1.1))
 
@@ -182,7 +182,7 @@ If set to `lighter', use a mode line lighter."
                   swsw--id-counter))
     id))
 
-(defun swsw-update-window (window)
+(defun swsw--update-window (window)
   "Update information for WINDOW."
   (let ((id (if (window-minibuffer-p window)
                 (progn
@@ -203,7 +203,7 @@ If set to `lighter', use a mode line lighter."
       (set-window-parameter window 'swsw-id id)
       (setq swsw-window-count (1+ swsw-window-count)))))
 
-(defun swsw-update (&optional _frame)
+(defun swsw--update (&optional _frame)
   "Update information for all windows."
   (setq swsw--id-map (make-sparse-keymap))
   (set-keymap-parent swsw--id-map swsw-command-map)
@@ -212,7 +212,7 @@ If set to `lighter', use a mode line lighter."
   ;; Clear and resize `swsw--id-counter' according to the ID length.
   (dotimes (_var (swsw--get-id-length))
     (push 0 swsw--id-counter))
-  (walk-windows #'swsw-update-window nil (swsw--get-scope)))
+  (walk-windows #'swsw--update-window nil (swsw--get-scope)))
 
 ;;;; Display functions:
 
@@ -265,7 +265,7 @@ This display function respects `swsw-id-format'."
 
 ;;;; Window commands:
 
-(defun swsw--run-window-command (fun)
+(defun swsw-run-window-command (fun)
   "Run FUN as a window command.
 Run `swsw-before-command-hook', set `this-command' to FUN and set a
 transient map for ID selection which runs `swsw-after-command-hook' on
@@ -287,7 +287,7 @@ is enabled."
   (interactive)
   (if (< swsw-window-count 3)
       (select-window (next-window))
-    (swsw--run-window-command #'select-window)))
+    (swsw-run-window-command #'select-window)))
 
 (defun swsw-select-minibuffer ()
   "Select the active minibuffer window (if it exists).
@@ -312,7 +312,7 @@ is enabled."
         (unless (or (minibufferp (window-buffer window))
                     (minibufferp)) ; Selected window.
           (delete-window window)))
-    (swsw--run-window-command #'delete-window)))
+    (swsw-run-window-command #'delete-window)))
 
 (defvar swsw-command-map (let ((map (make-sparse-keymap)))
                            (define-key map [?o] #'swsw-select)
@@ -340,19 +340,19 @@ selection:
   :keymap '(keymap (?\C-x . (keymap (?o . swsw-select))))
   (if swsw-mode
       (progn
-        (swsw-update)
+        (swsw--update)
         (unless (eq swsw-display-function 'lighter)
           (funcall swsw-display-function t))
-        (add-hook 'window-configuration-change-hook #'swsw-update)
-        (add-hook 'minibuffer-setup-hook #'swsw-update)
-        (add-hook 'minibuffer-exit-hook #'swsw-update)
-        (add-hook 'after-delete-frame-functions #'swsw-update))
+        (add-hook 'window-configuration-change-hook #'swsw--update)
+        (add-hook 'minibuffer-setup-hook #'swsw--update)
+        (add-hook 'minibuffer-exit-hook #'swsw--update)
+        (add-hook 'after-delete-frame-functions #'swsw--update))
     (unless (eq swsw-display-function 'lighter)
       (funcall swsw-display-function nil))
-    (remove-hook 'window-configuration-change-hook #'swsw-update)
-    (remove-hook 'minibuffer-setup-hook #'swsw-update)
-    (remove-hook 'minibuffer-exit-hook #'swsw-update)
-    (remove-hook 'after-delete-frame-functions #'swsw-update)))
+    (remove-hook 'window-configuration-change-hook #'swsw--update)
+    (remove-hook 'minibuffer-setup-hook #'swsw--update)
+    (remove-hook 'minibuffer-exit-hook #'swsw--update)
+    (remove-hook 'after-delete-frame-functions #'swsw--update)))
 
 (provide 'swsw)
 
diff --git a/swsw.texi b/swsw.texi
index dad3d0d331..3dbe1ed2e9 100644
--- a/swsw.texi
+++ b/swsw.texi
@@ -262,7 +262,7 @@ Amount of windows currently tracked. This variable can be 
used to
 conditionally run window commands.
 @end defvar
 
-@defun swsw--run-window-command fun
+@defun swsw-run-window-command fun
 Run FUN as a window command. Run @code{swsw-before-command-hook}, set
 @code{this-command} to FUN, and set @code{swsw--id-map} as a transient
 map which runs @code{swsw-after-command-hook} on exit. This function



reply via email to

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