Fixed the conflicts with the package which modify (buffer-name) value.
This commit is contained in:
parent
1b1245577e
commit
c99c448c65
@ -270,12 +270,13 @@ unloaded modules are loaded")
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defun ghc-gather-import-modules-all-buffers ()
|
(defun ghc-gather-import-modules-all-buffers ()
|
||||||
(let ((bufs (mapcar 'buffer-name (buffer-list)))
|
(let ((bufs (mapcar (lambda (b) (cons (buffer-name b) (buffer-file-name b)))
|
||||||
|
(buffer-list)))
|
||||||
ret)
|
ret)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(dolist (buf bufs (ghc-uniq-lol ret))
|
(dolist (buf bufs (ghc-uniq-lol ret))
|
||||||
(when (string-match "\\.hs$" buf)
|
(when (and (cdr buf) (string-match "\\.hs$" (cdr buf)))
|
||||||
(set-buffer buf)
|
(set-buffer (car buf))
|
||||||
(ghc-add ret (ghc-gather-import-modules-buffer)))))))
|
(ghc-add ret (ghc-gather-import-modules-buffer)))))))
|
||||||
|
|
||||||
(defun ghc-gather-import-modules-buffer ()
|
(defun ghc-gather-import-modules-buffer ()
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
(let* ((expr0 (ghc-things-at-point))
|
(let* ((expr0 (ghc-things-at-point))
|
||||||
(expr (if ask (ghc-read-expression expr0) expr0))
|
(expr (if ask (ghc-read-expression expr0) expr0))
|
||||||
(cdir default-directory)
|
(cdir default-directory)
|
||||||
(file (buffer-name))
|
(file buffer-file-name)
|
||||||
(buf (get-buffer-create ghc-error-buffer-name)))
|
(buf (get-buffer-create ghc-error-buffer-name)))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
@ -120,7 +120,7 @@
|
|||||||
(let* ((ln (int-to-string (line-number-at-pos)))
|
(let* ((ln (int-to-string (line-number-at-pos)))
|
||||||
(cn (int-to-string (current-column)))
|
(cn (int-to-string (current-column)))
|
||||||
(cdir default-directory)
|
(cdir default-directory)
|
||||||
(file (buffer-name)))
|
(file buffer-file-name))
|
||||||
(ghc-read-lisp
|
(ghc-read-lisp
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(cd cdir)
|
(cd cdir)
|
||||||
|
Loading…
Reference in New Issue
Block a user