cosmetic change.
This commit is contained in:
parent
2c870867c1
commit
952c255696
@ -269,14 +269,19 @@ unloaded modules are loaded")
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(ghc-defstruct buffer name file)
|
||||
|
||||
(defun ghc-buffer-name-file (buf)
|
||||
(ghc-make-buffer (buffer-name buf) (buffer-file-name buf)))
|
||||
|
||||
(defun ghc-gather-import-modules-all-buffers ()
|
||||
(let ((bufs (mapcar (lambda (b) (cons (buffer-name b) (buffer-file-name b)))
|
||||
(buffer-list)))
|
||||
ret)
|
||||
(let ((bufs (mapcar 'ghc-buffer-name-file (buffer-list)))
|
||||
ret file)
|
||||
(save-excursion
|
||||
(dolist (buf bufs (ghc-uniq-lol ret))
|
||||
(when (and (cdr buf) (string-match "\\.hs$" (cdr buf)))
|
||||
(set-buffer (car buf))
|
||||
(setq file (ghc-buffer-get-file buf))
|
||||
(when (and file (string-match "\\.hs$" file))
|
||||
(set-buffer (ghc-buffer-get-name buf))
|
||||
(ghc-add ret (ghc-gather-import-modules-buffer)))))))
|
||||
|
||||
(defun ghc-gather-import-modules-buffer ()
|
||||
|
@ -23,7 +23,7 @@
|
||||
(let* ((expr0 (ghc-things-at-point))
|
||||
(expr (if ask (ghc-read-expression expr0) expr0))
|
||||
(cdir default-directory)
|
||||
(file buffer-file-name)
|
||||
(file (buffer-file-name))
|
||||
(buf (get-buffer-create ghc-error-buffer-name)))
|
||||
(with-current-buffer buf
|
||||
(erase-buffer)
|
||||
@ -120,7 +120,7 @@
|
||||
(let* ((ln (int-to-string (line-number-at-pos)))
|
||||
(cn (int-to-string (current-column)))
|
||||
(cdir default-directory)
|
||||
(file buffer-file-name))
|
||||
(file (buffer-file-name)))
|
||||
(ghc-read-lisp
|
||||
(lambda ()
|
||||
(cd cdir)
|
||||
|
Loading…
Reference in New Issue
Block a user