diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2007-12-14 15:40:14 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2007-12-14 15:40:14 +0000 |
commit | 3908b4c33f5d7d6d9d335f6e8656823d88afb6ad (patch) | |
tree | f5b1dcc0e06b523d2fb5cf1cff62bb03cb55b53d /lib/texi-docstring-magic.el | |
parent | e2bce0cfa89a8d248199a1a2ab7407814676b0ec (diff) |
Fix matching of quoted regions with empty lines
Diffstat (limited to 'lib/texi-docstring-magic.el')
-rw-r--r-- | lib/texi-docstring-magic.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/texi-docstring-magic.el b/lib/texi-docstring-magic.el index 46d38abe..e42b4ebf 100644 --- a/lib/texi-docstring-magic.el +++ b/lib/texi-docstring-magic.el @@ -103,17 +103,18 @@ ("\\({\\)" t "@{") ("\\(}\\)" t "@}") ;; 1. Indented lines are gathered into @lisp environment. - ("\\(^.*\\S-.*$\\)" + ("^\\(\n\\|.+\\)$" t (let ((line (match-string 0 docstring))) - (if (eq (char-syntax (string-to-char line)) ?\ ) + (if (save-match-data (string-match "^[ \t]" line)) ;; whitespace (if in-quoted-region line (setq in-quoted-region t) + (message "%s" line) (concat "@lisp\n" line)) - ;; non-white space + ;; non-white space/carriage return (if in-quoted-region (progn (setq in-quoted-region nil) |