Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skk-setup-melpa-isearch #221

Merged
merged 1 commit into from
Jul 1, 2023

Conversation

zonuexe
Copy link
Contributor

@zonuexe zonuexe commented Jul 1, 2023

Fix #219

hooks contain non-symbol values (e.g. byte-compiled function objects), so needs to be checked with symbolp before calling symbol-name.

My isearch-mode-hook actually contained compiled-functions added by other minor modes, so I was getting errors when trying to enable skk-mode.

(#f(compiled-function
    ()
    #<bytecode 0x11f31675f50387f5>)
   multi-isearch-setup)

@@ -835,11 +835,13 @@ Delete Selection $B%b!<%I$,(B SKK $B$r;H$C$?F|K\8lF~NO$KBP$7$F$b5!G=$9$k$h$&$
(setq skk-okuri-nasi-min (point-marker))))

(defun skk-setup-melpa-isearch ()
(and (string-match "melpa" (skk-version))
(and (string-match-p "melpa" (skk-version))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string-match is changing the match data. Replacing with string-match-p avoids side effects.

@tkita tkita merged commit 8c47f46 into skk-dev:master Jul 1, 2023
@zonuexe zonuexe deleted the fix/skk-setup-melpa-isearch branch July 3, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants