Better string checks in associate! macro

This commit is contained in:
Henrik Lissner 2016-04-19 22:08:59 -04:00
parent 698331e4f0
commit a55b3c599b

View file

@ -96,7 +96,7 @@ Examples:
(let ((hook-name (intern (format "narf--init-mode-%s" mode))))
`(progn
(defun ,hook-name ()
(when (and ,(if match `(string-match-p ,match buffer-file-name) t)
(when (and ,(if match `(if buffer-file-name (string-match-p ,match buffer-file-name)) t)
(or ,(not files)
(and (boundp ',mode)
(not ,mode)