Skip to content
Browse files

Remove casts and superfluous parentheses

  • Loading branch information...
1 parent 3d4a170 commit 65a6d59ed4d6384c877f9a99ffc9da89655c71f9 Johan Tibell committed May 18, 2010
Showing with 10 additions and 1 deletion.
  1. +10 −1 ghc-core-mode.el
View
11 ghc-core-mode.el
@@ -55,7 +55,16 @@ prefixes in the given region."
"Str: DmdType\\|Worker \\)"
"\\([^]]*\\n?\\).*\\] *$") nil))
(goto-char (point-min))
- (while (search-forward "Main." nil t) (replace-match "" nil t))))
+ (while (search-forward "Main." nil t) (replace-match "" nil t))
+ (goto-char (point-min))
+ (while (search-forward "`cast`" nil t) (kill-sexp))
+ ;; Must come after the kill-sexp above.
+ (goto-char (point-min))
+ (while (search-forward "`cast`" nil t) (replace-match "" nil t))
+ (goto-char (point-min))
+ (while (search-forward-regexp "\(\\([a-z_][a-zA-Z_'0-9]*\\)[ \n]*\)" nil t)
+ (replace-match "\\1" t nil))
+ ))
(defun ghc-core-clean-buffer ()
"Remove commonly ignored annotations and namespace

0 comments on commit 65a6d59

Please sign in to comment.
Something went wrong with that request. Please try again.