summaryrefslogtreecommitdiff
path: root/lisp/wid-edit.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-07-10 14:52:53 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-07-10 14:52:53 -0400
commit2ec1b5ee3464999a18b8197101e8bf08a3c564a8 (patch)
tree4837c369ac576fbfd063b1ff046a3daca372f082 /lisp/wid-edit.el
parentc971758df75640c55e6f9d7ac7d9c6909519d0b4 (diff)
parent7c33a0572280bdcf0583c5625cfda32f63fad56d (diff)
Merge changes from emacs-23 branch.
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r--lisp/wid-edit.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 5e67c07957e..dfeb6371f5e 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1156,14 +1156,17 @@ the field."
(if field
(narrow-to-region (line-beginning-position) (line-end-position)))))
+;; This used to say:
+;; "When not inside a field, move to the previous button or field."
+;; but AFAICS, it has always just thrown an error.
(defun widget-complete ()
"Complete content of editable field from point.
-When not inside a field, move to the previous button or field."
+When not inside a field, signal an error."
(interactive)
(let ((field (widget-field-find (point))))
- (when field
- (widget-apply field :complete))
- (error "Not in an editable field")))
+ (if field
+ (widget-apply field :complete)
+ (error "Not in an editable field"))))
;;; Setting up the buffer.