lisp/window.el (window--state-get-1): Workaround for bug#14527.
[bpt/emacs.git] / lisp / mail / rmailkwd.el
index 7354257..e470e50 100644 (file)
@@ -1,6 +1,7 @@
 ;;; 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
@@ -96,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)