Permalink
Browse files

single quotes

  • Loading branch information...
1 parent 84ab684 commit 9ff612a39ab322ce7452c30c10ef5dbdb4c7c573 @defunkt committed Mar 7, 2010
Showing with 12 additions and 2 deletions.
  1. +12 −2 coffee-mode.el
View
@@ -48,8 +48,14 @@
;; would be highlighted.
))
-
-
+;; the command to comment/uncomment text
+(defun coffee-comment-dwim (arg)
+ "Comment or uncomment current line or region in a smart way.
+For detail, see `comment-dwim'."
+ (interactive "*P")
+ (require 'newcomment)
+ (let ((deactivate-mark nil) (comment-start "#") (comment-end ""))
+ (comment-dwim arg)))
;; define the mode
(define-derived-mode coffee-mode fundamental-mode
@@ -66,6 +72,10 @@
(modify-syntax-entry ?# "< b" coffee-mode-syntax-table)
(modify-syntax-entry ?\n "> b" coffee-mode-syntax-table)
+ ;; single quote strings
+ (modify-syntax-entry ?' "\"" coffee-mode-syntax-table)
+ (modify-syntax-entry ?' "\"" coffee-mode-syntax-table)
+
;; clear memory
(setq coffee-keywords-regexp nil)
(setq coffee-types-regexp nil)

0 comments on commit 9ff612a

Please sign in to comment.