(keymap-global-set "M-s h s" #'my-hi-lock-string)
(defun my-hi-lock-string (string &optional face) "Set face of each occurrence of STRING to FACE." (interactive (list (read-string "String to highlight" (if (use-region-p) (prog1 (buffer-substring (region-beginning) (region-end)) (deactivate-mark)))) (hi-lock-read-face-name))) (hi-lock-face-buffer (regexp-quote string) face))