             (condition-case ()
                 (while t
                   (search-forward "\"")
-                  (setq numb (1+ numb)))
+                  (unless (and (not (eq (current-column) 1))
+			       (save-excursion (forward-char -2)
+					       (looking-at "\\\\")))
+		    (setq numb (1+ numb))))
               (error (if (and (not (zerop numb))
                               (not (zerop (% numb 2))))
                          t nil)))))))))
-
+ 
 (defun sw:skip-block ()
   (let ((case-fold-search nil))
     (sw:backward-sexp)

  (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 ?\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) 

