aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/texi-docstring-magic.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/texi-docstring-magic.el')
-rw-r--r--lib/texi-docstring-magic.el7
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)