(prnt (cadr prnt-form))
(beg (scope-sym-pos prnt))
(bare (scope-sym-bare prnt)))
- (funcall scope-callback 'widget-type beg (length (symbol-name bare)) nil))))
+ (funcall scope-callback 'widget-type beg (length (symbol-name bare)) nil)))
+ ((define-error)
+ (when-let* ((name-form (car forms))
+ ((memq (scope-sym-bare (car-safe name-form)) '(quote \`)))
+ (name (cadr name-form))
+ (beg (scope-sym-pos name))
+ (bare (scope-sym-bare name)))
+ (funcall scope-callback 'condition beg (length (symbol-name bare)) nil))
+ (when-let* ((prnt-form (caddr forms))
+ ((memq (scope-sym-bare (car-safe prnt-form)) '(quote \`))))
+ (dolist (prnt (ensure-list (cadr prnt-form)))
+ (when-let* ((beg (scope-sym-pos prnt)) (bare (scope-sym-bare prnt)))
+ (funcall scope-callback 'condition beg (length (symbol-name bare)) nil)))))
+ ((provide-theme custom-declare-theme)
+ (when-let* ((name-form (car forms))
+ ((memq (scope-sym-bare (car-safe name-form)) '(quote \`)))
+ (name (cadr name-form))
+ (beg (scope-sym-pos name))
+ (bare (scope-sym-bare name)))
+ (funcall scope-callback 'theme beg (length (symbol-name bare)) nil)))
+ ((defvaralias)
+ (when-let* ((new-form (car forms))
+ ((memq (scope-sym-bare (car-safe new-form)) '(quote \`)))
+ (name (cadr new-form))
+ (beg (scope-sym-pos name))
+ (bare (scope-sym-bare name)))
+ (funcall scope-callback 'defvar beg (length (symbol-name bare)) nil))
+ (when-let* ((base-form (cadr forms))
+ ((memq (scope-sym-bare (car-safe base-form)) '(quote \`)))
+ (name (cadr base-form))
+ (beg (scope-sym-pos name))
+ (bare (scope-sym-bare name)))
+ (funcall scope-callback 'variable beg (length (symbol-name bare)) nil))))
(when (symbol-with-pos-p f)
(funcall scope-callback 'function
(symbol-with-pos-pos f) (length (symbol-name bare))
"Face for highlighting feature names in Emacs Lisp code."
:group 'lisp)
+(defface elisp-theme '((t :inherit font-lock-constant-face))
+ "Face for highlighting custom theme names in Emacs Lisp code."
+ :group 'lisp)
+
(defface elisp-binding-variable
'((t :slant italic :inherit font-lock-variable-name-face))
"Face for highlighting binding occurrences of variables in Emacs Lisp code."
(special-form "Special form")
(throw-tag "`throw'/`catch' tag")
(feature "Feature")
+ (theme "Theme")
(widget-type "Widget type")
(type "Type")
(group "Customization group")
(special-form 'elisp-special-form)
(throw-tag 'elisp-throw-tag)
(feature 'elisp-feature)
+ (theme 'elisp-theme)
(widget-type 'font-lock-type-face)
(type 'font-lock-type-face)
(group 'font-lock-type-face)