diff options
author | Mark H Weaver <mhw@netris.org> | 2015-09-22 16:38:48 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-09-22 16:38:48 -0400 |
commit | bd90127ad43d08c39e5bd592d03f7c0a4c683afe (patch) | |
tree | c840851273e349cb0aee31cb5958acdf093c819a /emacs/guix-utils.el | |
parent | 5f20553dee3fbc924b0cafb54ac215b0d3bf344c (diff) | |
parent | 430505eba33b7bb59fa2d22e0f21ff317cbc320d (diff) | |
download | guix-bd90127ad43d08c39e5bd592d03f7c0a4c683afe.tar.gz guix-bd90127ad43d08c39e5bd592d03f7c0a4c683afe.zip |
Merge branch 'master' into core-updates
Diffstat (limited to 'emacs/guix-utils.el')
-rw-r--r-- | emacs/guix-utils.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el index c1ce954f8f..d1f088b6a8 100644 --- a/emacs/guix-utils.el +++ b/emacs/guix-utils.el @@ -208,6 +208,16 @@ single argument." (funcall guix-find-file-function file) (message "File '%s' does not exist." file))) +(defvar url-handler-regexp) + +(defun guix-find-file-or-url (file-or-url) + "Find FILE-OR-URL." + (require 'url-handlers) + (let ((file-name-handler-alist + (cons (cons url-handler-regexp 'url-file-handler) + file-name-handler-alist))) + (find-file file-or-url))) + (defmacro guix-while-search (regexp &rest body) "Evaluate BODY after each search for REGEXP in the current buffer." (declare (indent 1) (debug t)) @@ -216,14 +226,6 @@ single argument." (while (re-search-forward ,regexp nil t) ,@body))) -(defun guix-any (pred lst) - "Test whether any element from LST satisfies PRED. -If so, return the return value from the successful PRED call. -Return nil otherwise." - (when lst - (or (funcall pred (car lst)) - (guix-any pred (cdr lst))))) - ;;; Alist accessors |