diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-12 23:33:58 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-12 23:33:58 +0100 |
commit | 8e503205ba4daf6579da9abcb6b3b68408fbbb46 (patch) | |
tree | ba375a1340a472251c7a803770bfff86461f61fc /elisp | |
parent | 65d76d0f505a46a5059ced2d1f095ad42bff8388 (diff) | |
download | geiser-8e503205ba4daf6579da9abcb6b3b68408fbbb46.tar.gz geiser-8e503205ba4daf6579da9abcb6b3b68408fbbb46.tar.bz2 |
Better arg lists.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-edit.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el index 3a5618a..f0b854d 100644 --- a/elisp/geiser-edit.el +++ b/elisp/geiser-edit.el @@ -63,14 +63,17 @@ (regexp-opt '("define" "defmacro" "define-macro" "define-syntax" "define*"))) (defsubst geiser-edit--def-re (symbol) - (format "(%s +(?%s" geiser-edit--def-re symbol)) + (format "(%s +(?%s" geiser-edit--def-re (regexp-quote (symbol-name symbol)))) + +(defsubst geiser-edit--symbol-re (symbol) + (format "\\_<%s\\_>" (regexp-quote (symbol-name symbol)))) (defun geiser-edit--goto-line (symbol line) (if (numberp line) (goto-line line) (goto-char (point-min)) (when (or (re-search-forward (geiser-edit--def-re symbol) nil t) - (re-search-forward (format "\\_<%s\\_>" symbol) nil t)) + (re-search-forward (geiser-edit--symbol-re symbol) nil t)) (goto-char (match-beginning 0))))) (defun geiser-edit--try-edit (symbol ret) |