Move nil-or-list-of-strings-p to a separate package

This commit is contained in:
Gergely Polonkai 2018-07-25 07:14:28 +02:00
parent 4a9cfddc6b
commit eeb501ce9e
2 changed files with 15 additions and 6 deletions

View File

@ -54,6 +54,7 @@
(load "file-manip")
(load "window-manip")
(load "xdg-paths")
(load "utils")
;; Define aliases
(defalias 'yes-or-no-p 'y-or-n-p)
@ -318,12 +319,6 @@
(list sml/pre-id-separator)
mode-line-rest))))
(defun nil-orlist-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))))))
(use-package company
:config
(setq company-idle-delay nil

14
lisp/utils.el Normal file
View File

@ -0,0 +1,14 @@
;;; 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