Update extract module regexp for unicode quotes
GHC-7.8.x uses U+2018 and U+2019 for quotes. Also do not call ghc-resolve-document-path if module cannot be extracted in case of local functions.
This commit is contained in:
parent
e487a366d8
commit
3a88db6c2b
@ -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)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
Loading…
Reference in New Issue
Block a user