Skip to content

Commit d187b3d

Browse files
authored
Merge pull request purescript-emacs#20 from Hi-Angel/make-ci-pass
Fixing all byte-compilation errors
2 parents fbbbe60 + 9a9f550 commit d187b3d

19 files changed

+57
-54
lines changed

purescript-align-imports.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-align-imports.el --- Align the import lines in a PureScript file
1+
;;; purescript-align-imports.el --- Align the import lines in a PureScript file -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2010 Chris Done
44

purescript-collapse.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-collapse.el --- Collapse expressions
1+
;;; purescript-collapse.el --- Collapse expressions -*- lexical-binding: t -*-
22

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

purescript-decl-scan.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-decl-scan.el --- Declaration scanning module for PureScript Mode
1+
;;; purescript-decl-scan.el --- Declaration scanning module for PureScript Mode -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
44
;; Copyright (C) 1997-1998 Graeme E Moss

purescript-font-lock.el

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-font-lock.el --- Font locking module for PureScript Mode
1+
;;; purescript-font-lock.el --- Font locking module for PureScript Mode -*- lexical-binding: t -*-
22

33
;; Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
44
;; Copyright 1997-1998 Graeme E Moss, and Tommy Thorn
@@ -448,7 +448,7 @@ that should be commented under LaTeX-style literate scripts."
448448
(defun turn-on-purescript-font-lock ()
449449
"Turns on font locking in current buffer for PureScript 1.4 scripts.
450450
451-
Changes the current buffer's `font-lock-defaults', and adds the
451+
Changes the current buffer\\='s `font-lock-defaults', and adds the
452452
following variables:
453453
454454
`purescript-keyword-face' for reserved keywords and syntax,
@@ -470,7 +470,7 @@ Use the variable `font-lock-maximum-decoration' to choose
470470
non-default levels of fontification. For example, adding this to
471471
.emacs:
472472
473-
(setq font-lock-maximum-decoration '((purescript-mode . 2) (t . 0)))
473+
(setq font-lock-maximum-decoration \\='((purescript-mode . 2) (t . 0)))
474474
475475
uses level two fontification for `purescript-mode' and default level for
476476
all other modes. See documentation on this variable for further
@@ -480,17 +480,17 @@ To alter an attribute of a face, add a hook. For example, to change
480480
the foreground colour of comments to brown, add the following line to
481481
.emacs:
482482
483-
(add-hook 'purescript-font-lock-hook
483+
(add-hook \\='purescript-font-lock-hook
484484
(lambda ()
485-
(set-face-foreground 'purescript-comment-face \"brown\")))
485+
(set-face-foreground \\='purescript-comment-face \"brown\")))
486486
487487
Note that the colours available vary from system to system. To see
488488
what colours are available on your system, call
489489
`list-colors-display' from emacs.
490490
491491
To turn font locking on for all PureScript buffers, add this to .emacs:
492492
493-
(add-hook 'purescript-mode-hook 'turn-on-purescript-font-lock)
493+
(add-hook \\='purescript-mode-hook \\='turn-on-purescript-font-lock)
494494
495495
To turn font locking on for the current buffer, call
496496
`turn-on-purescript-font-lock'. To turn font locking off in the current

purescript-indent.el

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-indent.el --- "semi-intelligent" indentation module for PureScript Mode
1+
;;; purescript-indent.el --- "semi-intelligent" indentation module for PureScript Mode -*- lexical-binding: t -*-
22

33
;; Copyright 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
44
;; Copyright 1997-1998 Guy Lapalme
@@ -432,8 +432,9 @@ Returns the location of the start of the comment, nil otherwise."
432432
(purescript-indent-skip-blanks-and-newlines-forward end))))
433433

434434
(defun purescript-indent-next-symbol-safe (end)
435-
"Puts point to the next following symbol, or to end if there are no more symbols in the sexp."
436-
(condition-case errlist (purescript-indent-next-symbol end)
435+
"Puts point to the next following symbol, or to end if there are no more
436+
symbols in the sexp."
437+
(condition-case nil (purescript-indent-next-symbol end)
437438
(error (goto-char end))))
438439

439440
(defun purescript-indent-separate-valdef (start end)
@@ -1291,7 +1292,7 @@ We stay in the cycle as long as the TAB key is pressed."
12911292
(if marker
12921293
(goto-char (marker-position marker)))))))
12931294

1294-
(defun purescript-indent-region (start end)
1295+
(defun purescript-indent-region (_start _end)
12951296
(error "Auto-reindentation of a region is not supported"))
12961297

12971298
;;; alignment functions
@@ -1320,7 +1321,7 @@ of the regions to move."
13201321
(defun purescript-indent-align-def (p-arg type)
13211322
"Align guards or rpurs within the current definition before point.
13221323
If P-ARG is t align all defs up to the mark.
1323-
TYPE is either 'guard or 'rpurs."
1324+
TYPE is either \\='guard or \\='rpurs."
13241325
(save-excursion
13251326
(let (start-block end-block
13261327
(maxcol (if (eq type 'rpurs) purescript-indent-rpurs-align-column 0))
@@ -1429,9 +1430,9 @@ TYPE is either 'guard or 'rpurs."
14291430
(if regstack
14301431
(purescript-indent-shift-columns maxcol regstack)))))))
14311432

1432-
(defun purescript-indent-align-guards-and-rpurs (start end)
1433+
(defun purescript-indent-align-guards-and-rpurs (_start _end)
14331434
"Align the guards and rpurs of functions in the region, which must be active."
1434-
;; The `start' and `end' args are dummys right now: they're just there so
1435+
;; The `_start' and `_end' args are dummys right now: they're just there so
14351436
;; we can use the "r" interactive spec which properly signals an error.
14361437
(interactive "*r")
14371438
(purescript-indent-align-def t 'guard)

purescript-indentation.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-indentation.el -- indentation module for PureScript Mode -*- lexical-binding: t -*-
1+
;;; purescript-indentation.el -- indentation module for PureScript Mode -*- lexical-binding: t -*- -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2009 Kristof Bastiaensen
44

purescript-mode.el

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-mode.el --- A PureScript editing mode -*- coding: utf-8 -*-
1+
;;; purescript-mode.el --- A PureScript editing mode -*- coding: utf-8 lexical-binding: t -*-
22

33
;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc
44
;; Copyright (C) 1992, 1997-1998 Simon Marlow, Graeme E Moss, and Tommy Thorn
@@ -60,13 +60,13 @@ When MESSAGE is non-nil, display a message with the version."
6060
(interactive "P")
6161
(let* ((purescript-mode-dir (ignore-errors
6262
(file-name-directory (or (locate-library "purescript-mode") ""))))
63-
(_version (format "purescript-mode version %s (%s @ %s)"
63+
(version (format "purescript-mode version %s (%s @ %s)"
6464
purescript-version
6565
purescript-git-version
6666
purescript-mode-dir)))
6767
(if here
68-
(insert _version)
69-
(message "%s" _version))))
68+
(insert version)
69+
(message "%s" version))))
7070

7171
;;;###autoload
7272
(defun purescript-mode-view-news ()
@@ -87,7 +87,7 @@ When MESSAGE is non-nil, display a message with the version."
8787
;;;###autoload
8888
(defun purescript-customize ()
8989
"Browse the purescript customize sub-tree.
90-
This calls 'customize-browse' with purescript as argument and makes
90+
This calls `customize-browse' with purescript as argument and makes
9191
sure all purescript customize definitions have been loaded."
9292
(interactive)
9393
;; make sure all modules with (defcustom ...)s are loaded
@@ -413,7 +413,7 @@ see documentation for that variable for more details."
413413

414414
;;;###autoload(add-to-list 'auto-mode-alist '("\\.purs\\'" . purescript-mode))
415415

416-
(defun purescript-pursuit (query &optional info)
416+
(defun purescript-pursuit (query &optional _info)
417417
"Do a Pursuit search for QUERY.
418418
When `purescript-pursuit-command' is non-nil, this command runs
419419
that. Otherwise, it opens a Pursuit search result in the browser.
@@ -445,7 +445,9 @@ is asked to show extra info for the items matching QUERY.."
445445
:safe 'integerp)
446446

447447
(defun purescript-mode-suggest-indent-choice ()
448-
"Ran when the user tries to indent in the buffer but no indentation mode has been selected.
448+
"Ran when the user tries to indent in the buffer but no indentation mode
449+
has been selected.
450+
449451
Brings up the documentation for purescript-mode-hook."
450452
(describe-variable 'purescript-mode-hook))
451453

purescript-move-nested.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-move-nested.el --- Change the column of text nested below a line
1+
;;; purescript-move-nested.el --- Change the column of text nested below a line -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2010 Chris Done
44

@@ -34,7 +34,8 @@
3434

3535
;;;###autoload
3636
(defun purescript-move-nested (cols)
37-
"Shift the nested off-side-rule block adjacent to point by COLS columns to the right.
37+
"Shift the nested off-side-rule block adjacent to point by COLS columns
38+
to the right.
3839
3940
In Transient Mark mode, if the mark is active, operate on the contents
4041
of the region instead.

purescript-navigate-imports.el

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-navigate-imports.el --- A function for cycling through PureScript import lists
1+
;;; purescript-navigate-imports.el --- A function for cycling through PureScript import lists -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2010 Chris Done
44

@@ -98,10 +98,9 @@
9898
(purescript-navigate-imports-after-imports-p) ;; This one just speeds it up.
9999
(purescript-navigate-imports-line)))
100100
(forward-line))
101-
(let ((point (point)))
102-
(if (purescript-navigate-imports-line)
103-
(point)
104-
nil))))
101+
(if (purescript-navigate-imports-line)
102+
(point)
103+
nil)))
105104

