[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached 22bae504c6 1/2: Update indentation
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached 22bae504c6 1/2: Update indentation |
Date: |
Fri, 11 Nov 2022 05:57:35 -0500 (EST) |
branch: externals/detached
commit 22bae504c65bf953e512c1fd93be959f9c05b58c
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Update indentation
---
Makefile | 4 ++--
detached-eshell.el | 4 ++--
detached-list.el | 38 ++++++++++++++++++------------------
detached.el | 56 +++++++++++++++++++++++++++---------------------------
4 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/Makefile b/Makefile
index 3eaa55fc31..45e2fa02b7 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ byte-compile:
emacs --batch --load=detached.el --eval='(progn (setq
byte-compile-error-on-warn t) (batch-byte-compile))' ./*.el
style:
- emacs --batch --eval="(let ((make-backup-files nil) (files
(directory-files-recursively default-directory \"detached.*\.el\"))) (seq-do
(lambda (it) (find-file it) (indent-region (point-min) (point-max))
(save-buffer)) files))"
+ emacs --batch --eval="(let ((make-backup-files nil) (indent-tabs-mode
nil) (tab-width 4) (files (directory-files-recursively default-directory
\"detached.*\.el\"))) (seq-do (lambda (it) (find-file it) (whitespace-cleanup)
(indent-region (point-min) (point-max)) (save-buffer)) files))"
autoloads:
emacs --batch --eval='(progn (setq make-backup-files nil)
(make-directory-autoloads default-directory "detached-autoloads.el"))'
@@ -17,4 +17,4 @@ clean:
rm *.elc
rm doc/*.texi
-all: byte-compile autoloads tests docs clean
+all: byte-compile autoloads tests docs clean style
diff --git a/detached-eshell.el b/detached-eshell.el
index d870ac09dc..d18304a048 100644
--- a/detached-eshell.el
+++ b/detached-eshell.el
@@ -98,8 +98,8 @@ If prefix-argument directly DETACH from the session."
(defun detached-eshell--get-dtach-process ()
"Return `eshell' process if `detached' is running."
(when-let* ((process (and eshell-process-list (caar eshell-process-list))))
- (and (string= (process-name process) "dtach")
- process)))
+ (and (string= (process-name process) "dtach")
+ process)))
(defun detached-eshell--select-session ()
"Return selected session."
diff --git a/detached-list.el b/detached-list.el
index 3eee4f9a2b..acb03a7408 100644
--- a/detached-list.el
+++ b/detached-list.el
@@ -133,11 +133,11 @@ Optionally initialize ALL session-directories."
(seq-filter #'detached--uninitialized-session-p)
(seq-map #'detached--session-directory)
(seq-uniq))))
- (if all
- (seq-do #'detached-list--initialize-directory
uninitialized-directories)
- (when-let ((directory (completing-read "Initialize directory: "
uninitialized-directories)))
- (detached-list--initialize-directory directory)))
- (message "All session directories have been initialized")))
+ (if all
+ (seq-do #'detached-list--initialize-directory
uninitialized-directories)
+ (when-let ((directory (completing-read "Initialize directory: "
uninitialized-directories)))
+ (detached-list--initialize-directory directory)))
+ (message "All session directories have been initialized")))
(defun detached-list-edit-annotation (session)
"Edit SESSION's annotation."
@@ -147,8 +147,8 @@ Optionally initialize ALL session-directories."
(detached--session-annotation session)
""))
(annotation (read-string "Annotation: " initial-value)))
- (setf (detached--session-annotation session) annotation)
- (detached--db-update-entry session)))
+ (setf (detached--session-annotation session) annotation)
+ (detached--db-update-entry session)))
(defun detached-list-quit ()
"Quit command."
@@ -176,10 +176,10 @@ Optionally initialize ALL session-directories."
(interactive
(list (tabulated-list-get-id)))
(when-let* ((buffer (detached-list--attached-p session)))
- (unless (get-buffer-window buffer)
- (pop-to-buffer buffer))
- (with-selected-window (get-buffer-window buffer)
- (detached-detach-session))))
+ (unless (get-buffer-window buffer)
+ (pop-to-buffer buffer))
+ (with-selected-window (get-buffer-window buffer)
+ (detached-detach-session))))
(defun detached-list-jump-to-directory (session)
"Jump to SESSION at point's directory."
@@ -350,9 +350,9 @@ Optionally TOGGLE-SUPPRESS-OUTPUT."
(thread-last (detached-list--get-narrowed-sessions)
(seq-map #'detached-session-host-name)
(seq-uniq))))
- (completing-read
- "Select host: "
- hostnames))))
+ (completing-read
+ "Select host: "
+ hostnames))))
(when hostname
(detached-list-narrow-sessions
`(,@detached-list--narrow-criteria
@@ -423,9 +423,9 @@ Optionally TOGGLE-SUPPRESS-OUTPUT."
(thread-last (detached-list--get-narrowed-sessions)
(seq-map #'detached--session-directory)
(seq-uniq))))
- (completing-read
- "Select session directory: "
- directories))))
+ (completing-read
+ "Select session directory: "
+ directories))))
(when session-directory
(detached-list-narrow-sessions
`(,@detached-list--narrow-criteria
@@ -493,8 +493,8 @@ Optionally TOGGLE-SUPPRESS-OUTPUT."
(complete-with-action action
detached-list-filters string predicate))))
(filter-name
(completing-read "Select filter: " collection nil t)))
- (detached-list--apply-filter
- (alist-get filter-name detached-list-filters nil nil #'string=))))
+ (detached-list--apply-filter
+ (alist-get filter-name detached-list-filters nil nil #'string=))))
(defun detached-list-narrow-origin (origin)
"Narrow to sessions with a specific ORIGIN."
diff --git a/detached.el b/detached.el
index 6fe43baf64..03d05ffc85 100644
--- a/detached.el
+++ b/detached.el
@@ -510,13 +510,13 @@ The session is compiled by opening its output and enabling
(when-let* ((session (detached--get-session major-mode))
(buffer (get-buffer-create "*detached-session-info*"))
(window (display-buffer buffer
detached-session-info-buffer-action)))
- (select-window window)
- (with-current-buffer buffer
- (erase-buffer)
- (insert
- (string-trim
- (detached--session-header session)))
- (goto-char (point-min)))))
+ (select-window window)
+ (with-current-buffer buffer
+ (erase-buffer)
+ (insert
+ (string-trim
+ (detached--session-header session)))
+ (goto-char (point-min)))))
;;;###autoload
(defun detached-attach-session (session)
@@ -580,7 +580,7 @@ Optionally DELETE the session if prefix-argument is
provided."
(when (detached-valid-session session)
(when-let* ((default-directory (detached--session-directory session))
(pid (detached-session-pid session)))
- (detached--kill-processes pid))
+ (detached--kill-processes pid))
(when delete
(detached--db-remove-entry session))))
@@ -882,7 +882,7 @@ This function uses the `notifications' library."
(thread-last (detached--uninitialized-sessions)
(seq-filter #'detached--session-accessible-p)
(seq-do #'detached--initialize-session))))
- (detached--db-update-sessions))
+ (detached--db-update-sessions))
(detached--db-get-sessions))
(defun detached-shell-command-attach-session (session)
@@ -1642,25 +1642,25 @@ session and trigger a state transition."
(is-primary
(detached--primary-detached-emacs-p session)))
- ;; Remove from unvalidated sessions
- (setq detached--unvalidated-sessions
- (assq-delete-all id detached--unvalidated-sessions))
-
- ;; Update session
- (detached--session-state-transition-update session)
-
- ;; Remove session directory from
`detached--watch-session-directory'
- ;; if there is no active session associated with the directory
- (unless
- (thread-last (detached--db-get-sessions)
- (seq-filter (lambda (it) (eq 'active
(detached--session-state it))))
- (seq-map #'detached--session-directory)
- (seq-uniq)
- (seq-filter (lambda (it) (string= it
session-directory))))
- (file-notify-rm-watch
- (alist-get session-directory
detached--watched-session-directories nil nil #'string=))
- (setq detached--watched-session-directories
- (assoc-delete-all session-directory
detached--watched-session-directories)))))))
+ ;; Remove from unvalidated sessions
+ (setq detached--unvalidated-sessions
+ (assq-delete-all id detached--unvalidated-sessions))
+
+ ;; Update session
+ (detached--session-state-transition-update session)
+
+ ;; Remove session directory from `detached--watch-session-directory'
+ ;; if there is no active session associated with the directory
+ (unless
+ (thread-last (detached--db-get-sessions)
+ (seq-filter (lambda (it) (eq 'active
(detached--session-state it))))
+ (seq-map #'detached--session-directory)
+ (seq-uniq)
+ (seq-filter (lambda (it) (string= it
session-directory))))
+ (file-notify-rm-watch
+ (alist-get session-directory detached--watched-session-directories
nil nil #'string=))
+ (setq detached--watched-session-directories
+ (assoc-delete-all session-directory
detached--watched-session-directories)))))))
(defun detached--initialize-session (session)
"Initialize SESSION."