 
 ;; Internal buffer operations
 
+(defun shm-get-qop-string (node)
+  "Get the string of the operator, if the node is an operator."
+  (when (string= (shm-node-type-name node) "QOp")
+    (buffer-substring-no-properties (shm-node-start node)
+                                    (shm-node-end node))))
+
 (defun shm-kill-to-end-of-line (&optional prepend-newline)
   "Kill everything possible to kill after point before the end of
 the line."

         (inhibit-read-only t))
    (cond
     ((or (string= (shm-node-type-name current)
               "ImportSpecList")
          (and (string= (shm-node-type-name current)
                    "ModuleName")
               (looking-at "$")
               parent
               (string= (shm-node-type-name parent)

         (current (cdr current-pair))
         (parent-pair (shm-node-parent current-pair))
         (parent (cdr parent-pair)))
    (cond
     ((eq 'InfixApp (shm-node-cons parent))
      (let ((qop
             (or (shm-get-qop-string (cdr (shm-node-previous current-pair)))
                 (shm-get-qop-string (cdr (shm-node-next current-pair))))))
        (cond
         (qop
          (cond
           ((= (point) (shm-node-start current))
            (let ((point (point)))
              (insert " " qop " ")
              (goto-char point)))
           ((= (point) (shm-node-end current))
            (insert " " qop " "))
           (t (error "Please go to the start or end of the node to indicate direction."))))
         (t (error "Unable to figure out the operator.")))))
     (t (error "Not in an infix application.")))))

(defun shm/raise ()
  "Raise the expression up one, replacing its parent."
