Backport commit a5b796a87 from Emacs

* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs):
Omit unnecessary ‘?’ after nullable pattern.
* lisp/org-capture.el (org-capture-fill-template):
Match upper-case as well as lower-case letters.

Fix 2019-08-04 regex lint
a5b796a8798a809044d847568e6472cc5eca077e
Paul Eggert
Sun Aug 4 11:39:54 2019 -0700
This commit is contained in:
Paul Eggert 2019-08-04 11:39:03 -07:00 committed by Kyle Meyer
parent 71ce18920a
commit 08c7bbbf71
2 changed files with 2 additions and 2 deletions

View file

@ -158,7 +158,7 @@ constructs (header arguments, no-web syntax etc...) are ignored."
(interactive "P")
(let* ((contents (buffer-string))
(haskell-regexp
(concat "^\\([ \t]*\\)#\\+begin_src[ \t]haskell*\\(.*\\)?[\r\n]"
(concat "^\\([ \t]*\\)#\\+begin_src[ \t]haskell*\\(.*\\)[\r\n]"
"\\([^\000]*?\\)[\r\n][ \t]*#\\+end_src.*"))
(base-name (file-name-sans-extension (buffer-file-name)))
(tmp-file (org-babel-temp-file "haskell-"))

View file

@ -1646,7 +1646,7 @@ The template may still contain \"%?\" for cursor positioning."
;; Mark %() embedded elisp for later evaluation.
(org-capture-expand-embedded-elisp 'mark)
;; Expand non-interactive templates.
(let ((regexp "%\\(:[-a-za-z]+\\|<\\([^>\n]+\\)>\\|[aAcfFikKlntTuUx]\\)"))
(let ((regexp "%\\(:[-A-Za-z]+\\|<\\([^>\n]+\\)>\\|[aAcfFikKlntTuUx]\\)"))
(save-excursion
(while (re-search-forward regexp nil t)
;; `org-capture-escaped-%' may modify buffer and cripple