[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/marginalia b5ea8e5ce8 09/15: Indentation
From: |
ELPA Syncer |
Subject: |
[elpa] externals/marginalia b5ea8e5ce8 09/15: Indentation |
Date: |
Sun, 9 Jan 2022 15:57:54 -0500 (EST) |
branch: externals/marginalia
commit b5ea8e5ce8b6f02147a03ae19bd4c0e01995c0c4
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Indentation
---
marginalia.el | 84 +++++++++++++++++++++++++++++------------------------------
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/marginalia.el b/marginalia.el
index f70074f965..540208f8f3 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -476,22 +476,22 @@ t cl-type"
"Return function arguments for SYM."
(let ((tmp))
(elisp-function-argstring
- (cond
- ((listp (setq tmp (gethash (indirect-function sym)
- advertised-signature-table t)))
- tmp)
- ((setq tmp (help-split-fundoc
- (ignore-errors (documentation sym t))
- sym))
- (substitute-command-keys (car tmp)))
- ((setq tmp (help-function-arglist sym))
- (and
- (if (and (stringp tmp)
- (string-match-p "Arg list not available" tmp))
- ;; A shorter text fits better into the
- ;; limited Marginalia space.
- "[autoload]"
- tmp)))))))
+ (cond
+ ((listp (setq tmp (gethash (indirect-function sym)
+ advertised-signature-table t)))
+ tmp)
+ ((setq tmp (help-split-fundoc
+ (ignore-errors (documentation sym t))
+ sym))
+ (substitute-command-keys (car tmp)))
+ ((setq tmp (help-function-arglist sym))
+ (and
+ (if (and (stringp tmp)
+ (string-match-p "Arg list not available" tmp))
+ ;; A shorter text fits better into the
+ ;; limited Marginalia space.
+ "[autoload]"
+ tmp)))))))
(defun marginalia-annotate-symbol (cand)
"Annotate symbol CAND with its documentation string."
@@ -749,20 +749,20 @@ The string is transformed according to
`marginalia-bookmark-type-transformers'."
(defun marginalia--buffer-file (buffer)
"Return the file or process name of BUFFER."
(if-let (proc (get-buffer-process buffer))
- (format "(%s %s) %s"
- proc (process-status proc)
- (abbreviate-file-name (buffer-local-value 'default-directory
buffer)))
- (abbreviate-file-name
- (or (cond
- ;; see ibuffer-buffer-file-name
- ((buffer-file-name buffer))
- ((when-let (dir (and (local-variable-p 'dired-directory buffer)
- (buffer-local-value 'dired-directory
buffer)))
- (expand-file-name (if (stringp dir) dir (car dir))
- (buffer-local-value 'default-directory
buffer))))
- ((local-variable-p 'list-buffers-directory buffer)
- (buffer-local-value 'list-buffers-directory buffer)))
- ""))))
+ (format "(%s %s) %s"
+ proc (process-status proc)
+ (abbreviate-file-name (buffer-local-value 'default-directory
buffer)))
+ (abbreviate-file-name
+ (or (cond
+ ;; see ibuffer-buffer-file-name
+ ((buffer-file-name buffer))
+ ((when-let (dir (and (local-variable-p 'dired-directory buffer)
+ (buffer-local-value 'dired-directory buffer)))
+ (expand-file-name (if (stringp dir) dir (car dir))
+ (buffer-local-value 'default-directory
buffer))))
+ ((local-variable-p 'list-buffers-directory buffer)
+ (buffer-local-value 'list-buffers-directory buffer)))
+ ""))))
(defun marginalia-annotate-buffer (cand)
"Annotate buffer CAND with modification status, file name and major mode."
@@ -779,16 +779,16 @@ For some completion tables, the completion candidates
offered are
meant to be only a part of the full minibuffer contents. For
example, during file name completion the candidates are one path
component of a full file path."
- (if-let (win (active-minibuffer-window))
- (with-current-buffer (window-buffer win)
- (if (bound-and-true-p selectrum-is-active)
- (selectrum--get-full cand)
- (concat (substring (minibuffer-contents-no-properties)
- 0 marginalia--base-position)
- cand)))
- ;; no minibuffer is active, trust that cand already conveys all
- ;; necessary information (there's not much else we can do)
- cand))
+ (if-let (win (active-minibuffer-window))
+ (with-current-buffer (window-buffer win)
+ (if (bound-and-true-p selectrum-is-active)
+ (selectrum--get-full cand)
+ (concat (substring (minibuffer-contents-no-properties)
+ 0 marginalia--base-position)
+ cand)))
+ ;; no minibuffer is active, trust that cand already conveys all
+ ;; necessary information (there's not much else we can do)
+ cand))
(defun marginalia--remote-protocol (path)
"Return the remote protocol of PATH."
@@ -998,8 +998,8 @@ PROP is the property which is looked up."
;; `lookup-minor-mode-from-indicator'. Otherwise it would suffice to
;; only change the current buffer. We need the `selected-window'
;; fallback for Embark Occur.
- (with-selected-window (or (minibuffer-selected-window)
(selected-window))
- (mapcar (lambda (x) (list x "" (or (marginalia--cached cache annotate
x) ""))) cands))))))
+ (with-selected-window (or (minibuffer-selected-window)
(selected-window))
+ (mapcar (lambda (x) (list x "" (or (marginalia--cached cache
annotate x) ""))) cands))))))
('category
;; Find the completion category by trying each of our classifiers.
;; Store the metadata for `marginalia-classify-original-category'.
- [elpa] externals/marginalia updated (7782ebdd5c -> 1a2495203d), ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia e13d5ac71b 13/15: marginalia--field: Allow float value for :truncate, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 5a0678d88c 02/15: Deprecate marginalia-separator-threshold, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 709ed9b97e 01/15: marginalia--field: Remove support for :format, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 5f6ba12ff5 04/15: Deprecate and remove most of the current alignment implementation, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia b5ea8e5ce8 09/15: Indentation,
ELPA Syncer <=
- [elpa] externals/marginalia 4391877773 12/15: Rename marginalia-truncate-width to marginalia-field-width, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 1a2495203d 15/15: Colorize truncation ellipsis, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 55c5d3f1b3 03/15: Define the annotation-function in terms of the affixation-function, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia a35476942f 11/15: Hack in better alignment support, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 87e03d7d39 06/15: Inline marginalia--context, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 0bca060531 07/15: Minor simplification, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia a21f59a077 10/15: Extract marginalia--affixate, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia 80a03d480f 08/15: Simplification, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia ebc6edc2f7 14/15: Perfect the file annotation alignment, ELPA Syncer, 2022/01/09
- [elpa] externals/marginalia fa48dbe318 05/15: Remove unnecessary concat, ELPA Syncer, 2022/01/09