From c91765f2c59ff1b8855f18760b124efda2ad7778 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 25 Nov 1998 12:31:38 +0000 Subject: Added syntax table stuff --- generic/texi-docstring-magic.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generic/texi-docstring-magic.el b/generic/texi-docstring-magic.el index 8d42b2e3..dabaa873 100644 --- a/generic/texi-docstring-magic.el +++ b/generic/texi-docstring-magic.el @@ -50,10 +50,11 @@ (concat "@var{" (downcase (match-string 1 docstring)) "}" (match-string 2 docstring))) ;; Words sym which are symbols become @code{sym}. - ;; Must have at least one hyphen to be recognized. + ;; Must have at least one hyphen to be recognized, + ;; terminated in whitespace, end of line, or punctuation. ;; (Only consider symbols made from word constituents ;; and hyphens). - ("\\(\\w+\\-\\(\\w\\|\\-\\)+\\)\\(\\s-\\|\\.\\|$\\)" + ("\\(\\w+\\-\\(\\w\\|\\-\\)+\\)\\(\\s-\\|\\s.\\|$\\)" (or (boundp (intern (match-string 1 docstring))) (fboundp (intern (match-string 1 docstring)))) (concat "@code{" (match-string 1 docstring) "}" @@ -76,6 +77,7 @@ and forms such as (match-string 1 docstring)") (replace (nth 2 test)) (i 0) in-quoted-region) + (while (and (< i (length docstring)) (string-match regexp docstring i)) -- cgit v1.2.3