Backport commit 1ad318cf2 from Emacs

* lisp/ob-tangle.el (org-babel-interpret-file-mode): Repair parts of
regexp that should only match +, - and =.

ob-tangle.el: fix unintended range in regexp
1ad318cf2ae22d945f8bfcd61981d619467a36da
Mattias Engdegård
Wed Aug 16 16:55:38 2023 +0200
This commit is contained in:
Mattias Engdegård 2023-08-16 14:57:48 +02:00 committed by Kyle Meyer
parent 525df5272d
commit cd8017e68f
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ Did you give the decimal value %1$d by mistake?" mode)))
(error "File mode %S not recognized as a valid format." mode))
((string-match-p "^o0?[0-7][0-7][0-7]$" mode)
(string-to-number (replace-regexp-in-string "^o" "" mode) 8))
((string-match-p "^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" mode)
((string-match-p "^[ugoa]*\\(?:[+=-][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+=-][rwxXstugo]*\\)+\\)*$" mode)
;; Match regexp taken from `file-modes-symbolic-to-number'.
(file-modes-symbolic-to-number mode org-babel-tangle-default-file-mode))
((string-match-p "^[r-][w-][xs-][r-][w-][xs-][r-][w-][x-]$" mode)