changeset 24972:ff8ffbbc63e8

(canonically-space-region, justify-current-line): Add * to interactive spec. (fill-region-as-paragraph, fill-paragraph, fill-region) (fill-nonuniform-paragraphs, fill-individual-paragraphs): Check readonly buffer in interactive spec.
author Dave Love <fx@gnu.org>
date Tue, 20 Jul 1999 16:02:27 +0000
parents e69a77b61b45
children 57d2a2f294cb
files lisp/textmodes/fill.el
diffstat 1 files changed, 22 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Tue Jul 20 15:56:11 1999 +0000
+++ b/lisp/textmodes/fill.el	Tue Jul 20 16:02:27 1999 +0000
@@ -1,6 +1,6 @@
 ;;; fill.el --- fill commands for Emacs
 
-;; Copyright (C) 1985, 86, 92, 94, 95, 96, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 86, 92, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
 
 ;; Keywords: wp
 
@@ -148,7 +148,7 @@
 \(depending on values of `sentence-end-double-space', `colon-double-space',
 and `sentence-end-without-period').
 Remove indentation from each line."
-  (interactive "r")
+  (interactive "*r")
   (save-excursion
     (goto-char beg)
     ;; Nuke tabs; they get screwed up in a fill.
@@ -319,8 +319,10 @@
 
 If `sentence-end-double-space' is non-nil, then period followed by one
 space does not end a sentence, so don't break a line there."
-  (interactive (list (region-beginning) (region-end)
-		     (if current-prefix-arg 'full)))
+  (interactive (progn
+		 (barf-if-buffer-read-only)
+		 (list (region-beginning) (region-end)
+		       (if current-prefix-arg 'full))))
   (unless (memq justify '(t nil none full center left right))
     (setq justify 'full))
   ;; Arrange for undoing the fill to restore point.
@@ -631,7 +633,9 @@
 
 If `fill-paragraph-function' is non-nil, we call it (passing our
 argument to it), and if it returns non-nil, we simply return its value."
-  (interactive (list (if current-prefix-arg 'full)))
+  (interactive (progn
+		 (barf-if-buffer-read-only)
+		 (list (if current-prefix-arg 'full))))
   (or (and fill-paragraph-function
 	   (let ((function fill-paragraph-function)
 		 fill-paragraph-function)
@@ -669,8 +673,10 @@
 
 If `sentence-end-double-space' is non-nil, then period followed by one
 space does not end a sentence, so don't break a line there."
-  (interactive (list (region-beginning) (region-end)
-		     (if current-prefix-arg 'full)))
+  (interactive (progn
+		 (barf-if-buffer-read-only)
+		 (list (region-beginning) (region-end)
+		       (if current-prefix-arg 'full))))
   (unless (memq justify '(t nil none full center left right))
     (setq justify 'full))
   (let (end beg)
@@ -847,7 +853,7 @@
 it will not be stretched by full justification.
 Third arg NOSQUEEZE non-nil means to leave interior whitespace unchanged,
 otherwise it is made canonical."
-  (interactive)
+  (interactive "*")
   (if (eq t how) (setq how (or (current-justification) 'none))
     (if (null how) (setq how 'full)
       (or (memq how '(none left right center))
@@ -1026,8 +1032,10 @@
 which will match the prefix of a line which is a citation marker
 plus whitespace, but no other kind of prefix.
 Also, if CITATION-REGEXP is non-nil,  don't fill header lines."
-  (interactive (list (region-beginning) (region-end)
-		     (if current-prefix-arg 'full)))
+  (interactive (progn
+		 (barf-if-buffer-read-only)
+		 (list (region-beginning) (region-end)
+		       (if current-prefix-arg 'full))))
   (let ((fill-individual-varying-indent t))
     (fill-individual-paragraphs min max justifyp citation-regexp)))
 
@@ -1054,8 +1062,10 @@
 which will match the prefix of a line which is a citation marker
 plus whitespace, but no other kind of prefix.
 Also, if CITATION-REGEXP is non-nil,  don't fill header lines."
-  (interactive (list (region-beginning) (region-end)
-		     (if current-prefix-arg 'full)))
+  (interactive (progn
+		 (barf-if-buffer-read-only)
+		 (list (region-beginning) (region-end)
+		       (if current-prefix-arg 'full))))
   (save-restriction
     (save-excursion
       (goto-char min)