bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10754: define-minor-mode and doc of derived mode


From: Noam Postavsky
Subject: bug#10754: define-minor-mode and doc of derived mode
Date: Fri, 29 Jun 2018 11:12:40 -0400

On 29 June 2018 at 10:52, John Shahid <address@hidden> wrote:

>     (replace-regexp-in-string "\\(\n\n\\).*\\'"

The trick is that "." matches anything but a newline, using (.\\|\n\\)
instead works as expected:

(replace-regexp-in-string "\\(\n\n\\)\\(?:.\\|\n\\)*\\'"
              "\n\ndoc\\1"
              "foo\n\nbar\n\nbaz"
              nil
              nil
              1)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]