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

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

[elpa] externals/consult e5333d01aa 3/5: Revert "Fix whitespace"


From: ELPA Syncer
Subject: [elpa] externals/consult e5333d01aa 3/5: Revert "Fix whitespace"
Date: Sat, 15 Oct 2022 16:57:25 -0400 (EDT)

branch: externals/consult
commit e5333d01aa224ba285a788736d36cb80a02b40aa
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Revert "Fix whitespace"
    
    This reverts commit 1b6d22db9f2db38b831d350eff664001fa8b935d.
---
 consult.el | 76 +++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/consult.el b/consult.el
index 915d77b789..d61be464ca 100644
--- a/consult.el
+++ b/consult.el
@@ -143,10 +143,10 @@ The histories can be rings or lists.  INDEX, if provided, 
is a
 variable to set to the index of the selection within the ring or
 list."
   :type '(alist :key-type symbol
-                :value-type (choice (symbol :tag "List or Ring Name")
-                                    (group :tag "Include Index"
-                                           (symbol :tag "List/Ring")
-                                           (symbol :tag "Index Var")))))
+               :value-type (choice (symbol :tag "List or Ring Name")
+                                   (group :tag "Include Index"
+                                          (symbol :tag "List/Ring")
+                                          (symbol :tag "Index Var")))))
 
 (defcustom consult-themes nil
   "List of themes (symbols or regexps) to be presented for selection.
@@ -3748,21 +3748,21 @@ INDEX is the name of the index variable to update, if 
any."
      ;; which can be configured by setting `minibuffer-history-variable'.
      ((minibufferp)
       (if (eq minibuffer-history-variable t)
-          (user-error "Minibuffer history is disabled for `%s'" this-command)
-        (setq history (mapcar #'consult--tofu-hide (symbol-value 
minibuffer-history-variable)))))
+         (user-error "Minibuffer history is disabled for `%s'" this-command)
+       (setq history (mapcar #'consult--tofu-hide (symbol-value 
minibuffer-history-variable)))))
      ;; Otherwise we use a mode-specific history, see `consult-mode-histories'.
      (t (when-let (found
-                   (or (seq-find (lambda (ring)
-                                   (and (derived-mode-p (car ring))
-                                        (boundp (let (c (cdr ring)) (if (consp 
c) (car c) c)))))
-                                 consult-mode-histories)
-                       (user-error
-                        "No history configured for `%s', see 
`consult-mode-histories'"
-                        major-mode)))
-          (if (consp (cdr found))
-              (setq history (symbol-value (cadr found))
-                    index (caddr found))
-            (setq history (symbol-value (cdr found)))))))
+                  (or (seq-find (lambda (ring)
+                                  (and (derived-mode-p (car ring))
+                                       (boundp (let (c (cdr ring)) (if (consp 
c) (car c) c)))))
+                                consult-mode-histories)
+                      (user-error
+                       "No history configured for `%s', see 
`consult-mode-histories'"
+                       major-mode)))
+         (if (consp (cdr found))
+             (setq history (symbol-value (cadr found))
+                   index (caddr found))
+           (setq history (symbol-value (cdr found)))))))
     (cons history index)))
 
 ;; This command has been adopted from 
https://github.com/oantolin/completing-history/.
@@ -3774,30 +3774,30 @@ as argument. See also `cape-history' from the Cape 
package."
   (interactive)
   (pcase-let*
       ((`(,history . ,index-var)
-        (or (consult--current-history history)
-            (user-error "History is empty")))
+       (or (consult--current-history history)
+           (user-error "History is empty")))
        (str (consult--local-let ((enable-recursive-minibuffers t))
-              (consult--read
-               (consult--remove-dups (if (ring-p history) (ring-elements 
history) history))
-               :prompt "History: "
-               :history t ;; disable history
-               :category ;; Report category depending on history variable
-               (and (minibufferp)
-                    (pcase minibuffer-history-variable
-                      ('extended-command-history 'command)
-                      ('buffer-name-history 'buffer)
-                      ('face-name-history 'face)
-                      ('read-envvar-name-history 'environment-variable)
-                      ('bookmark-history 'bookmark)
-                      ('file-name-history 'file)))
-               :sort nil
-               :state (consult--insertion-preview (point) (point))))))
+             (consult--read
+              (consult--remove-dups (if (ring-p history) (ring-elements 
history) history))
+              :prompt "History: "
+              :history t ;; disable history
+              :category ;; Report category depending on history variable
+              (and (minibufferp)
+                   (pcase minibuffer-history-variable
+                     ('extended-command-history 'command)
+                     ('buffer-name-history 'buffer)
+                     ('face-name-history 'face)
+                     ('read-envvar-name-history 'environment-variable)
+                     ('bookmark-history 'bookmark)
+                     ('file-name-history 'file)))
+              :sort nil
+              :state (consult--insertion-preview (point) (point))))))
     (when (minibufferp)
-      (delete-minibuffer-contents))
+      (delete-minibuffer-contents)) 
     (if index-var
-        (set index-var (if (ring-p history)
-                           (ring-member history str)
-                         (seq-position history str))))
+       (set index-var (if (ring-p history)
+                          (ring-member history str)
+                        (seq-position history str))))
     (insert (substring-no-properties str))))
 
 ;;;;; Command: consult-isearch-history



reply via email to

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