;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs
-;; Copyright (C) 1985, 1988, 1994, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1988, 1994, 2001-2013 Free Software Foundation,
+;; Inc.
;; Maintainer: FSF
;; Keywords: mail
(error "More than one label specified"))
(with-current-buffer rmail-buffer
(rmail-maybe-set-message-counters)
- (or msg (setq msg rmail-current-message))
+ (if (zerop (or msg (setq msg rmail-current-message)))
+ (error "No message"))
;; Force recalculation of summary for this message.
(aset rmail-summary-vector (1- msg) nil)
(let (attr-index)