From 461f30cb27385e8f1f9b32502f803c6d19ae05da Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 Apr 2002 17:11:38 +0000 Subject: [PATCH] (report-emacs-bug-hook): Use replace-match only if search was successful. --- lisp/ChangeLog | 5 +++++ lisp/mail/emacsbug.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2cc914c0235..66ca3262ebd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,11 @@ * emacs-lisp/advice.el (documentation): Add ad-define-subr-args call. +2002-04-29 Markus Rost + + * mail/emacsbug.el (report-emacs-bug-hook): Use + replace-match only if search was successful. + 2002-04-29 Richard M. Stallman * net/zone-mode.el (zone-mode): Add write-file-hooks hook locally. diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 9b1d3cd4553..e444fbfae3e 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -242,9 +242,9 @@ and send the mail again using \\[mail-send-and-exit]."))) (let ((p (point))) (if (re-search-forward (concat "^In " (emacs-version)) nil t) (delete-region p (match-beginning 0)))) - (re-search-forward "Please describe.+\n.+precise symptoms.+bug:\n*" - (point-max) t) - (replace-match "Symptoms:\n"))) + (if (re-search-forward "Please describe.+\n.+precise symptoms.+bug:\n*" + (point-max) t) + (replace-match "Symptoms:\n")))) (provide 'emacsbug) -- 2.39.5