diff --git a/configuration.org b/configuration.org index 8228614..39a56c0 100644 --- a/configuration.org +++ b/configuration.org @@ -51,6 +51,18 @@ I set it up early so I can use it in ~use-package~ calls immediately. * Custom commands and functions +** Utility functions + +*** Check if something is ~nil~ or a list of strings + +#+BEGIN_SRC emacs-lisp +(defun nil-or-list-of-strings-p (var) + "Return t if VAR is either nil or a list holding only strings." + (or (null var) + (not (null (delq nil + (mapcar (lambda (x) (and (stringp x) x)) var)))))) +#+END_SRC + ** Misc text manipulation functions *** Delete the current line diff --git a/init.el b/init.el index d504a10..11df293 100644 --- a/init.el +++ b/init.el @@ -31,7 +31,6 @@ (load "zim") (load "window-manip") (load "xdg-paths") -(load "utils") (defun termux-p () "Check if Emacs is running under Termux." diff --git a/lisp/utils.el b/lisp/utils.el deleted file mode 100644 index fbf804d..0000000 --- a/lisp/utils.el +++ /dev/null @@ -1,14 +0,0 @@ -;;; utils --- Summary - -;;; Commentary: - -;;; Code: - -(defun nil-or-list-of-strings-p (var) - "Return t if VAR is either nil or a list holding only strings." - (or (null var) - (not (null (delq nil - (mapcar (lambda (x) (and (stringp x) x)) var)))))) - -(provide 'utils) -;;; utils.el ends here