Function: elisp--form-quoted-p
elisp--form-quoted-p is a byte-compiled function defined in
elisp-mode.el.gz.
Signature
(elisp--form-quoted-p POS)
Documentation
Return non-nil if the form at POS is not evaluated.
It can be quoted, or be inside a quoted form.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/elisp-mode.el.gz
(defun elisp--form-quoted-p (pos)
"Return non-nil if the form at POS is not evaluated.
It can be quoted, or be inside a quoted form."
;; FIXME: Do some macro expansion maybe.
(save-excursion
(let ((state (syntax-ppss pos)))
(or (nth 8 state) ; Code inside strings usually isn't evaluated.
;; FIXME: The 9th element is undocumented.
(let ((nesting (cons (point) (reverse (nth 9 state))))
res)
(while (and nesting (not res))
(goto-char (pop nesting))
(cond
((or (eq (char-after) ?\[)
(progn
(skip-chars-backward " ")
(memq (char-before) '(?' ?` ?‘))))
(setq res t))
((eq (char-before) ?,)
(setq nesting nil))))
res)))))