Skip to content

Commit ea977e9

Browse files
committed
Merge pull request #827 from deepfire/lexically-yours
Enable lexical binding in every source lisp file
2 parents e61260b + 1d861d3 commit ea977e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+124
-138
lines changed

ghc-core.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; ghc-core.el --- Syntax highlighting module for GHC Core
1+
;;; ghc-core.el --- Syntax highlighting module for GHC Core -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2010 Johan Tibell
44

ghci-script-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; ghci-script-mode.el --- GHCi scripts major mode
1+
;;; ghci-script-mode.el --- GHCi scripts major mode -*- lexical-binding: t -*-
22

33
;; Copyright (c) 2014 Chris Done. All rights reserved.
44

haskell-align-imports.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-align-imports.el --- Align the import lines in a Haskell file
1+
;;; haskell-align-imports.el --- Align the import lines in a Haskell file -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2010 Chris Done
44

haskell-bot.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-bot.el --- A Lambdabot interaction mode
1+
;;; haskell-bot.el --- A Lambdabot interaction mode -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
44
;; Copyright (C) 2001 Chris Webb

haskell-cabal.el

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-cabal.el --- Support for Cabal packages
1+
;;; haskell-cabal.el --- Support for Cabal packages -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2007, 2008 Stefan Monnier
44

@@ -459,8 +459,7 @@ resultung buffer-content"
459459
(,beg (plist-get ,section :beginning))
460460
(,end (plist-get ,section :end))
461461
(,start-col (plist-get ,section :data-start-column))
462-
(,section-data (buffer-substring ,beg ,end))
463-
(section-name (plist-get ,section :name )))
462+
(,section-data (buffer-substring ,beg ,end)))
464463
(save-excursion
465464
(prog1
466465
(with-temp-buffer
@@ -534,8 +533,7 @@ resultung buffer-content"
534533
"Strip indentation from each line, execute FORMS and reinstate indentation
535534
so that the indentation of the FIRST LINE matches"
536535
(let ((old-l1-indent (make-symbol "new-l1-indent"))
537-
(new-l1-indent (make-symbol "old-l1-indent"))
538-
(res nil))
536+
(new-l1-indent (make-symbol "old-l1-indent")))
539537
`(let ( (,old-l1-indent (save-excursion
540538
(goto-char (point-min))
541539
(current-indentation))))
@@ -672,9 +670,9 @@ resultung buffer-content"
672670
(let ((downcase-name (downcase name)))
673671
(haskell-cabal-find-subsection-by
674672
section
675-
'(lambda (subsection)
673+
`(lambda (subsection)
676674
(string= (downcase (haskell-cabal-section-name subsection))
677-
downcase-name)))))
675+
,downcase-name)))))
678676

679677
(defun haskell-cabal-goto-subsection (name)
680678
(let ((subsection (haskell-cabal-find-subsection (haskell-cabal-section) name)))
@@ -807,7 +805,6 @@ Source names from main-is and c-sources sections are left untouched
807805
(if (null candidates)
808806
(let* ((src-dir (haskell-cabal-join-paths base-dir (or (car src-dirs) "")))
809807
(newfile (haskell-cabal-join-paths src-dir filename))
810-
(subdir (file-name-directory newfile))
811808
(do-create-p (y-or-n-p (format "Create file %s ?" newfile))))
812809
(when do-create-p
813810
(find-file-other-window newfile )))

haskell-checkers.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-checkers.el --- Emacs interface to haskell lint and style checkers
1+
;;; haskell-checkers.el --- Emacs interface to haskell lint and style checkers -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2009-2011 Alex Ott, Liam O'Reilly
44
;;
@@ -128,13 +128,13 @@
128128
(when (re-search-forward new-old-code eline t)
129129
(replace-match new-code nil t)))))))
130130

131-
(defun haskell-lint-finish-hook (buf msg)
131+
(defun haskell-lint-finish-hook (_buf _msg)
132132
"Function, that is executed at the end of HLint or scan execution"
133133
(if haskell-checkers-replace-with-suggestions
134134
(haskell-lint-replace-suggestions)
135135
(next-error 1 t)))
136136

137-
(defun haskell-scan-finish-hook (buf msg)
137+
(defun haskell-scan-finish-hook (_buf _msg)
138138
"Function, that is executed at the end of haskell-scan execution"
139139
(next-error 1 t))
140140

haskell-collapse.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-collapse.el --- Collapse expressions
1+
;;; haskell-collapse.el --- Collapse expressions -*- lexical-binding: t -*-
22

33
;; Copyright (c) 2014 Chris Done. All rights reserved.
44

haskell-commands.el

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-commands.el --- Commands that can be run on the process
1+
;;; haskell-commands.el --- Commands that can be run on the process -*- lexical-binding: t -*-
22

33
;;; Commentary:
44

@@ -343,7 +343,7 @@ should be inserted."
343343
expr))))))
344344

345345
;;;###autoload
346-
(defun haskell-mode-jump-to-def-or-tag (&optional next-p)
346+
(defun haskell-mode-jump-to-def-or-tag (&optional _next-p)
347347
;; FIXME NEXT-P arg is not used
348348
"Jump to the definition.
349349
Jump to definition of identifier at point by consulting GHCi, or
@@ -513,7 +513,7 @@ Requires the :loc-at command from GHCi."
513513
'face 'compilation-error)))))))
514514

515515
;;;###autoload
516-
(defun haskell-process-cd (&optional not-interactive)
516+
(defun haskell-process-cd (&optional _not-interactive)
517517
;; FIXME optional arg is not used
518518
"Change directory."
519519
(interactive)
@@ -585,7 +585,7 @@ Query PROCESS to `:cd` to directory DIR."
585585
(if (string-match "^[A-Za-z_]" (cdr state))
586586
(format ":info %s" (cdr state))
587587
(format ":info (%s)" (cdr state)))))
588-
:complete (lambda (state response)
588+
:complete (lambda (_state response)
589589
(unless (or (string-match "^Top level" response)
590590
(string-match "^<interactive>" response))
591591
(haskell-mode-message-line response)))))))
@@ -603,7 +603,7 @@ Query PROCESS to `:cd` to directory DIR."
603603
(if (string-match "^[A-Za-z_]" (cdr state))
604604
(format ":type %s" (cdr state))
605605
(format ":type (%s)" (cdr state)))))
606-
:complete (lambda (state response)
606+
:complete (lambda (_state response)
607607
(unless (or (string-match "^Top level" response)
608608
(string-match "^<interactive>" response))
609609
(haskell-mode-message-line response)))))))
@@ -719,7 +719,7 @@ function `xref-find-definitions' after new table was generated."
719719
(haskell-process-session (car state)))
720720
"find . -name '*.hs' -print0 -or -name '*.lhs' -print0 -or -name '*.hsc' -print0"
721721
"xargs -0 hasktags -e -x"))))
722-
:complete (lambda (state response)
722+
:complete (lambda (state _response)
723723
(when (cdr state)
724724
(let ((session-tags
725725
(haskell-session-tags-filename
@@ -802,9 +802,9 @@ output. If CMD fails the buffer remains unchanged."
802802
(while (string-match "\\`\n+\\|^\\s-+\\|\\s-+$\\|\n+\\'" str)
803803
(setq str (replace-match "" t t str)))
804804
str))
805-
(errout (lambda (fmt &rest args)
806-
(let* ((warning-fill-prefix " "))
807-
(display-warning cmd (apply 'format fmt args) :warning))))
805+
(_errout (lambda (fmt &rest args)
806+
(let* ((warning-fill-prefix " "))
807+
(display-warning cmd (apply 'format fmt args) :warning))))
808808
(filename (buffer-file-name (current-buffer)))
809809
(cmd-prefix (replace-regexp-in-string " .*" "" cmd))
810810
(tmp-file (make-temp-file cmd-prefix))
@@ -813,9 +813,9 @@ output. If CMD fails the buffer remains unchanged."
813813
haskell-session)
814814
(haskell-session-cabal-dir haskell-session)
815815
default-directory))
816-
(errcode (with-temp-file tmp-file
817-
(call-process cmd filename
818-
(list (current-buffer) err-file) nil)))
816+
(_errcode (with-temp-file tmp-file
817+
(call-process cmd filename
818+
(list (current-buffer) err-file) nil)))
819819
(stderr-output
820820
(with-temp-buffer
821821
(insert-file-contents err-file)

haskell-compat.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-compat.el --- legacy/compatibility backports for haskell-mode
1+
;;; haskell-compat.el --- legacy/compatibility backports for haskell-mode -*- lexical-binding: t -*-
22
;;
33
;; Filename: haskell-compat.el
44
;; Description: legacy/compatibility backports for haskell-mode

haskell-compile.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; haskell-compile.el --- Haskell/GHC compilation sub-mode
1+
;;; haskell-compile.el --- Haskell/GHC compilation sub-mode -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2013 Herbert Valerio Riedel
44

0 commit comments

Comments
 (0)