lisp/window.el (window--state-get-1): Workaround for bug#14527.
[bpt/emacs.git] / lisp / mail / rmailkwd.el
index b9b6923..e470e50 100644 (file)
@@ -1,7 +1,7 @@
 ;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs
 
-;; Copyright (C) 1985, 1988, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1988, 1994, 2001-2013 Free Software Foundation,
+;; Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: mail
@@ -97,7 +97,8 @@ LABEL may be a symbol or string."
       (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)