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

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

[elpa] externals/shell-command+ 795f4598d1 07/13: Only require diff and


From: ELPA Syncer
Subject: [elpa] externals/shell-command+ 795f4598d1 07/13: Only require diff and info if necessary
Date: Thu, 25 Aug 2022 09:57:59 -0400 (EDT)

branch: externals/shell-command+
commit 795f4598d13306fec1d991fb9eb38a87b4ec8687
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Only require diff and info if necessary
---
 shell-command+.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/shell-command+.el b/shell-command+.el
index 3df843c8b6..ef5b487863 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -86,8 +86,6 @@
 
 (eval-when-compile (require 'rx))
 (eval-when-compile (require 'pcase))
-(require 'diff)
-(require 'info)
 (require 'thingatpt)
 
 (defgroup shell-command+ nil
@@ -244,15 +242,19 @@ For PARSE, FORM and CONTEXT see 
`shell-command+-features'."
   (pcase-let ((`(,_ . ,args) (shell-command+-tokenize command)))
     (man (mapconcat #'identity args " "))))
 
+(declare-function Info-menu "info" (menu-item &optional fork))
 (defun shell-command+-cmd-info (command)
   "Convert COMMAND into a `info' call."
+  (require 'info)
   (pcase-let ((`(,_ . ,args) (shell-command+-tokenize command)))
     (Info-directory)
     (dolist (menu args)
       (Info-menu menu))))
 
+(declare-function diff-no-select "diff" (old new &optional switches no-async 
buf))
 (defun shell-command+-cmd-diff (command)
   "Convert COMMAND into `diff' call."
+  (require 'diff)
   (pcase-let ((`(,_ . ,args) (shell-command+-tokenize command t)))
     (let (files flags)
       (dolist (arg args)



reply via email to

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