]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: fix factor-symbol-at-point so it counts " as a symbol character
authorBjörn Lindqvist <bjourne@gmail.com>
Sun, 13 Mar 2016 07:36:31 +0000 (08:36 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Sun, 13 Mar 2016 07:36:31 +0000 (08:36 +0100)
misc/fuel/factor-mode.el

index db311328a189f3aaf69137ca5623d35a6400849e..cf68ea6e3d455bc4844c2f703e67036b9a541193 100644 (file)
@@ -166,19 +166,18 @@ these lines in your .emacs:
 
 (defun factor-beginning-of-symbol ()
   "Move point to the beginning of the current symbol."
-  (skip-syntax-backward "w_()"))
+  (skip-syntax-backward "w_()\""))
 
 (defun factor-end-of-symbol ()
   "Move point to the end of the current symbol."
-  (skip-syntax-forward "w_()"))
+  (skip-syntax-forward "w_()\""))
 
-(put 'factor-symbol 'end-op 'factor-end-of-symbol)
-(put 'factor-symbol 'beginning-op 'factor-beginning-of-symbol)
+(put 'symbol 'end-op 'factor-end-of-symbol)
+(put 'symbol 'beginning-op 'factor-beginning-of-symbol)
 
-(defsubst factor-symbol-at-point ()
-  (let* ((thing (thing-at-point 'factor-symbol))
-         (s (when thing (substring-no-properties thing))))
-    (and (> (length s) 0) s)))
+(defun factor-symbol-at-point ()
+  (let ((thing (thing-at-point 'symbol t)))
+    (and (> (length thing) 0) thing)))
 
 \f
 ;;; Regexps galore: