Article View: gnu.emacs.bug
Article #1491minor bug in 18.52 rmail-message-labels-p
From: Aaron Larson
Date: Mon, 20 Mar 1989 17:05
Date: Mon, 20 Mar 1989 17:05
22 lines
1092 bytes
1092 bytes
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.
Technical Details
Message-ID:
<19095@srcsip.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!ukma!xanth!nic.MR.NET!srcsip!bozon!alarsonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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