Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!ukma!xanth!nic.MR.NET!srcsip!bozon!alarson From: alarson@bozon.SRC.Honeywell.COM (Aaron Larson) Newsgroups: gnu.emacs.bug Subject: minor bug in 18.52 rmail-message-labels-p Message-ID: <19095@srcsip.UUCP> Date: 20 Mar 89 17:05:47 GMT Sender: news@src.honeywell.COM Lines: 22 It doesn't widen the region before making the check. From rmail.el: ;; Return t if the attributes/keywords line of msg number MSG ;; contains a match for the regexp LABELS. (defun rmail-message-labels-p (msg labels) (goto-char (rmail-msgbeg msg)) (forward-char 3) (re-search-backward labels (prog1 (point) (end-of-line)) t)) Should be: (defun rmail-message-labels-p (msg labels) (save-restriction (save-excursion (widen) (goto-char (+ 3 (rmail-msgbeg msg))) (re-search-backward labels (prog1 (point) (end-of-line)) t)))) There are several functions in the same file that do the save-restriction via let/unwind-protect. Not actually wrong, but not very perspicuous either.