:imenu "OClosure type"
:namespace 'oclosure)
+(scope-define-symbol-type coding ()
+ :doc "Coding system names."
+ :face 'font-lock-type-face
+ :help (lambda (beg end _def)
+ (if-let ((sym (intern (buffer-substring-no-properties beg end))))
+ (lambda (&rest _)
+ (if-let ((doc (coding-system-doc-string sym)))
+ (format "Coding system `%S'.\n\n%s" sym doc)
+ "Coding system"))
+ "Coding system"))
+ :completion (constantly #'coding-system-p)
+ :namespace 'coding)
+
+(scope-define-symbol-type defcoding ()
+ :doc "Coding system definitions."
+ :face 'font-lock-type-face
+ :help (constantly "Coding system definition")
+ :imenu "Coding system"
+ :namespace 'coding)
+
(defvar scope-counter nil)
(defvar scope-local-functions nil)
(scope-define-function-analyzer oclosure--define
(&optional name _docstring parent-names _slots &rest props)
(when-let ((quoted (scope--unqoute name))) (scope-report-s quoted 'defoclosure))
- (dolist (parent parent-names)
- (when-let ((quoted (scope--unqoute parent))) (scope-report-s quoted 'oclosure)))
+ (when-let ((qs (scope--unqoute parent-names)))
+ (dolist (q qs)
+ (scope-report-s q 'oclosure)))
(while-let ((kw (car-safe props))
(bkw (scope-sym-bare kw))
((keywordp bkw)))
(when-let ((q (scope--unqoute (cadr props)))) (scope-report-s q 'defun))))
(setq props (cddr props))))
+(scope-define-function-analyzer define-coding-system
+ (&optional name _docstring &rest _props)
+ (when-let ((quoted (scope--unqoute name))) (scope-report-s quoted 'defcoding)))
+
+(scope-define-function-analyzer define-coding-system-alias
+ (&optional alias coding-system)
+ (when-let ((quoted (scope--unqoute alias))) (scope-report-s quoted 'defcoding))
+ (when-let ((quoted (scope--unqoute coding-system))) (scope-report-s quoted 'coding)))
+
+(scope-define-function-analyzer decode-coding-region
+ (&optional _start _end coding-system &rest _)
+ (when-let ((quoted (scope--unqoute coding-system))) (scope-report-s quoted 'coding)))
+
+(put 'encode-coding-region 'scope-analyzer #'scope--analyze-decode-coding-region)
+
+(scope-define-function-analyzer decode-coding-string
+ (&optional _string coding-system &rest _)
+ (when-let ((quoted (scope--unqoute coding-system))) (scope-report-s quoted 'coding)))
+
+(dolist (sym '(encode-coding-char encode-coding-string))
+ (put sym 'scope-analyzer #'scope--analyze-decode-coding-string))
+
+(scope-define-function-analyzer coding-system-mnemonic
+ (&optional coding-system &rest _)
+ (when-let ((quoted (scope--unqoute coding-system))) (scope-report-s quoted 'coding)))
+
+(dolist (sym '(add-to-coding-system-list
+ check-coding-system
+ coding-system-aliases
+ coding-system-base
+ coding-system-category
+ coding-system-change-eol-conversion
+ coding-system-change-text-conversion
+ coding-system-charset-list
+ coding-system-doc-string
+ coding-system-eol-type
+ coding-system-eol-type-mnemonic
+ coding-system-get
+ coding-system-plist
+ coding-system-post-read-conversion
+ coding-system-pre-write-conversion
+ coding-system-put
+ coding-system-translation-table-for-decode
+ coding-system-translation-table-for-encode
+ coding-system-type
+ describe-coding-system
+ prefer-coding-system
+ print-coding-system
+ print-coding-system-briefly
+ revert-buffer-with-coding-system
+ set-buffer-file-coding-system
+ set-clipboard-coding-system
+ set-coding-system-priority
+ set-default-coding-systems
+ set-file-name-coding-system
+ set-keyboard-coding-system
+ set-next-selection-coding-system
+ set-selection-coding-system
+ set-terminal-coding-system
+ universal-coding-system-argument))
+ (put sym 'scope-analyzer #'scope--analyze-coding-system-mnemonic))
+
(scope-define-function-analyzer thing-at-point (thing &optional _)
(when-let ((quoted (scope--unqoute thing))) (scope-report-s quoted 'thing)))
functions."
(let ((scope-counter 0)
(scope-callback callback)
- (read-symbol-shorthands nil))
+ (read-symbol-shorthands nil)
+ (max-lisp-eval-depth 32768))
(scope-1 nil (read-positioning-symbols (or stream (current-buffer))))))
(provide 'scope)
(widget-type '(widget-type))
(condition '(condition))
(icon '(deficon icon))
+ (coding '(defcoding coding))
(variable '(defvar variable constant))
(symbol-type '(symbol-type symbol-type-definition))
(function '(defun function macro special-form major-mode)))))
('condition '(define-error))
('icon '(define-icon))
('symbol-type '(define-symbol-type))
+ ('coding '(define-coding-system))
+ ('oclosure '(oclosure))
('widget-type '(define-widget)))))
(cl-loop for d in definitions
when (memq
(when-let ((file (find-lisp-object-file-name symbol 'define-icon)))
(push (elisp--xref-make-xref 'define-icon symbol file) xrefs)))
+ (when (coding-system-p symbol)
+ (when-let ((file (find-lisp-object-file-name symbol 'define-coding-system)))
+ (push (elisp--xref-make-xref 'define-coding-system symbol file) xrefs)))
+
(when (scope-symbol-type-p symbol)
(when-let ((file (find-lisp-object-file-name symbol 'define-symbol-type)))
(push (elisp--xref-make-xref 'define-symbol-type symbol file) xrefs)))