Function: easy-mmode--globalized-predicate-p

easy-mmode--globalized-predicate-p is a byte-compiled function defined in easy-mmode.el.gz.

Signature

(easy-mmode--globalized-predicate-p PREDICATE)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/easy-mmode.el.gz
(defun easy-mmode--globalized-predicate-p (predicate)
  (cond
   ((eq predicate t)
    t)
   ((eq predicate nil)
    nil)
   ((listp predicate)
    ;; Legacy support for (not a b c).
    (when (eq (car predicate) 'not)
      (setq predicate (nconc (mapcar (lambda (e) (list 'not e))
                                     (cdr predicate))
                             (list t))))
    (catch 'found
      (dolist (elem predicate)
        (cond
         ((eq elem t)
          (throw 'found t))
         ((eq elem nil)
          (throw 'found nil))
         ((and (consp elem)
               (eq (car elem) 'not))
          (when (derived-mode-p (cdr elem))
            (throw 'found nil)))
         ((symbolp elem)
          (when (derived-mode-p elem)
            (throw 'found t)))))))))