branch: elpa/helm commit 2fcae8af8cbdce9303c77164fb0d7df03ebdd5e2 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Fix extraction of prefix in helm-occur pattern transformer --- helm-occur.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/helm-occur.el b/helm-occur.el index 0f26fc2753..18a5bd11d8 100644 --- a/helm-occur.el +++ b/helm-occur.el @@ -297,8 +297,12 @@ all buffers i.e. `buffer-list'. When GSHORTHANDS is nil use PATTERN unmodified." (if gshorthands (let* ((lshorthands (buffer-local-value 'read-symbol-shorthands buffer)) - (prefix (and (string-match "^\\(\\(?:[^-]+-\\)*\\)" pattern) - (match-string 1 pattern))) + (prefix (cl-loop for (k . v) in gshorthands + if (string-match (concat "\\`" k) pattern) + return k + else + if (string-match (concat "\\`" v) pattern) + return v)) (lgstr (cdr (or (assoc prefix gshorthands) (rassoc prefix gshorthands))))) (if (and lgstr lshorthands)