]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/rstdoc.el
emacs: use lexical-bindings in all libraries
[notmuch] / emacs / rstdoc.el
index 63fa2794c08c176ef116611e5d4d8fca0cda9a86..c7c130154a582841b084343f38787431e0bbe77a 100644 (file)
@@ -1,4 +1,4 @@
-;;; rstdoc.el --- help generate documentation from docstrings -*-lexical-binding: t-*-
+;;; rstdoc.el --- help generate documentation from docstrings  -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2018 David Bremner
 
@@ -40,6 +40,7 @@
   "Write docstrings from IN-FILE to OUT-FILE."
   (load-file in-file)
   (let* ((definitions (cdr (assoc (expand-file-name in-file) load-history)))
+        (text-quoting-style 'grave)
         (doc-hash (make-hash-table :test 'eq)))
     (mapc
      (lambda (elt)
   (insert "\n"))
 
 (defvar rst--escape-alist
-  '(("\\\\='" . "\\\\'")
-    ("\\([^\\]\\)'" . "\\1`")
-    ("^[[:space:]\t]*$" . "|br|")
-    ("^[[:space:]\t]" . "|indent| "))
-  "List of (regex . replacement) pairs.")
+  '( ("\\\\='" . "\001")
+     ("`\\([^\n`']*\\)[`']" . "\002\\1\002") ;; good enough for now...
+     ("`" . "\\\\`")
+     ("\001" . "'")
+     ("\002" . "`")
+     ("^[[:space:]]*$" . "|br|")
+     ("^[[:space:]]" . "|indent| "))
+    "list of (regex . replacement) pairs")
 
 (defun rstdoc--rst-quote-string (str)
   (with-temp-buffer