Skip to content

Commit

Permalink
Prefer string-match-p when we only need a boolean result
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Apr 10, 2024
1 parent d95677a commit fcc0944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exec-path-from-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ The default value denotes an interactive login shell."

(defun exec-path-from-shell--standard-shell-p (shell)
"Return non-nil iff SHELL supports the standard ${VAR-default} syntax."
(not (string-match "\\(fish\\|nu\\|t?csh\\)$" shell)))
(not (string-match-p "\\(fish\\|nu\\|t?csh\\)$" shell)))

(defmacro exec-path-from-shell--warn-duration (&rest body)
"Evaluate BODY and warn if execution duration exceeds a time limit.
Expand Down

0 comments on commit fcc0944

Please sign in to comment.