3535(require 'purescript-align-imports )
3636(require 'purescript-sort-imports )
3737(require 'purescript-string )
38- (with-no-warnings ( require 'cl ) )
38+ (require 'cl-lib )
3939
4040; ; All functions/variables start with `(literate-)purescript-'.
4141
@@ -288,13 +288,9 @@ details."
288288
289289(defvar eldoc-print-current-symbol-info-function )
290290
291- ; ; For compatibility with Emacs < 24, derive conditionally
292- (defalias 'purescript-parent-mode
293- (if (fboundp 'prog-mode ) 'prog-mode 'fundamental-mode ))
294-
295291; ; The main mode functions
296292;;;### autoload
297- (define-derived-mode purescript-mode purescript-parent -mode " PureScript"
293+ (define-derived-mode purescript-mode prog -mode " PureScript"
298294 " Major mode for editing PureScript programs.
299295
300296See also Info node `(purescript-mode)Getting Started' for more
@@ -344,8 +340,6 @@ see documentation for that variable for more details."
344340 (set (make-local-variable 'dabbrev-case-distinction ) nil )
345341 (set (make-local-variable 'dabbrev-case-replace ) nil )
346342 (set (make-local-variable 'dabbrev-abbrev-char-regexp ) " \\ sw\\ |[.]" )
347- (add-hook 'before-save-hook 'purescript-mode-before-save-handler nil t )
348- (add-hook 'after-save-hook 'purescript-mode-after-save-handler nil t )
349343 )
350344
351345(defun purescript-fill-paragraph (justify )
@@ -433,17 +427,19 @@ is asked to show extra info for the items matching QUERY.."
433427 current-prefix-arg)))
434428 (browse-url (format " https://pursuit.purescript.org/search?q=%s " query)))
435429
436- (defcustom purescript-completing-read-function 'ido- completing-read
430+ (defcustom purescript-completing-read-function 'completing-read
437431 " Default function to use for completion."
438432 :group 'purescript
439433 :type '(choice
434+ (function-item :tag " completing-read" :value completing-read)
440435 (function-item :tag " ido" :value ido-completing-read)
441436 (function-item :tag " helm" :value helm--completing-read-default)
442- (function-item :tag " completing-read" :value completing-read)
443437 (function :tag " Custom function" )))
444438
445439(defcustom purescript-indent-spaces 2
446- " Number of spaces to indent inwards." )
440+ " Number of spaces to indent inwards."
441+ :type 'integer
442+ :safe 'integerp )
447443
448444(defun purescript-mode-suggest-indent-choice ()
449445 " Ran when the user tries to indent in the buffer but no indentation mode has been selected.
@@ -469,20 +465,7 @@ Brings up the documentation for purescript-mode-hook."
469465 (format " [ %s .. ] " (purescript-string-take (purescript-trim (cadr lines)) 10 ))
470466 " " ))))))
471467
472- (defun purescript-mode-before-save-handler ()
473- " Function that will be called before buffer's saving."
474- )
475-
476- (defun purescript-mode-after-save-handler ()
477- " Function that will be called after buffer's saving."
478- )
479-
480- ; ; Provide ourselves:
481468
482469(provide 'purescript-mode )
483470
484- ; ; Local Variables:
485- ; ; byte-compile-warnings: (not cl-functions)
486- ; ; End:
487-
488471; ;; purescript-mode.el ends here
0 commit comments