[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 22af213: Fix message when no completions available
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 22af213: Fix message when no completions available for editable field |
Date: |
Sun, 6 Oct 2019 21:37:00 -0400 (EDT) |
branch: master
commit 22af213f804d1405a5266a9d0e0e51a69daabef7
Author: Mauro Aranda <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Fix message when no completions available for editable field
* lisp/wid-edit.el (widget-completions-at-point): Detect here if point
is not in an editable field.
(widget-complete): And here say there are no completions available
(bug#11562).
---
lisp/wid-edit.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 916d41a..a5999c0 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1166,7 +1166,7 @@ When not inside a field, signal an error."
(plist-get completion-extra-properties
:predicate))))
(t
- (error "Not in an editable field")))))
+ (error "No completions available for this field")))))
;; We may want to use widget completion in buffers where the major mode
;; hasn't added widget-completions-at-point to completion-at-point-functions,
;; so it's not really obsolete (yet).
@@ -1174,8 +1174,9 @@ When not inside a field, signal an error."
(defun widget-completions-at-point ()
(let ((field (widget-field-find (point))))
- (when field
- (widget-apply field :completions-function))))
+ (if field
+ (widget-apply field :completions-function)
+ (error "Not in an editable field"))))
;;; Setting up the buffer.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 22af213: Fix message when no completions available for editable field,
Lars Ingebrigtsen <=