mirror of
https://github.com/larstvei/Try.git
synced 2024-11-26 03:28:31 +00:00
Merge branch 'master' of github.com:larstvei/Try
This commit is contained in:
commit
ba3b4c3e58
7
try.el
7
try.el
@ -112,13 +112,16 @@
|
|||||||
(package-refresh-contents) (try))
|
(package-refresh-contents) (try))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun try ()
|
(defun try (&optional url-or-package)
|
||||||
"Try out a package from your `package-archives' or pass a URL
|
"Try out a package from your `package-archives' or pass a URL
|
||||||
to a raw .el file. Packages are stored in `try-tmp-dir' and raw
|
to a raw .el file. Packages are stored in `try-tmp-dir' and raw
|
||||||
.el files are not stored at all."
|
.el files are not stored at all."
|
||||||
(interactive)
|
(interactive)
|
||||||
;; Completions for packages.
|
;; Completions for packages.
|
||||||
(let* ((url-or-package (try-complete package-archive-contents))
|
(let* ((url-or-package (or (if (symbolp url-or-package)
|
||||||
|
(symbol-name url-or-package)
|
||||||
|
url-or-package)
|
||||||
|
(try-complete package-archive-contents)))
|
||||||
(package-symbol (intern url-or-package)))
|
(package-symbol (intern url-or-package)))
|
||||||
(cond ((try-raw-link-p url-or-package) (try-raw-link url-or-package))
|
(cond ((try-raw-link-p url-or-package) (try-raw-link url-or-package))
|
||||||
((try-package-exists-p package-symbol)
|
((try-package-exists-p package-symbol)
|
||||||
|
Loading…
Reference in New Issue
Block a user