106105
(defun purescript-navigate-imports-line ()
107106
"Try to match the current line as a regexp."

purescript-presentation-mode.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-presentation-mode.el --- Presenting PureScript things
1+
;;; purescript-presentation-mode.el --- Presenting PureScript things -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2013 Chris Done
44

purescript-show.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-show.el --- A pretty printer for PureScript Show values
1+
;;; purescript-show.el --- A pretty printer for PureScript Show values -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2011 Chris Done
44

purescript-simple-indent.el

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-simple-indent.el --- Simple indentation module for PureScript Mode
1+
;;; purescript-simple-indent.el --- Simple indentation module for PureScript Mode -*- lexical-binding: t -*-
22

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

@@ -143,19 +143,18 @@ column, `tab-to-tab-stop' is done instead."
143143
(defun purescript-simple-indent-newline-same-col ()
144144
"Make a newline and go to the same column as the current line."
145145
(interactive)
146-
(let ((point (point)))
147-
(let ((start-end
148-
(save-excursion
149-
(let* ((start (line-beginning-position))
150-
(end (progn (goto-char start)
151-
(search-forward-regexp
152-
"[^ ]" (line-end-position) t 1))))
153-
(when end (cons start (1- end)))))))
154-
(if start-end
155-
(progn (newline)
156-
(insert (buffer-substring-no-properties
157-
(car start-end) (cdr start-end))))
158-
(newline)))))
146+
(let ((start-end
147+
(save-excursion
148+
(let* ((start (line-beginning-position))
149+
(end (progn (goto-char start)
150+
(search-forward-regexp
151+
"[^ ]" (line-end-position) t 1))))
152+
(when end (cons start (1- end)))))))
153+
(if start-end
154+
(progn (newline)
155+
(insert (buffer-substring-no-properties
156+
(car start-end) (cdr start-end))))
157+
(newline))))
159158

160159
(defun purescript-simple-indent-newline-indent ()
161160
"Make a newline on the current column and indent on step."

purescript-sort-imports.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-sort-imports.el --- Sort the list of PureScript imports at the point alphabetically
1+
;;; purescript-sort-imports.el --- Sort the list of PureScript imports at the point alphabetically -*- lexical-binding: t -*-
22

33
;; Copyright (C) 2010 Chris Done
44

@@ -38,12 +38,12 @@
3838

3939
;;;###autoload
4040
(defun purescript-sort-imports ()
41-
(interactive)
4241
"Sort the import list at point. It sorts the current group
4342
i.e. an import list separated by blank lines on either side.
4443
4544
If the region is active, it will restrict the imports to sort
4645
within that region."
46+
(interactive)
4747
(when (purescript-sort-imports-at-import)
4848
(let* ((points (purescript-sort-imports-decl-points))
4949
(current-string (buffer-substring-no-properties (car points)

purescript-str.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-str.el --- PureScript related string utilities
1+
;;; purescript-str.el --- PureScript related string utilities -*- lexical-binding: t -*-
22

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

purescript-string.el

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
;;; purescript-string.el --- string manipulation utilties -*- lexical-binding: t -*-
12
;;;###autoload
23
(defun purescript-trim (string)
34
(replace-regexp-in-string

purescript-unicode-input-method.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-unicode-input-method.el --- PureScript Unicode helper functions -*- coding: utf-8 -*-
1+
;;; purescript-unicode-input-method.el --- PureScript Unicode helper functions -*- coding: utf-8 lexical-binding: t -*-
22

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

purescript-utils.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-utils.el --- General utility functions used by purescript-mode modules
1+
;;; purescript-utils.el --- General utility functions used by purescript-mode modules -*- lexical-binding: t -*-
22

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

purescript-yas.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-yas.el --- Customization support for Luke Hoersten's yasnippets
1+
;;; purescript-yas.el --- Customization support for Luke Hoersten's yasnippets -*- lexical-binding: t -*-
22

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

tests/haskell-sort-imports-tests.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; purescript-sort-imports-tests.el --- Unit tests for purescript-sort-imports
1+
;;; purescript-sort-imports-tests.el --- Unit tests for purescript-sort-imports -*- lexical-binding: t -*-
22

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

0 commit comments

Comments
 (0)