Skip to content
Permalink
Browse files

Don't insert \" in string that wrap by `...` when current mode is gol…

…ang.
  • Loading branch information...
manateelazycat committed Feb 27, 2019
1 parent 29901e7 commit 8f3415f5ec2ed6f193744f3eeeb441d73dc80ab9
Showing with 11 additions and 3 deletions.
  1. +11 −3 awesome-pair.el
@@ -6,8 +6,8 @@
;; Maintainer: Andy Stewart <lazycat.manatee@gmail.com>
;; Copyright (C) 2018, Andy Stewart, all rights reserved.
;; Created: 2018-11-11 09:27:58
;; Version: 1.2
;; Last-Updated: 2019-02-09 02:27:40
;; Version: 1.3
;; Last-Updated: 2019-02-27 08:56:34
;; By: Andy Stewart
;; URL: http://www.emacswiki.org/emacs/download/awesome-pair.el
;; Keywords:
@@ -70,6 +70,9 @@

;;; Change log:
;;
;; 2019/02/27
;; * Don't insert \" in string that wrap by `...` when current mode is golang.
;;
;; 2019/02/09
;; * Insert ) directly in sh-mode for case ... in syntax.
;;
@@ -241,7 +244,12 @@
(defun awesome-pair-double-quote ()
(interactive)
(cond ((awesome-pair-in-string-p)
(insert "\\\""))
(if (and (derived-mode-p 'go-mode)
(equal (save-excursion (nth 3 (awesome-pair-current-parse-state))) 96))
;; When current mode is golang.
;; Don't insert \" in string that wrap by `...`
(insert "\"")
(insert "\\\"")))
((awesome-pair-in-comment-p)
(insert "\""))
(t

0 comments on commit 8f3415f

Please sign in to comment.
You can’t perform that action at this time.