Преглед на файлове

Backport commit 8832cc5f9 from Emacs

* lisp/ob-abc.el (org-babel-expand-body:abc, org-babel-execute:abc):
* lisp/ob-forth.el (org-babel-forth-session-execute):
Add backslash in regexp for correctness.
* lisp/org-list.el (org-plain-list-ordered-item-terminator):
Add backslash in doc comment so that it appears as intended.

Fix some ineffective backslashes in string literals
8832cc5f91a420db6bea65f381a3fb3597eb7523
Mattias Engdegård
Sat Mar 16 11:38:58 2019 -0700
Mattias Engdegård преди 6 години
родител
ревизия
5746958954
променени са 3 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 2 2
      lisp/ob-abc.el
  2. 1 1
      lisp/ob-forth.el
  3. 1 1
      lisp/org-list.el

+ 2 - 2
lisp/ob-abc.el

@@ -47,7 +47,7 @@
 	     (value (cdr pair)))
 	     (value (cdr pair)))
 	 (setq body
 	 (setq body
 	       (replace-regexp-in-string
 	       (replace-regexp-in-string
-		(concat "\$" (regexp-quote name))
+		(concat "\\$" (regexp-quote name))
 		(if (stringp value) value (format "%S" value))
 		(if (stringp value) value (format "%S" value))
 		body))))
 		body))))
      vars)
      vars)
@@ -59,7 +59,7 @@
   (message "executing Abc source code block")
   (message "executing Abc source code block")
   (let* ((cmdline (cdr (assq :cmdline params)))
   (let* ((cmdline (cdr (assq :cmdline params)))
 	 (out-file (let ((file (cdr (assq :file params))))
 	 (out-file (let ((file (cdr (assq :file params))))
-		     (if file (replace-regexp-in-string "\.pdf$" ".ps" file)
+		     (if file (replace-regexp-in-string "\\.pdf$" ".ps" file)
 		       (error "abc code block requires :file header argument"))))
 		       (error "abc code block requires :file header argument"))))
 	 (in-file (org-babel-temp-file "abc-"))
 	 (in-file (org-babel-temp-file "abc-"))
 	 (render (concat "abcm2ps" " " cmdline
 	 (render (concat "abcm2ps" " " cmdline

+ 1 - 1
lisp/ob-forth.el

@@ -53,7 +53,7 @@ This function is called by `org-babel-execute-src-block'"
 (defun org-babel-forth-session-execute (body params)
 (defun org-babel-forth-session-execute (body params)
   (require 'forth-mode)
   (require 'forth-mode)
   (let ((proc (forth-proc))
   (let ((proc (forth-proc))
-	(rx " \\(\n:\\|compiled\n\\\|ok\n\\)")
+	(rx " \\(\n:\\|compiled\n\\|ok\n\\)")
 	(result-start))
 	(result-start))
     (with-current-buffer (process-buffer (forth-proc))
     (with-current-buffer (process-buffer (forth-proc))
       (mapcar (lambda (line)
       (mapcar (lambda (line)

+ 1 - 1
lisp/org-list.el

@@ -221,7 +221,7 @@ into
 
 
 (defcustom org-plain-list-ordered-item-terminator t
 (defcustom org-plain-list-ordered-item-terminator t
   "The character that makes a line with leading number an ordered list item.
   "The character that makes a line with leading number an ordered list item.
-Valid values are ?. and ?\).  To get both terminators, use t.
+Valid values are ?. and ?\\).  To get both terminators, use t.
 
 
 This variable needs to be set before org.el is loaded.  If you
 This variable needs to be set before org.el is loaded.  If you
 need to make a change while Emacs is running, use the customize
 need to make a change while Emacs is running, use the customize