preventing "unused variable" warnings.
This commit is contained in:
parent
24510719b8
commit
531a731da1
@ -295,14 +295,13 @@ nil do not display errors/warnings.
|
|||||||
(let ((file-msgs (ghc-get-only-holes)))
|
(let ((file-msgs (ghc-get-only-holes)))
|
||||||
(if (null file-msgs)
|
(if (null file-msgs)
|
||||||
(message "No holes")
|
(message "No holes")
|
||||||
(let ((file (ghc-file-msgs-get-file file-msgs))
|
(let ((msgs (ghc-file-msgs-get-msgs file-msgs)))
|
||||||
(msgs (ghc-file-msgs-get-msgs file-msgs)))
|
|
||||||
(ghc-display
|
(ghc-display
|
||||||
nil
|
nil
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(progn
|
(progn
|
||||||
(mapc (lambda (x) (insert x "\n\n")) msgs)
|
(mapc (lambda (x) (insert x "\n\n")) msgs)
|
||||||
(buttonize-buffer)) ))))))
|
(buttonize-buffer))))))))
|
||||||
|
|
||||||
(defun ghc-display-holes-to-minibuf ()
|
(defun ghc-display-holes-to-minibuf ()
|
||||||
(let ((file-msgs (ghc-get-only-holes)))
|
(let ((file-msgs (ghc-get-only-holes)))
|
||||||
@ -479,7 +478,7 @@ nil do not display errors/warnings.
|
|||||||
(forward-line)
|
(forward-line)
|
||||||
(re-search-forward "^$" nil t)
|
(re-search-forward "^$" nil t)
|
||||||
(insert fn)
|
(insert fn)
|
||||||
(dotimes (i arity)
|
(dotimes (_i arity)
|
||||||
(insert " _"))
|
(insert " _"))
|
||||||
(insert " = error \"" fn "\"\n")))))
|
(insert " = error \"" fn "\"\n")))))
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
(defconst ghc-doc-hackage-format
|
(defconst ghc-doc-hackage-format
|
||||||
"http://hackage.haskell.org/packages/archive/%s/%s/doc/html/%s.html")
|
"http://hackage.haskell.org/packages/archive/%s/%s/doc/html/%s.html")
|
||||||
|
|
||||||
(defun ghc-browse-url-safari (uri &rest args)
|
(defun ghc-browse-url-safari (uri &rest _args)
|
||||||
"Open a URI in Safari using AppleScript. This preserves anchors."
|
"Open a URI in Safari using AppleScript. This preserves anchors."
|
||||||
(let ((script (format "
|
(let ((script (format "
|
||||||
tell application \"Safari\"
|
tell application \"Safari\"
|
||||||
|
@ -18,9 +18,10 @@
|
|||||||
(defun ghc-replace-character (string from to)
|
(defun ghc-replace-character (string from to)
|
||||||
"Replace characters equal to FROM to TO in STRING."
|
"Replace characters equal to FROM to TO in STRING."
|
||||||
(let ((ret (copy-sequence string)))
|
(let ((ret (copy-sequence string)))
|
||||||
(dotimes (cnt (length ret) ret)
|
(dotimes (cnt (length ret))
|
||||||
(if (char-equal (aref ret cnt) from)
|
(if (char-equal (aref ret cnt) from)
|
||||||
(aset ret cnt to)))))
|
(aset ret cnt to)))
|
||||||
|
ret))
|
||||||
|
|
||||||
(defun ghc-replace-character-buffer (from-c to-c)
|
(defun ghc-replace-character-buffer (from-c to-c)
|
||||||
(let ((from (char-to-string from-c))
|
(let ((from (char-to-string from-c))
|
||||||
@ -66,7 +67,7 @@
|
|||||||
(dolist (lst lol)
|
(dolist (lst lol)
|
||||||
(dolist (key lst)
|
(dolist (key lst)
|
||||||
(puthash key key hash)))
|
(puthash key key hash)))
|
||||||
(maphash (lambda (key val) (ghc-add ret key)) hash)
|
(maphash (lambda (key _val) (ghc-add ret key)) hash)
|
||||||
ret))
|
ret))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -90,8 +91,9 @@
|
|||||||
(condition-case nil
|
(condition-case nil
|
||||||
(let ((m (set-marker (make-marker) 1 (current-buffer)))
|
(let ((m (set-marker (make-marker) 1 (current-buffer)))
|
||||||
ret)
|
ret)
|
||||||
(dotimes (i n (nreverse ret))
|
(dotimes (_i n)
|
||||||
(ghc-add ret (read m))))
|
(ghc-add ret (read m)))
|
||||||
|
(nreverse ret))
|
||||||
(error ()))))
|
(error ()))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -108,10 +110,11 @@
|
|||||||
|
|
||||||
(defun ghc-keyword-number-pair (spec)
|
(defun ghc-keyword-number-pair (spec)
|
||||||
(let ((len (length spec)) key ret)
|
(let ((len (length spec)) key ret)
|
||||||
(dotimes (i len (nreverse ret))
|
(dotimes (i len)
|
||||||
(setq key (intern (concat ":" (symbol-name (car spec)))))
|
(setq key (intern (concat ":" (symbol-name (car spec)))))
|
||||||
(setq ret (cons (cons key i) ret))
|
(setq ret (cons (cons key i) ret))
|
||||||
(setq spec (cdr spec)))))
|
(setq spec (cdr spec)))
|
||||||
|
(nreverse ret)))
|
||||||
|
|
||||||
(defmacro ghc-defstruct (type &rest spec)
|
(defmacro ghc-defstruct (type &rest spec)
|
||||||
`(progn
|
`(progn
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
|
|
||||||
(defvar ghc-indent-offset 4)
|
(defvar ghc-indent-offset 4)
|
||||||
|
|
||||||
(defun ghc-make-indent-shallower (beg end)
|
(defun ghc-make-indent-shallower (_beg _end)
|
||||||
(interactive "r")
|
(interactive "r")
|
||||||
(indent-rigidly (region-beginning) (region-end) (- ghc-indent-offset)))
|
(indent-rigidly (region-beginning) (region-end) (- ghc-indent-offset)))
|
||||||
|
|
||||||
(defun ghc-make-indent-deeper (beg end)
|
(defun ghc-make-indent-deeper (_beg _end)
|
||||||
(interactive "r")
|
(interactive "r")
|
||||||
(indent-rigidly (region-beginning) (region-end) ghc-indent-offset))
|
(indent-rigidly (region-beginning) (region-end) ghc-indent-offset))
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
(cons 'ghc-type-clear-overlay after-change-functions))
|
(cons 'ghc-type-clear-overlay after-change-functions))
|
||||||
(add-hook 'post-command-hook 'ghc-type-post-command-hook))
|
(add-hook 'post-command-hook 'ghc-type-post-command-hook))
|
||||||
|
|
||||||
(defun ghc-type-clear-overlay (&optional beg end len)
|
(defun ghc-type-clear-overlay (&optional _beg _end _len)
|
||||||
(when (overlayp ghc-type-overlay)
|
(when (overlayp ghc-type-overlay)
|
||||||
(ghc-type-set-ix 0)
|
(ghc-type-set-ix 0)
|
||||||
(ghc-type-set-point 0)
|
(ghc-type-set-point 0)
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
(funcall ghc-process-callback 'ng)
|
(funcall ghc-process-callback 'ng)
|
||||||
(setq ghc-process-running nil)))))))
|
(setq ghc-process-running nil)))))))
|
||||||
|
|
||||||
(defun ghc-process-sentinel (process event)
|
(defun ghc-process-sentinel (_process _event)
|
||||||
(setq ghc-process-running nil))
|
(setq ghc-process-running nil))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -126,12 +126,9 @@
|
|||||||
(lambda ()
|
(lambda ()
|
||||||
(insert "Possible completions:\n")
|
(insert "Possible completions:\n")
|
||||||
(mapc
|
(mapc
|
||||||
(lambda (x)
|
(lambda (_x)
|
||||||
(let* (; (ins1 (insert "- "))
|
(let ((pos-begin (point))
|
||||||
(pos-begin (point))
|
(pos-end (point)))
|
||||||
(ins (insert x))
|
|
||||||
(pos-end (point))
|
|
||||||
(ins3 (insert "\n")))
|
|
||||||
(make-button pos-begin pos-end :type 'auto-button)))
|
(make-button pos-begin pos-end :type 'auto-button)))
|
||||||
(ghc-sinfo-get-info info))))
|
(ghc-sinfo-get-info info))))
|
||||||
(select-window (ghc-auto-completion-window))))
|
(select-window (ghc-auto-completion-window))))
|
||||||
|
Loading…
Reference in New Issue
Block a user