File tree Expand file tree Collapse file tree 6 files changed +9
-7
lines changed Expand file tree Collapse file tree 6 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 6
6
; ; URL: https://github.com/haskell/haskell-snippets
7
7
; ; Keywords: snippets, haskell
8
8
; ; Version: 0.1.0
9
- ; ; Package-Requires: ((yasnippet "0.8.0"))
9
+ ; ; Package-Requires: ((cl-lib "0.5") ( yasnippet "0.8.0"))
10
10
11
11
; ; Permission is hereby granted, free of charge, to any person obtaining
12
12
; ; a copy of this software and associated documentation files (the
68
68
69
69
; ;; Code:
70
70
71
+ (require 'cl-lib )
72
+ (require 'yasnippet )
73
+
71
74
(setq haskell-snippets-dir
72
75
(file-name-directory load-file-name))
73
76
81
84
(eval-after-load 'yasnippet
82
85
'(haskell-snippets-initialize))
83
86
84
- (require 'yasnippet )
85
87
(provide 'haskell-snippets )
86
88
87
89
; ;; haskell-snippets.el ends here
Original file line number Diff line number Diff line change 6
6
# --
7
7
import qualified ${ 1 :Module } as ${ 2 :${ 1 :$ (let ((name (car (last (split-string yas-text " \\ \. " )))))
8
8
(if (= 0 (length name)) " "
9
- (subseq name 0 1 ))) } } $0
9
+ (cl- subseq name 0 1 ))) } } $0
Original file line number Diff line number Diff line change 5
5
# contributor : Luke Hoersten <luke@hoersten.org >
6
6
# --
7
7
{-# LANGUAGE `(when (boundp 'haskell-ghc-supported-extensions )
8
- (some #' (lambda (fn ) (funcall fn " Extension: " haskell-ghc-supported-extensions))
8
+ (cl- some #' (lambda (fn ) (funcall fn " Extension: " haskell-ghc-supported-extensions))
9
9
yas-prompt-functions)) ` #-}
Original file line number Diff line number Diff line change 8
8
module ${ 1 :`(if (not buffer-file-name) " Module"
9
9
(let ((name (file-name-sans-extension (buffer-file-name )))
10
10
(case-fold-search nil ))
11
- (if (search " src/" name)
11
+ (if (cl- search " src/" name)
12
12
(replace-regexp-in-string " /" " ."
13
13
(replace-regexp-in-string " ^\/ [^A-Z]*" " "
14
14
(car (last (split-string name " src" )))))
Original file line number Diff line number Diff line change 8
8
module ${ 1 :`(if (not buffer-file-name) " Module"
9
9
(let ((name (file-name-sans-extension (buffer-file-name )))
10
10
(case-fold-search nil ))
11
- (if (search " src/" name)
11
+ (if (cl- search " src/" name)
12
12
(replace-regexp-in-string " /" " ."
13
13
(replace-regexp-in-string " ^\/ [^A-Z]*" " "
14
14
(car (last (split-string name " src" )))))
Original file line number Diff line number Diff line change 5
5
# contributor : Luke Hoersten <luke@hoersten.org >
6
6
# --
7
7
{-# OPTIONS_GHC `(when (boundp 'haskell-ghc-supported-options )
8
- (some #' (lambda (fn ) (funcall fn " GHC Option: " haskell-ghc-supported-options))
8
+ (cl- some #' (lambda (fn ) (funcall fn " GHC Option: " haskell-ghc-supported-options))
9
9
yas-prompt-functions)) ` #-}
You can’t perform that action at this time.
0 commit comments