Move nil-or-list-of-strings-p to the Org config

This commit is contained in:
Gergely Polonkai 2018-07-29 19:37:35 +02:00
parent 7b4a464f02
commit e91a08594e
3 changed files with 12 additions and 15 deletions

View File

@ -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

View File

@ -31,7 +31,6 @@
(load "zim")
(load "window-manip")
(load "xdg-paths")
(load "utils")
(defun termux-p ()
"Check if Emacs is running under Termux."

View File

@ -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