Ivan Andrus  committed 4990e9f

Fixed breakage in whizzy-narrow-to-tikz

  • Participants
  • Parent commits 776c45f

Comments (0)

Files changed (1)

File whizzy-tikz.el

+;; TODO: need to support things like \Vertex[]{} which don't terminate
+;; with a semi-colon.  Should really check out
+;; and see if that can parse it.
 (defun whizzy-narrow-to-tikz ()
   "Currently only supports environment form of tikz.
 Return nil if not in a tikz environment as defined by
                 (< n 10))
       (setq n (1+ n))
       (setq env (LaTeX-current-environment n)))
+    ;; Narrow to the current environment
     (if (string= "document" env)
         nil ;; Couldn't narrow
          (let ((LaTeX-syntactic-comments nil))
            (dotimes (dummy n)
-         ;; (sit-for 1)
       ;; Now try to limit to the current statement.
-                     (search-forward ";" nil t) ;; Maybe not guaranteed to work since
-                     ;; might have ; in node name etc.
-                     (show (point))))))
+                     (search-forward ";" nil t)
+                     ;; Not guaranteed to work since might have
+                     ;; semicolon in node name etc.
+                     (point)))))
         (narrow-to-region b1 e2)))))
 (defun whizzy-tikz-strip-trailing-zeros (string)