Merge pull request #409 from iquiw/master

Update extract module regexp for unicode quotes
This commit is contained in:
Kazu Yamamoto 2014-12-01 11:48:42 +09:00
commit af7b910394

View File

@ -22,8 +22,8 @@
(setq expr (ghc-read-expression expr0)) (setq expr (ghc-read-expression expr0))
(setq info (ghc-get-info expr0)) (setq info (ghc-get-info expr0))
(setq mod (ghc-extact-module-from-info info))) (setq mod (ghc-extact-module-from-info info)))
(setq pkg-ver-path (ghc-resolve-document-path mod)) (setq pkg-ver-path (and mod (ghc-resolve-document-path mod)))
(if (and pkg-ver-path mod) (if pkg-ver-path
(ghc-display-document pkg-ver-path mod haskell-org expr) (ghc-display-document pkg-ver-path mod haskell-org expr)
(message "No document found")))) (message "No document found"))))
@ -75,7 +75,7 @@
(apply 'concat (nreverse acc)))) (apply 'concat (nreverse acc))))
(defun ghc-extact-module-from-info (info) (defun ghc-extact-module-from-info (info)
(when (string-match "\`\\([^']+\\)'" info) (when (string-match "[`\u2018]\\([^'\u2019]+\\)['\u2019]" info)
(match-string 1 info))) (match-string 1 info)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;