Commits

Ivan Andrus committed 4990e9f

Fixed breakage in whizzy-narrow-to-tikz

Comments (0)

Files changed (1)

   '("tikzpicture"
     "scope"))
 
+;; TODO: need to support things like \Vertex[]{} which don't terminate
+;; with a semi-colon.  Should really check out
+;; https://github.com/blerner/auc-tikz 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
       (narrow-to-region
          (let ((LaTeX-syntactic-comments nil))
            (dotimes (dummy n)
              (LaTeX-find-matching-end)))
-         ;; (sit-for 1)
          (point)))
 
       ;; Now try to limit to the current statement.
                      e1
                    (save-excursion
                      (end-of-line)
-                     (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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.