]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: Better symbol at point recognition.
authorJose A. Ortega Ruiz <jao@gnu.org>
Fri, 19 Dec 2008 21:35:34 +0000 (22:35 +0100)
committerJose A. Ortega Ruiz <jao@gnu.org>
Fri, 19 Dec 2008 21:35:34 +0000 (22:35 +0100)
misc/fuel/fuel-syntax.el

index e4f9fe028800107526c673d67e6a96d00e9012a3..eb6ec6123e428a93f678fdf51c15210908794378 100644 (file)
 
 (defun fuel-syntax--beginning-of-symbol ()
   "Move point to the beginning of the current symbol."
-  (while (eq (char-before) ?:) (backward-char))
-  (skip-syntax-backward "w_"))
+  (skip-syntax-backward "w_()"))
 
 (defsubst fuel-syntax--symbol-start ()
   (save-excursion (fuel-syntax--beginning-of-symbol) (point)))
 
 (defun fuel-syntax--end-of-symbol ()
   "Move point to the end of the current symbol."
-  (skip-syntax-forward "w_")
-  (while (looking-at ":") (forward-char)))
+  (skip-syntax-forward "w_()"))
 
 (defsubst fuel-syntax--symbol-end ()
   (save-excursion (fuel-syntax--end-of-symbol) (point)))
 
 (defun fuel-syntax--beginning-of-block ()
   (save-excursion
-    (or (and (> (fuel-syntax--brackets-depth) 0)
-             (fuel-syntax--brackets-start))
-        (and (fuel-syntax--beginning-of-defun) (point))
-        (point))))
+    (if (> (fuel-syntax--brackets-depth) 0)
+        (fuel-syntax--brackets-start)
+      (fuel-syntax--beginning-of-defun)
+      (point))))
 
 (defun fuel-syntax--at-setter-line ()
   (save-excursion