]> git.eshelyaron.com Git - emacs.git/commit
Improve errors & warnings due to fancy quoted vars (Bug#32939)
authorNoam Postavsky <npostavs@gmail.com>
Sat, 10 Mar 2018 23:12:55 +0000 (18:12 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 28 Nov 2019 23:10:07 +0000 (18:10 -0500)
commitb2790db049da98b541d07bac21ca7d7c220d3be0
tree61aba17be4946bf84dc0dd57b1d7157b88725c83
parent85f586f3ce5c6d9598d345440fd57e0fc9b8d98b
Improve errors & warnings due to fancy quoted vars (Bug#32939)

Add some hints to the message for byte compiler free & unused variable
warnings, and 'void-variable' errors where the variable has confusable
quote characters in it.
* lisp/help.el (uni-confusables), uni-confusables-regexp): New
constants.
(help-command-error-confusable-suggestions): New function, added to
`command-error-function'.
(help-uni-confusable-suggestions): New function.
* lisp/emacs-lisp/bytecomp.el (byte-compile-variable-ref):
* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Use it.

* lisp/emacs-lisp/lisp-mode.el
(lisp--match-confusable-symbol-character): New function.
(lisp-fdefs): Use it to fontify confusable characters with
font-lock-warning-face when they occur in symbol names.
* doc/lispref/modes.texi (Faces for Font Lock):
* doc/lispref/objects.texi (Basic Char Syntax): Recommend backslash
escaping of confusable characters, and mention new fontification.
* etc/NEWS: Announce the new fontification behavior.
* test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-fontify-confusables):
New test.
doc/lispref/modes.texi
doc/lispref/objects.texi
etc/NEWS
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/cconv.el
lisp/emacs-lisp/lisp-mode.el
lisp/help.el
test/lisp/emacs-lisp/lisp-mode-tests.el