Some fixes to follow coding conventions in files maintained by FSF.
[bpt/emacs.git] / lisp / play / dissociate.el
index 6939f32..b8458f6 100644 (file)
@@ -1,4 +1,4 @@
-;;; dissociate.el --- scramble text amusingly for Emacs.
+;;; dissociate.el --- scramble text amusingly for Emacs
 
 ;; Copyright (C) 1985 Free Software Foundation, Inc.
 
@@ -18,8 +18,9 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
 
@@ -45,6 +46,8 @@ Default is 2."
         (move-amount (if (> arg 0) arg (- arg)))
         (search-function (if (> arg 0) 'search-forward 'word-search-forward))
         (last-query-point 0))
+    (if (= (point-max) (point-min))
+       (error "The buffer contains no text to start from"))
     (switch-to-buffer outbuf)
     (erase-buffer)
     (while
@@ -95,4 +98,6 @@ Default is 2."
                 (funcall search-function overlap opoint t))))))
       (sit-for 0))))
 
+(provide 'dissociate)
+
 ;;; dissociate.el ends here