Function: js--maybe-join

js--maybe-join is a byte-compiled function defined in js.el.gz.

Signature

(js--maybe-join PREFIX SEPARATOR SUFFIX &rest LIST)

Documentation

Helper function for js--update-quick-match-re.

If LIST contains any element that is not nil, return its non-nil elements, separated by SEPARATOR, prefixed by PREFIX, and ended with SUFFIX as with concat. Otherwise, if LIST is empty, return nil. If any element in LIST is itself a list, flatten that element.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--maybe-join (prefix separator suffix &rest list)
  "Helper function for `js--update-quick-match-re'.
If LIST contains any element that is not nil, return its non-nil
elements, separated by SEPARATOR, prefixed by PREFIX, and ended
with SUFFIX as with `concat'.  Otherwise, if LIST is empty, return
nil.  If any element in LIST is itself a list, flatten that
element."
  (setq list (flatten-tree list))
  (when list
    (concat prefix (mapconcat #'identity list separator) suffix)))