summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-06-14 02:11:11 +0000
committerRichard M. Stallman <rms@gnu.org>1996-06-14 02:11:11 +0000
commitb4aedf5eec151c975215a616c31c1382ee0a6e25 (patch)
tree6c1ccf6026fafd0bd38cede32c9dede6da4a8b3b
parent4bc93866971ce66912ebb5438967252ccfbfac57 (diff)
downloademacs-b4aedf5eec151c975215a616c31c1382ee0a6e25.tar.gz
(set-fill-column): Error if no argument.
-rw-r--r--lisp/simple.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 4ef1745ae3d..11dd51da17d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2452,10 +2452,16 @@ automatically breaks the line at a previous space."
(auto-fill-mode 1))
(defun set-fill-column (arg)
- "Set `fill-column' to current column, or to argument if given.
-The variable `fill-column' has a separate value for each buffer."
+ "Set `fill-column' to specified argument.
+Just \\[universal-argument] as argument means to use the current column."
(interactive "P")
- (setq fill-column (if (integerp arg) arg (current-column)))
+ (cond ((integerp arg)
+ (setq fill-column arg))
+ ((consp arg)
+ (setq fill-column (current-column)))
+ ;; Disallow missing argument; it's probably a typo for C-x C-f.
+ (t
+ (error "set-fill-column requires an explicit argument")))
(message "fill-column set to %d" fill-column))
(defconst comment-multi-line nil