summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2020-12-28 09:20:17 +0000
committerJoão Távora <joaotavora@gmail.com>2020-12-28 23:09:29 +0000
commitd199a4640f53673a3bba79ab82cf819009e65e8f (patch)
tree4e13a56ce39a8b335ce44d54fcee663b14fa2273 /test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el
parentd180a41dbb8e4e8d94d30a023c2d86d92c73c4f1 (diff)
downloademacs-d199a4640f53673a3bba79ab82cf819009e65e8f.tar.gz
emacs-d199a4640f53673a3bba79ab82cf819009e65e8f.tar.bz2
emacs-d199a4640f53673a3bba79ab82cf819009e65e8f.zip
Robustify completion match scoring for optimized patterns
Fixes: bug#42149 The function completion-pcm--hilit-commonality, which propertizes and scores a previously confirmed match, expected its PATTERN argument to match the strings of COMPLETIONS entirely (i.e. up to the string's very end). But sometimes the ending wildcard, represented by the 'any' atom in PATTERN, is optimized away by completion-pcm--optimize-pattern. Although this is mostly benign in terms of highlighting commonality, it leads to incorrect score values. In this change, we ensure that completion-pcm--hilit-commonality is aware of this exception and isn't affected by it. We also document the function a bit better and simplify its workings. Originally reported by Dario Gjorgjevski <dario.gjorgjevski@gmail.com> * lisp/minibuffer.el (completion-pcm--hilit-commonality): Simplify. Add docstring. * lisp/minibuffer.el (completion-pcm--hilit-commonality): Add docstring
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el')
0 files changed, 0 insertions, 0 deletions