mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-27 07:41:28 -08:00
; Rename scope.el to elisp-scope.el
* scope.el: Rename it to... * elisp-scope: New file. * lisp/progmodes/elisp-mode.el: Update accordingly.
This commit is contained in:
parent
761e706505
commit
c6ee775cb2
3 changed files with 2672 additions and 2670 deletions
2667
lisp/emacs-lisp/elisp-scope.el
Normal file
2667
lisp/emacs-lisp/elisp-scope.el
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -434,7 +434,7 @@ the role of each symbol and highlight it accordingly."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char pos)
|
(goto-char pos)
|
||||||
(beginning-of-defun)
|
(beginning-of-defun)
|
||||||
(scope (lambda (_type beg len id &optional _def)
|
(elisp-scope-analyze-form (lambda (_type beg len id &optional _def)
|
||||||
(when (<= beg pos (+ beg len))
|
(when (<= beg pos (+ beg len))
|
||||||
(setq cur id))
|
(setq cur id))
|
||||||
(when id (setf (alist-get beg all) (list len id))))))
|
(when id (setf (alist-get beg all) (list len id))))))
|
||||||
|
|
@ -491,7 +491,7 @@ the role of each symbol and highlight it accordingly."
|
||||||
(when elisp-add-help-echo
|
(when elisp-add-help-echo
|
||||||
(put-text-property
|
(put-text-property
|
||||||
beg end 'help-echo
|
beg end 'help-echo
|
||||||
(when-let* ((fun (scope-get-symbol-type-property type :help)))
|
(when-let* ((fun (elisp-scope-get-symbol-type-property type :help)))
|
||||||
(funcall fun beg end def)))))
|
(funcall fun beg end def)))))
|
||||||
|
|
||||||
(defvar font-lock-beg)
|
(defvar font-lock-beg)
|
||||||
|
|
@ -524,7 +524,7 @@ that `font-lock-keywords' applied takes precedence, if any."
|
||||||
(defun elisp-fontify-symbol (type beg len id &optional def)
|
(defun elisp-fontify-symbol (type beg len id &optional def)
|
||||||
(let ((end (+ beg len)))
|
(let ((end (+ beg len)))
|
||||||
(elisp--annotate-symbol-with-help-echo type beg end def)
|
(elisp--annotate-symbol-with-help-echo type beg end def)
|
||||||
(let ((face (scope-get-symbol-type-property type :face)))
|
(let ((face (elisp-scope-get-symbol-type-property type :face)))
|
||||||
(add-face-text-property
|
(add-face-text-property
|
||||||
beg end face
|
beg end face
|
||||||
(cl-case elisp-fontify-symbol-precedence-function
|
(cl-case elisp-fontify-symbol-precedence-function
|
||||||
|
|
@ -543,7 +543,8 @@ that `font-lock-keywords' applied takes precedence, if any."
|
||||||
"Fontify symbols between BEG and END according to their semantics."
|
"Fontify symbols between BEG and END according to their semantics."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char beg)
|
(goto-char beg)
|
||||||
(while (< (point) end) (ignore-errors (scope #'elisp-fontify-symbol)))))
|
(while (< (point) end)
|
||||||
|
(ignore-errors (elisp-scope-analyze-form #'elisp-fontify-symbol)))))
|
||||||
|
|
||||||
(defun elisp-fontify-region (beg end &optional loudly)
|
(defun elisp-fontify-region (beg end &optional loudly)
|
||||||
"Fontify ELisp code between BEG and END.
|
"Fontify ELisp code between BEG and END.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue