From 737ff828d763e156a6072a532f2c3d2d0c26178e Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sat, 7 Oct 2023 14:41:28 -0700 Subject: Look for "function" or "variable" text in doc comments case-insensitively Fixes #326 --- helpful.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/helpful.el b/helpful.el index 60049a2..d8a99af 100644 --- a/helpful.el +++ b/helpful.el @@ -793,16 +793,17 @@ bound) or else highlight." sym-name) (propertize sym-name 'face 'font-lock-builtin-face)) - ((and (boundp sym) (s-ends-with-p "variable " before-txt)) + ((and (boundp sym) (s-ends-with-p "variable " (downcase before-txt))) (helpful--button sym-name 'helpful-describe-exactly-button 'symbol sym 'callable-p nil)) - ((and (fboundp sym) (or - (s-starts-with-p " command" after-txt) - (s-ends-with-p "command " before-txt) - (s-ends-with-p "function " before-txt))) + ((and (fboundp sym) + (or + (s-starts-with-p " command" (downcase after-txt)) + (s-ends-with-p "command " (downcase before-txt)) + (s-ends-with-p "function " (downcase before-txt)))) (helpful--button sym-name 'helpful-describe-exactly-button -- cgit v1.0