diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el index 1dad4a558a3..7f66e277b2f 100644 --- a/lisp/emacs-lisp/elisp-scope.el +++ b/lisp/emacs-lisp/elisp-scope.el @@ -2828,6 +2828,10 @@ is locally defined, or nil. If SYM is itself a binding occurrence, then POS and DEF are equal. If SYM is not lexically bound, then DEF is nil and so is ID. +CALLBACK should use ID by checking if it is nil or `equal' to other ID +values produced in the same call to this function. The specific value +of a given ID is otherwise meaningless. + As an example, when this function analyzes the following form (lambda (mode) (let ((mode (or mode major-mode))) (symbol-name mode))) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 6ccbe14f265..5a550b33016 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -618,7 +618,9 @@ semantic highlighting takes precedence." If `elisp-add-help-echo' is non-nil, also annotate the symbol with the `help-echo' text property. If `cursor-sensor-mode' is enabled and ID is -non-nil, also annotate the symbol with `cursor-sensor-functions'. +non-nil (i.e. SYM is local variable), also annotate the symbol with +`cursor-sensor-functions' that highlight all occurrences of SYM with the +same ID whenever point is on this SYM. For the precise meaning of the arguments of this function, see the docstring of `elisp-scope-analyze-form'. This function is intended for