From 3ca94e353bf6787c683d606830c2a781522b0d1a Mon Sep 17 00:00:00 2001 From: blais Date: Fri, 1 Apr 2005 01:15:46 +0000 Subject: [PATCH] Fixed another bug with emacs section titles, where using a regexp special character (e.g. +) as an underline wouldn't work. Also, I made the default boxing title indent to 1 space, as per bug report and dave's preference. git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk/docutils@3152 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/editors/emacs/restructuredtext.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/editors/emacs/restructuredtext.el b/tools/editors/emacs/restructuredtext.el index 30d70c1f3..6ab35cbcc 100644 --- a/tools/editors/emacs/restructuredtext.el +++ b/tools/editors/emacs/restructuredtext.el @@ -269,7 +269,7 @@ This is useful for filling list item paragraphs." "Default section underlining character to use when there aren't any others to be used in the file.") -(defvar rest-default-under-and-over-indent 2 +(defvar rest-default-under-and-over-indent 1 "Number of characters to indent the section title when toggling sectioning styles. This is used when switching from a simple section style to a over-and-under style.") @@ -402,7 +402,10 @@ This is useful for filling list item paragraphs." ;; else we're not switching characters, and there is some sectioning ;; already present, so check if the current sectioning is complete and ;; correct. - (let ((exps (concat "^" (make-string (+ endcol curindent) curchar) "$"))) + (let ((exps (concat "^" + (regexp-quote (make-string + (+ endcol curindent) curchar)) + "$"))) (if (or (not (save-excursion (forward-line +1) (beginning-of-line) -- 2.11.4.GIT