diff options
author | Chris Wanstrath <chris@ozmm.org> | 2010-03-06 20:02:32 -0800 |
---|---|---|
committer | Chris Wanstrath <chris@ozmm.org> | 2010-03-06 20:02:32 -0800 |
commit | 9ff612a39ab322ce7452c30c10ef5dbdb4c7c573 (patch) | |
tree | 3ba8ab981bdc086a77d2108bae6ab5a3130aa218 | |
parent | 84ab684761b4b89bf69e4f59ee021efd3f9b7072 (diff) | |
download | emacs-9ff612a39ab322ce7452c30c10ef5dbdb4c7c573.tar.gz |
single quotes
-rw-r--r-- | coffee-mode.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/coffee-mode.el b/coffee-mode.el index 51bff0425ad..dbf0780c3f3 100644 --- a/coffee-mode.el +++ b/coffee-mode.el @@ -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) |