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

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

[elpa] externals/consult 913d2cbef5: Move code around


From: ELPA Syncer
Subject: [elpa] externals/consult 913d2cbef5: Move code around
Date: Fri, 23 Dec 2022 07:57:27 -0500 (EST)

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

    Move code around
---
 consult.el | 126 +++++++++++++++++++++++++++++--------------------------------
 1 file changed, 60 insertions(+), 66 deletions(-)

diff --git a/consult.el b/consult.el
index a2174fb039..ab4891192c 100644
--- a/consult.el
+++ b/consult.el
@@ -2680,9 +2680,9 @@ KEYMAP is a command-specific keymap."
                 :preview-key consult-preview-key
                 :transform #'identity))))
 
-;;;; Functions
+;;;; Commands
 
-;;;;; Function: consult-completion-in-region
+;;;;; Command: consult-completion-in-region
 
 (defun consult--insertion-preview (start end)
   "State function for previewing a candidate in a specific region.
@@ -2838,24 +2838,6 @@ These configuration options are supported:
           (message "No completion")
           nil)))))
 
-;;;; Commands
-
-;;;;; Command: consult-multi-occur
-
-;;;###autoload
-(defun consult-multi-occur (bufs regexp &optional nlines)
-  "Improved version of `multi-occur' based on `completing-read-multiple'.
-
-See `multi-occur' for the meaning of the arguments BUFS, REGEXP and NLINES."
-  (interactive (cons
-                (mapcar #'get-buffer
-                        (completing-read-multiple "Buffer: "
-                                                  #'internal-complete-buffer))
-                (occur-read-primary-args)))
-  (occur-1 regexp nlines bufs))
-
-(make-obsolete 'consult-multi-occur 'consult-line-multi "0.29")
-
 ;;;;; Command: consult-outline
 
 (defun consult--outline-candidates ()
@@ -3517,24 +3499,6 @@ narrowing and the settings `consult-goto-line-numbers' 
and
     :state (consult--file-preview)
     :history 'file-name-history)))
 
-;;;;; Command: consult-file-externally
-
-;;;###autoload
-(defun consult-file-externally (file)
-  "Open FILE externally using the default application of the system."
-  (interactive "fOpen externally: ")
-  (if (and (eq system-type 'windows-nt)
-           (fboundp 'w32-shell-execute))
-      (w32-shell-execute "open" file)
-    (call-process (pcase system-type
-                    ('darwin "open")
-                    ('cygwin "cygstart")
-                    (_ "xdg-open"))
-                  nil 0 nil
-                  (expand-file-name file))))
-
-(make-obsolete 'consult-file-externally 'embark-open-externally "0.29")
-
 ;;;;; Command: consult-mode-command
 
 (defun consult--mode-name (mode)
@@ -3806,34 +3770,6 @@ variable `consult-bookmark-narrow' for the narrowing 
configuration."
       (bookmark-jump name)
     (bookmark-set name)))
 
-;;;;; Command: consult-apropos
-
-;;;###autoload
-(defun consult-apropos ()
-  "Select pattern and call `apropos'.
-
-The default value of the completion is the symbol at point. As a better
-alternative, you can run `embark-export' from commands like `M-x' and
-`describe-symbol'."
-  (interactive)
-  (let ((pattern
-         (consult--read
-          obarray
-          :prompt "consult-apropos (obsolete): "
-          :predicate (lambda (x) (or (fboundp x) (boundp x) (facep x) 
(symbol-plist x)))
-          :category 'symbol
-          :default (thing-at-point 'symbol))))
-    (when (string= pattern "")
-      (user-error "No pattern given"))
-    (apropos pattern)))
-
-(make-obsolete
- 'consult-apropos
- "consult-apropos has been deprecated in favor of Embark actions:
-M-x describe-symbol <regexp> M-x embark-export
-M-x describe-symbol <regexp> M-x embark-act a"
-               "0.20")
-
 ;;;;; Command: consult-complex-command
 
 ;;;###autoload
@@ -4920,6 +4856,64 @@ the asynchronous search."
         :add-history (consult--async-split-thingatpt 'symbol)
         :history '(:input consult--man-history))))
 
+;;;; Obsolete commands
+
+;;;###autoload
+(defun consult-apropos ()
+  "Select pattern and call `apropos'.
+
+The default value of the completion is the symbol at point. As a better
+alternative, you can run `embark-export' from commands like `M-x' and
+`describe-symbol'."
+  (interactive)
+  (let ((pattern
+         (consult--read
+          obarray
+          :prompt "consult-apropos (obsolete): "
+          :predicate (lambda (x) (or (fboundp x) (boundp x) (facep x) 
(symbol-plist x)))
+          :category 'symbol
+          :default (thing-at-point 'symbol))))
+    (when (string= pattern "")
+      (user-error "No pattern given"))
+    (apropos pattern)))
+
+(make-obsolete
+ 'consult-apropos
+ "consult-apropos has been deprecated in favor of Embark actions:
+M-x describe-symbol <regexp> M-x embark-export
+M-x describe-symbol <regexp> M-x embark-act a"
+               "0.20")
+
+;;;###autoload
+(defun consult-file-externally (file)
+  "Open FILE externally using the default application of the system."
+  (interactive "fOpen externally: ")
+  (if (and (eq system-type 'windows-nt)
+           (fboundp 'w32-shell-execute))
+      (w32-shell-execute "open" file)
+    (call-process (pcase system-type
+                    ('darwin "open")
+                    ('cygwin "cygstart")
+                    (_ "xdg-open"))
+                  nil 0 nil
+                  (expand-file-name file))))
+
+(make-obsolete 'consult-file-externally 'embark-open-externally "0.29")
+
+;;;###autoload
+(defun consult-multi-occur (bufs regexp &optional nlines)
+  "Improved version of `multi-occur' based on `completing-read-multiple'.
+
+See `multi-occur' for the meaning of the arguments BUFS, REGEXP and NLINES."
+  (interactive (cons
+                (mapcar #'get-buffer
+                        (completing-read-multiple "Buffer: "
+                                                  #'internal-complete-buffer))
+                (occur-read-primary-args)))
+  (occur-1 regexp nlines bufs))
+
+(make-obsolete 'consult-multi-occur 'consult-line-multi "0.29")
+
 ;;;; Preview at point in completions buffers
 
 (define-minor-mode consult-preview-at-point-mode



reply via email to

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