FUEL: Better symbol at point recognition.

db4
Jose A. Ortega Ruiz 2008-12-19 22:35:34 +01:00
parent f9042f1340
commit 76bb45d300
1 changed files with 6 additions and 8 deletions

View File

@ -19,16 +19,14 @@
(defun fuel-syntax--beginning-of-symbol () (defun fuel-syntax--beginning-of-symbol ()
"Move point to the beginning of the current 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 () (defsubst fuel-syntax--symbol-start ()
(save-excursion (fuel-syntax--beginning-of-symbol) (point))) (save-excursion (fuel-syntax--beginning-of-symbol) (point)))
(defun fuel-syntax--end-of-symbol () (defun fuel-syntax--end-of-symbol ()
"Move point to the end of the current symbol." "Move point to the end of the current symbol."
(skip-syntax-forward "w_") (skip-syntax-forward "w_()"))
(while (looking-at ":") (forward-char)))
(defsubst fuel-syntax--symbol-end () (defsubst fuel-syntax--symbol-end ()
(save-excursion (fuel-syntax--end-of-symbol) (point))) (save-excursion (fuel-syntax--end-of-symbol) (point)))
@ -239,10 +237,10 @@
(defun fuel-syntax--beginning-of-block () (defun fuel-syntax--beginning-of-block ()
(save-excursion (save-excursion
(or (and (> (fuel-syntax--brackets-depth) 0) (if (> (fuel-syntax--brackets-depth) 0)
(fuel-syntax--brackets-start)) (fuel-syntax--brackets-start)
(and (fuel-syntax--beginning-of-defun) (point)) (fuel-syntax--beginning-of-defun)
(point)))) (point))))
(defun fuel-syntax--at-setter-line () (defun fuel-syntax--at-setter-line ()
(save-excursion (save-excursion