   (modify-syntax-entry ?{       "(}"    specware-mode-syntax-table)
   (modify-syntax-entry ?}       "){"    specware-mode-syntax-table)
   (modify-syntax-entry ?\*      ". 67"  specware-mode-syntax-table)
-  (modify-syntax-entry ?\"      "\""    specware-mode-syntax-table)
+  (modify-syntax-entry ?\"      "\"    " specware-mode-syntax-table)
+  (modify-syntax-entry ?\\      "\\   " specware-mode-syntax-table)
   (modify-syntax-entry ?        " "     specware-mode-syntax-table)
   (modify-syntax-entry ?\t      " "     specware-mode-syntax-table)
   (modify-syntax-entry ?\%      "<   "     specware-mode-syntax-table)

  (message "%s" (concat "Electric semi mode is " 
                   (if sw:electric-semi-mode "on" "off"))))

(defun insert-circle-s () (interactive) (insert ""))
(defun insert-open-quote () (interactive) (insert ""))
(defun insert-close-quote () (interactive) (insert ""))
(defun insert-degree () (interactive) (insert ""))
(defun insert-center-dot () (interactive) (insert ""))
(defun insert-mu () (interactive) (insert ""))
(defun insert-times () (interactive) (insert ""))
(defun insert-beta () (interactive) (insert ""))
(defun insert-negation () (interactive) (insert ""))
(defun insert-emptyset () (interactive) (insert ""))

(require 'easymenu) 


                    (current-column)
                  0)))))
         (t
          (let ((follows-comma (sw:previous-line-ends-in-comma))
		(indent (sw:get-indent)))
            (cond
             ((looking-at "|")
              ;; Lets see if it is the follower of a function definition
              (if (sw:find-matching-starter
                   "\\bcase\\b\\|\\bfn\\b\\|\\band\\b\\|\\bhandle\\b")
                  (cond
                   ((looking-at "case\\b") (- (current-column) sw:pipe-indent))
                   ((looking-at "fn\\b") (1+ (current-column)))
                   ((looking-at "and\\b") (1+ (1+ (current-column))))
                   ((looking-at "handle\\b") (+ (current-column) 5)))
                (+ indent sw:pipe-indent)))
             (t
              (if sw:paren-lookback    ; Look for open parenthesis ?
                  (if follows-comma
		      (sw:get-paren-indent)
		    (max 
		     indent		; (if (looking-at "[])}]") (1- indent) indent)
		     (sw:get-paren-indent)))
                indent))))))))))

(defun sw:previous-line-ends-in-comma ()
  (save-excursion
    (sw:end-of-previous-line)
    (forward-comment -100)
    (while (re-search-backward comment-start (save-excursion (beginning-of-line)
							     (point))
			       t)
      (skip-chars-backward "\t\n "))
    (member (preceding-char) '(?, ?;))))

(defun sw:end-of-previous-line ()
  (beginning-of-line)
  (skip-chars-backward "\t\n "))

(defun sw:get-indent ()
  (save-excursion
