FUEL: fix factor-symbol-at-point so it counts " as a symbol character

db4
Björn Lindqvist 2016-03-13 08:36:31 +01:00
parent d62240a0a2
commit 120c9d646e
1 changed files with 7 additions and 8 deletions

View 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)))
;;; Regexps galore: