Skip to content

Commit

Permalink
Enable lexical binding in all .el files
Browse files Browse the repository at this point in the history
Upstream Emacs has made lack of the directive a warning. So enable it
explicitly everywhere. It provides various benefits such as better
introspection by the compiler into the code and optimizations.

Fixes a bunch of warnings:

      Error: file has no ‘lexical-binding’ directive on its first line
  • Loading branch information
Hi-Angel committed Sep 30, 2024
1 parent b3bfeaa commit 3e1058c
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion purescript-align-imports.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-align-imports.el --- Align the import lines in a PureScript file
;;; purescript-align-imports.el --- Align the import lines in a PureScript file -*- lexical-binding: t -*-

;; Copyright (C) 2010 Chris Done

Expand Down
2 changes: 1 addition & 1 deletion purescript-collapse.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-collapse.el --- Collapse expressions
;;; purescript-collapse.el --- Collapse expressions -*- lexical-binding: t -*-

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

Expand Down
2 changes: 1 addition & 1 deletion purescript-decl-scan.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-decl-scan.el --- Declaration scanning module for PureScript Mode
;;; purescript-decl-scan.el --- Declaration scanning module for PureScript Mode -*- lexical-binding: t -*-

;; Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
;; Copyright (C) 1997-1998 Graeme E Moss
Expand Down
2 changes: 1 addition & 1 deletion purescript-font-lock.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-font-lock.el --- Font locking module for PureScript Mode
;;; purescript-font-lock.el --- Font locking module for PureScript Mode -*- lexical-binding: t -*-

;; Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Copyright 1997-1998 Graeme E Moss, and Tommy Thorn
Expand Down
2 changes: 1 addition & 1 deletion purescript-indent.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-indent.el --- "semi-intelligent" indentation module for PureScript Mode
;;; purescript-indent.el --- "semi-intelligent" indentation module for PureScript Mode -*- lexical-binding: t -*-

;; Copyright 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Copyright 1997-1998 Guy Lapalme
Expand Down
2 changes: 1 addition & 1 deletion purescript-indentation.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-indentation.el -- indentation module for PureScript Mode -*- lexical-binding: t -*-
;;; purescript-indentation.el -- indentation module for PureScript Mode -*- lexical-binding: t -*- -*- lexical-binding: t -*-

;; Copyright (C) 2009 Kristof Bastiaensen

Expand Down
2 changes: 1 addition & 1 deletion purescript-mode.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-mode.el --- A PureScript editing mode -*- coding: utf-8 -*-
;;; purescript-mode.el --- A PureScript editing mode -*- coding: utf-8 lexical-binding: t -*-

;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc
;; Copyright (C) 1992, 1997-1998 Simon Marlow, Graeme E Moss, and Tommy Thorn
Expand Down
2 changes: 1 addition & 1 deletion purescript-move-nested.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-move-nested.el --- Change the column of text nested below a line
;;; purescript-move-nested.el --- Change the column of text nested below a line -*- lexical-binding: t -*-

;; Copyright (C) 2010 Chris Done

Expand Down
2 changes: 1 addition & 1 deletion purescript-navigate-imports.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-navigate-imports.el --- A function for cycling through PureScript import lists
;;; purescript-navigate-imports.el --- A function for cycling through PureScript import lists -*- lexical-binding: t -*-

;; Copyright (C) 2010 Chris Done

Expand Down
2 changes: 1 addition & 1 deletion purescript-presentation-mode.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-presentation-mode.el --- Presenting PureScript things
;;; purescript-presentation-mode.el --- Presenting PureScript things -*- lexical-binding: t -*-

;; Copyright (C) 2013 Chris Done

Expand Down
2 changes: 1 addition & 1 deletion purescript-show.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-show.el --- A pretty printer for PureScript Show values
;;; purescript-show.el --- A pretty printer for PureScript Show values -*- lexical-binding: t -*-

;; Copyright (C) 2011 Chris Done

Expand Down
2 changes: 1 addition & 1 deletion purescript-simple-indent.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-simple-indent.el --- Simple indentation module for PureScript Mode
;;; purescript-simple-indent.el --- Simple indentation module for PureScript Mode -*- lexical-binding: t -*-

;; Copyright (C) 1998 Heribert Schuetz, Graeme E Moss

Expand Down
2 changes: 1 addition & 1 deletion purescript-sort-imports.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-sort-imports.el --- Sort the list of PureScript imports at the point alphabetically
;;; purescript-sort-imports.el --- Sort the list of PureScript imports at the point alphabetically -*- lexical-binding: t -*-

;; Copyright (C) 2010 Chris Done

Expand Down
2 changes: 1 addition & 1 deletion purescript-str.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-str.el --- PureScript related string utilities
;;; purescript-str.el --- PureScript related string utilities -*- lexical-binding: t -*-

;; Copyright (C) 2013 Herbert Valerio Riedel

Expand Down
1 change: 1 addition & 0 deletions purescript-string.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
;;; purescript-string.el --- string manipulation utilties -*- lexical-binding: t -*-
;;;###autoload
(defun purescript-trim (string)
(replace-regexp-in-string
Expand Down
2 changes: 1 addition & 1 deletion purescript-unicode-input-method.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-unicode-input-method.el --- PureScript Unicode helper functions -*- coding: utf-8 -*-
;;; purescript-unicode-input-method.el --- PureScript Unicode helper functions -*- coding: utf-8 lexical-binding: t -*-

;; Copyright (C) 2010-2011 Roel van Dijk

Expand Down
2 changes: 1 addition & 1 deletion purescript-utils.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-utils.el --- General utility functions used by purescript-mode modules
;;; purescript-utils.el --- General utility functions used by purescript-mode modules -*- lexical-binding: t -*-

;; Copyright (C) 2013 Herbert Valerio Riedel

Expand Down
2 changes: 1 addition & 1 deletion purescript-yas.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-yas.el --- Customization support for Luke Hoersten's yasnippets
;;; purescript-yas.el --- Customization support for Luke Hoersten's yasnippets -*- lexical-binding: t -*-

;; Copyright (C) 2013 John Wiegley, Luke Hoersten

Expand Down
2 changes: 1 addition & 1 deletion tests/haskell-sort-imports-tests.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; purescript-sort-imports-tests.el --- Unit tests for purescript-sort-imports
;;; purescript-sort-imports-tests.el --- Unit tests for purescript-sort-imports -*- lexical-binding: t -*-

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

Expand Down

0 comments on commit 3e1058c

Please sign in to comment.